@@ -5,14 +5,46 @@ MPY_DIR = ../../..
55MOD = deepcraft_model
66
77# Source files (.c or .py)
8- SRC = dc_mp_iface.c model.c
8+ SRC = dc_mp_iface.c
99
1010# Architecture to build for (x86, x64, armv7m, xtensa, xtensawin, rv32imc)
1111ARCH = armv7emsp
1212
13+ # DEEPCRAFT model type: starter (source) or ready (static library)
14+ dcmodel ?= starter
15+
1316# Link with libm.a and libgcc.a from the toolchain
1417LINK_RUNTIME = 1
1518
19+ # Conditional compilation based on dcmodel parameter
20+
21+ # ifeq ($(dcmodel), ready)
22+ # # Use static library for ready models
23+ # MPY_LD_FLAGS += -l./snore.a
24+ # CFLAGS += -DDCMODEthoL_READY=1
25+ # $(info Building with ready model using static library)
26+ # else ifeq ($(dcmodel), starter)
27+ # # Use source file for starter models
28+ # SRC += model.c
29+ # CFLAGS += -DDCMODEL_STARTER=1
30+ # $(info Building with starter model using source compilation)
31+ # else
32+ # $(error Invalid dcmodel value: $(dcmodel). Use 'starter' or 'ready')
33+ # endif
34+
35+
36+ # ifeq ($(dcmodel), ready)
37+ # # Use static library for ready models
38+ # MPY_LD_FLAGS += -l./snore.a
39+ # $(info Building with ready model using static library)
40+ # else ifeq ($(dcmodel), starter)
41+ # # Use source file for starter models
42+ # SRC += model.c
43+ # $(info Building with starter model using source compilation)
44+ # else
45+ # $(error Invalid dcmodel value: $(dcmodel). Use 'starter' or 'ready')
46+ # endif
47+
1648# OS-specific settings
1749ifeq ($(OS ) , Windows_NT)
1850 RM = del /Q /F
@@ -29,7 +61,11 @@ CFLAGS += -Wno-error=implicit-function-declaration
2961override LIBGCC_PATH := gcc/lib/gcc/arm-none-eabi/11.3.1/thumb/v7e-m+fp/hard/libgcc.a
3062override LIBM_PATH := gcc/arm-none-eabi/lib/thumb/v7e-m+fp/hard/libm.a
3163
64+ # MPY_LD_FLAGS += -l./dc_test.a
65+ MPY_LD_FLAGS += -l./deepcraft_readymodel_snore_eval.a
66+ # MPY_LD_FLAGS += -l./snore.a
67+
3268include $(MPY_DIR ) /py/dynruntime.mk
3369
34- $(BUILD_DIRS ) :
35- $(Q )$(call MKDIR, $@ )
70+ # $(BUILD_DIRS):
71+ # $(Q)$(call MKDIR, $@)
0 commit comments