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.
This commit is contained in:
parent
c700ff52a0
commit
ee40d1704f
|
@ -25,9 +25,9 @@ UNAME_S := $(shell uname -s)
|
||||||
# include py core make definitions
|
# include py core make definitions
|
||||||
include $(TOP)/py/py.mk
|
include $(TOP)/py/py.mk
|
||||||
|
|
||||||
INC += -I.
|
INC += -I.
|
||||||
INC += -I$(TOP)
|
|
||||||
INC += -I$(BUILD)
|
INC += -I$(BUILD)
|
||||||
|
INC += -I$(TOP)
|
||||||
|
|
||||||
# compiler settings
|
# compiler settings
|
||||||
CWARN = -Wall -Werror
|
CWARN = -Wall -Werror
|
||||||
|
@ -68,7 +68,7 @@ ifneq (,$(findstring mingw,$(COMPILER_TARGET)))
|
||||||
SRC_C += ports/windows/fmode.c
|
SRC_C += ports/windows/fmode.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJ = $(PY_O)
|
OBJ = $(PY_CORE_O)
|
||||||
OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
||||||
|
|
||||||
include $(TOP)/py/mkrules.mk
|
include $(TOP)/py/mkrules.mk
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
// empty file
|
// prevent including extmod/virtpin.h
|
||||||
|
#define mp_hal_pin_obj_t
|
||||||
|
|
Loading…
Reference in New Issue