summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Colistete Jr <roberto.colistete@gmail.com>2020-08-15 02:35:02 -0300
committerGlenn Ruben Bakke <glennbakke@gmail.com>2020-08-26 22:14:40 +0200
commit91c5d168c061ec45a548876a76a5540316d02594 (patch)
tree0cc4daefb3a560f5dc61100dc189581c76e0252c
parent5fb276de33c238d0a56696c701b8274d070684d8 (diff)
nrf/Makefile: Improve user C modules support.
Add CFLAGS_EXTRA to CFLAGS. Include LDFLAGS_MOD to the compilation. And, add SRC_MOD to SRC_QSTR.
-rw-r--r--ports/nrf/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile
index 8f73336e0..e5a1b471a 100644
--- a/ports/nrf/Makefile
+++ b/ports/nrf/Makefile
@@ -113,7 +113,7 @@ endif
CFLAGS += $(CFLAGS_MCU_$(MCU_SERIES))
-CFLAGS += $(INC) -Wall -Werror -g -ansi -std=c11 -nostdlib $(COPT) $(NRF_DEFINES) $(CFLAGS_MOD)
+CFLAGS += $(INC) -Wall -Werror -g -ansi -std=c11 -nostdlib $(COPT) $(NRF_DEFINES) $(CFLAGS_MOD) $(CFLAGS_EXTRA)
CFLAGS += -fno-strict-aliasing
CFLAGS += -Iboards/$(BOARD)
CFLAGS += -DNRF5_HAL_H='<$(MCU_VARIANT)_hal.h>'
@@ -445,11 +445,11 @@ flash: deploy
$(BUILD)/$(OUTPUT_FILENAME).elf: $(OBJ)
$(ECHO) "LINK $@"
- $(Q)$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
+ $(Q)$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LDFLAGS_MOD) $(LIBS)
$(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_LIB) $(DRIVERS_SRC_C) $(SRC_BOARD_MODULES) $(SRC_MOD)
# Append any auto-generated sources that are needed by sources listed in
# SRC_QSTR