Browse Source

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.
pull/6382/head
Roberto Colistete Jr 4 years ago
committed by Glenn Ruben Bakke
parent
commit
91c5d168c0
  1. 6
      ports/nrf/Makefile

6
ports/nrf/Makefile

@ -113,7 +113,7 @@ endif
CFLAGS += $(CFLAGS_MCU_$(MCU_SERIES)) 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 += -fno-strict-aliasing
CFLAGS += -Iboards/$(BOARD) CFLAGS += -Iboards/$(BOARD)
CFLAGS += -DNRF5_HAL_H='<$(MCU_VARIANT)_hal.h>' CFLAGS += -DNRF5_HAL_H='<$(MCU_VARIANT)_hal.h>'
@ -445,11 +445,11 @@ flash: deploy
$(BUILD)/$(OUTPUT_FILENAME).elf: $(OBJ) $(BUILD)/$(OUTPUT_FILENAME).elf: $(OBJ)
$(ECHO) "LINK $@" $(ECHO) "LINK $@"
$(Q)$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(Q)$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LDFLAGS_MOD) $(LIBS)
$(Q)$(SIZE) $@ $(Q)$(SIZE) $@
# List of sources for qstr extraction # 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 # Append any auto-generated sources that are needed by sources listed in
# SRC_QSTR # SRC_QSTR

Loading…
Cancel
Save