diff --git a/py/py.mk b/py/py.mk index e064b325e5..ae12e1976d 100644 --- a/py/py.mk +++ b/py/py.mk @@ -106,9 +106,8 @@ $(BUILD)/extmod/modbtree.o: CFLAGS += $(BTREE_DEFS) endif ifeq ($(CIRCUITPY_ULAB),1) -SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*.c)) -SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*/*.c)) -SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*/*/*.c)) +ULAB_SRCS := $(shell find $(TOP)/extmod/ulab/code -type f -name "*.c") +SRC_MOD += $(patsubst $(TOP)/%,%,$(ULAB_SRCS)) CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1 -iquote $(TOP)/extmod/ulab/code $(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Wno-missing-declarations -Wno-missing-prototypes -Wno-unused-parameter -Wno-float-equal -Wno-sign-compare -Wno-cast-align -Wno-shadow -DCIRCUITPY endif