Skip to content

Commit a2aceb5

Browse files
jimmodpgeorge
authored andcommitted
nrf/Makefile: Split up SRC_C variables.
This improves clarity a bit, but also ensures that only the required files are added to SRC_QSTR. Signed-off-by: Jim Mussared <[email protected]>
1 parent 43bcfb1 commit a2aceb5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

ports/nrf/Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ LIBS = \
163163

164164
ifeq ($(MCU_VARIANT), nrf52)
165165

166-
SRC_LIB += $(addprefix lib/,\
166+
SRC_LIB_C += $(addprefix lib/,\
167167
libm/math.c \
168168
libm/fmodf.c \
169169
libm/nearbyintf.c \
@@ -197,7 +197,7 @@ endif
197197

198198
ifeq ($(MCU_VARIANT), nrf91)
199199

200-
SRC_LIB += $(addprefix lib/,\
200+
SRC_LIB_C += $(addprefix lib/,\
201201
libm/math.c \
202202
libm/fmodf.c \
203203
libm/nearbyintf.c \
@@ -236,7 +236,7 @@ include drivers/secureboot/secureboot.mk
236236

237237
endif
238238

239-
SRC_LIB += $(addprefix shared/,\
239+
SRC_SHARED_C += $(addprefix shared/,\
240240
libc/string0.c \
241241
readline/readline.c \
242242
runtime/pyexec.c \
@@ -247,7 +247,7 @@ SRC_LIB += $(addprefix shared/,\
247247
)
248248

249249
ifeq ($(MICROPY_FATFS), 1)
250-
SRC_LIB += $(addprefix lib/,\
250+
SRC_LIB_C += $(addprefix lib/,\
251251
oofatfs/ff.c \
252252
oofatfs/ffunicode.c \
253253
)
@@ -362,7 +362,8 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_NRFX:.c=.o))
362362
OBJ += $(addprefix $(BUILD)/, $(SRC_NRFX_HAL:.c=.o))
363363
OBJ += $(addprefix $(BUILD)/, $(DRIVERS_SRC_C:.c=.o))
364364
OBJ += $(addprefix $(BUILD)/, $(SYSTEM_C_SRC:.c=.o))
365-
OBJ += $(addprefix $(BUILD)/, $(SRC_LIB:.c=.o))
365+
OBJ += $(addprefix $(BUILD)/, $(SRC_LIB_C:.c=.o))
366+
OBJ += $(addprefix $(BUILD)/, $(SRC_SHARED_C:.c=.o))
366367
OBJ += $(GEN_PINS_SRC:.c=.o)
367368

368369
$(BUILD)/$(OOFATFS_DIR)/ff.o: COPT += -Os
@@ -518,7 +519,7 @@ $(BUILD)/$(OUTPUT_FILENAME).elf: $(OBJ)
518519
$(Q)$(SIZE) $@
519520

520521
# List of sources for qstr extraction
521-
SRC_QSTR += $(SRC_C) $(SRC_LIB) $(DRIVERS_SRC_C) $(SRC_BOARD_MODULES)
522+
SRC_QSTR += $(SRC_C) $(SRC_SHARED_C) $(DRIVERS_SRC_C) $(SRC_BOARD_MODULES)
522523

523524
# Append any auto-generated sources that are needed by sources listed in
524525
# SRC_QSTR

0 commit comments

Comments
 (0)