Skip to content

Commit ee40d17

Browse files
committed
mpy-cross: Make build independent of extmod directory.
mpy-cross doesn't depend on any code in the extmod directory so completely exclude it from the build (extmod may still be scanned for qstrs but that is controlled by py/py.mk). This speeds up the build a little, and improves abstraction of this component. Also, make -I$(BUILD) take precedence over -I$(TOP) in case there are stray files in the root directory that would be picked up.
1 parent c700ff5 commit ee40d17

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

mpy-cross/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ UNAME_S := $(shell uname -s)
2525
# include py core make definitions
2626
include $(TOP)/py/py.mk
2727

28-
INC += -I.
29-
INC += -I$(TOP)
28+
INC += -I.
3029
INC += -I$(BUILD)
30+
INC += -I$(TOP)
3131

3232
# compiler settings
3333
CWARN = -Wall -Werror
@@ -68,7 +68,7 @@ ifneq (,$(findstring mingw,$(COMPILER_TARGET)))
6868
SRC_C += ports/windows/fmode.c
6969
endif
7070

71-
OBJ = $(PY_O)
71+
OBJ = $(PY_CORE_O)
7272
OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
7373

7474
include $(TOP)/py/mkrules.mk

mpy-cross/mphalport.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
// empty file
1+
// prevent including extmod/virtpin.h
2+
#define mp_hal_pin_obj_t

0 commit comments

Comments
 (0)