From a2aceb50074f625c0d9b08ab8902bef1557c1ec6 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Sun, 9 Oct 2022 00:05:17 +1100 Subject: [PATCH] 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 --- ports/nrf/Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 4128404da4..a80a37e1fb 100644 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -163,7 +163,7 @@ LIBS = \ ifeq ($(MCU_VARIANT), nrf52) -SRC_LIB += $(addprefix lib/,\ +SRC_LIB_C += $(addprefix lib/,\ libm/math.c \ libm/fmodf.c \ libm/nearbyintf.c \ @@ -197,7 +197,7 @@ endif ifeq ($(MCU_VARIANT), nrf91) -SRC_LIB += $(addprefix lib/,\ +SRC_LIB_C += $(addprefix lib/,\ libm/math.c \ libm/fmodf.c \ libm/nearbyintf.c \ @@ -236,7 +236,7 @@ include drivers/secureboot/secureboot.mk endif -SRC_LIB += $(addprefix shared/,\ +SRC_SHARED_C += $(addprefix shared/,\ libc/string0.c \ readline/readline.c \ runtime/pyexec.c \ @@ -247,7 +247,7 @@ SRC_LIB += $(addprefix shared/,\ ) ifeq ($(MICROPY_FATFS), 1) -SRC_LIB += $(addprefix lib/,\ +SRC_LIB_C += $(addprefix lib/,\ oofatfs/ff.c \ oofatfs/ffunicode.c \ ) @@ -362,7 +362,8 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_NRFX:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_NRFX_HAL:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(DRIVERS_SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SYSTEM_C_SRC:.c=.o)) -OBJ += $(addprefix $(BUILD)/, $(SRC_LIB:.c=.o)) +OBJ += $(addprefix $(BUILD)/, $(SRC_LIB_C:.c=.o)) +OBJ += $(addprefix $(BUILD)/, $(SRC_SHARED_C:.c=.o)) OBJ += $(GEN_PINS_SRC:.c=.o) $(BUILD)/$(OOFATFS_DIR)/ff.o: COPT += -Os @@ -518,7 +519,7 @@ $(BUILD)/$(OUTPUT_FILENAME).elf: $(OBJ) $(Q)$(SIZE) $@ # List of sources for qstr extraction -SRC_QSTR += $(SRC_C) $(SRC_LIB) $(DRIVERS_SRC_C) $(SRC_BOARD_MODULES) +SRC_QSTR += $(SRC_C) $(SRC_SHARED_C) $(DRIVERS_SRC_C) $(SRC_BOARD_MODULES) # Append any auto-generated sources that are needed by sources listed in # SRC_QSTR