-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcircuitpython.mk
More file actions
64 lines (53 loc) · 1.63 KB
/
Copy pathcircuitpython.mk
File metadata and controls
64 lines (53 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# CircuitPython build glue for displayif.
#
# Include from a CircuitPython port Makefile after setting DISPLAYIF_MOD_DIR:
#
# DISPLAYIF_MOD_DIR := $(abspath ../../../displayif)
# include $(DISPLAYIF_MOD_DIR)/circuitpython.mk
#
# Patched in by apply_cp_displayif_patches.sh (graphics/usdl2 pattern).
# Folder names under ports/ follow MP port names; CP port dirs may differ
# (e.g. espressif → ports/esp32/).
# Hardware interfaces build only on MCU ports.
DISPLAYIF_MOD_DIR ?= $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
CP_PORT_DIR_ABS := $(abspath $(CURDIR))
DISPLAYIF_PORT_ESP32 := $(findstring /ports/espressif,$(CP_PORT_DIR_ABS))
DISPLAYIF_PORT_MIMXRT := $(findstring /ports/mimxrt,$(CP_PORT_DIR_ABS))
DISPLAYIF_PORT_RP2 := $(findstring /ports/rp2,$(CP_PORT_DIR_ABS))
ifeq ($(DISPLAYIF_PORT_ESP32),)
DISPLAYIF_PORT_ESP32 := 0
else
DISPLAYIF_PORT_ESP32 := 1
endif
ifeq ($(DISPLAYIF_PORT_MIMXRT),)
DISPLAYIF_PORT_MIMXRT := 0
else
DISPLAYIF_PORT_MIMXRT := 1
endif
ifeq ($(DISPLAYIF_PORT_RP2),)
DISPLAYIF_PORT_RP2 := 0
else
DISPLAYIF_PORT_RP2 := 1
endif
DISPLAYIF_IS_MCU := 0
ifeq ($(DISPLAYIF_PORT_ESP32),1)
DISPLAYIF_IS_MCU := 1
endif
ifeq ($(DISPLAYIF_PORT_MIMXRT),1)
DISPLAYIF_IS_MCU := 1
endif
ifeq ($(DISPLAYIF_PORT_RP2),1)
DISPLAYIF_IS_MCU := 1
endif
ifeq ($(DISPLAYIF_IS_MCU),1)
include $(DISPLAYIF_MOD_DIR)/ports/common/circuitpython.mk
endif
ifeq ($(DISPLAYIF_PORT_ESP32),1)
include $(DISPLAYIF_MOD_DIR)/ports/esp32/circuitpython.mk
endif
ifeq ($(DISPLAYIF_PORT_MIMXRT),1)
include $(DISPLAYIF_MOD_DIR)/ports/mimxrt/circuitpython.mk
endif
ifeq ($(DISPLAYIF_PORT_RP2),1)
include $(DISPLAYIF_MOD_DIR)/ports/rp2/circuitpython.mk
endif