mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-24 14:17:51 -04:00
build: rebuild exe when header files change (#1212)
Some checks are pending
Processor / processor simulation (push) Waiting to run
Some checks are pending
Processor / processor simulation (push) Waiting to run
This commit is contained in:
commit
fc5bc029e5
10 changed files with 18 additions and 13 deletions
|
@ -121,6 +121,9 @@ CC_HOST = gcc -Wall -O -g
|
|||
|
||||
# NEORV32 executable image generator
|
||||
IMAGE_GEN = $(NEORV32_EXG_PATH)/image_gen
|
||||
ifeq ($(OS),Windows_NT)
|
||||
IMAGE_GEN := $(IMAGE_GEN).exe
|
||||
endif
|
||||
|
||||
# Compiler & linker flags
|
||||
CC_OPTS = -march=$(MARCH) -mabi=$(MABI) $(EFFORT) -Wall -ffunction-sections -fdata-sections -nostartfiles -mno-fdiv
|
||||
|
@ -173,19 +176,21 @@ $(IMAGE_GEN): $(NEORV32_EXG_PATH)/image_gen.c
|
|||
|
||||
# Compile app *.s sources (assembly)
|
||||
$(BUILD_DIR)/%.s.o: %.s | $(BUILD_DIR)
|
||||
@$(CC) -c $(NEO_ASFLAGS) -I $(NEORV32_INC_PATH) $(ASM_INC) $< -o $@
|
||||
@$(CC) -c $(NEO_ASFLAGS) -MMD -MP -MF $(BUILD_DIR)/$*.s.d -MT $(BUILD_DIR)/$*.s.o -I $(NEORV32_INC_PATH) $(ASM_INC) $< -o $@
|
||||
|
||||
# Compile app *.S sources (assembly + C pre-processor)
|
||||
$(BUILD_DIR)/%.S.o: %.S | $(BUILD_DIR)
|
||||
@$(CC) -c $(NEO_ASFLAGS) -I $(NEORV32_INC_PATH) $(ASM_INC) $< -o $@
|
||||
@$(CC) -c $(NEO_ASFLAGS) -MMD -MP -MF $(BUILD_DIR)/$*.S.d -MT $(BUILD_DIR)/$*.S.o -I $(NEORV32_INC_PATH) $(ASM_INC) $< -o $@
|
||||
|
||||
# Compile app *.c sources
|
||||
$(BUILD_DIR)/%.c.o: %.c | $(BUILD_DIR)
|
||||
@$(CC) -c $(NEO_CFLAGS) -I $(NEORV32_INC_PATH) $(APP_INC) $< -o $@
|
||||
@$(CC) -c $(NEO_CFLAGS) -MMD -MP -MF $(BUILD_DIR)/$*.c.d -MT $(BUILD_DIR)/$*.c.o -I $(NEORV32_INC_PATH) $(APP_INC) $< -o $@
|
||||
|
||||
# Compile app *.cpp sources
|
||||
$(BUILD_DIR)/%.cpp.o: %.cpp | $(BUILD_DIR)
|
||||
@$(CC) -c $(NEO_CXXFLAGS) -I $(NEORV32_INC_PATH) $(APP_INC) $< -o $@
|
||||
@$(CC) -c $(NEO_CXXFLAGS) -MMD -MP -MF $(BUILD_DIR)/$*.cpp.d -MT $(BUILD_DIR)/$*.cpp.o -I $(NEORV32_INC_PATH) $(APP_INC) $< -o $@
|
||||
|
||||
-include $(OBJ:.o=.d)
|
||||
|
||||
# Link object files and show memory utilization
|
||||
$(APP_ELF): $(OBJ)
|
||||
|
|
|
@ -30,4 +30,4 @@ USER_FLAGS += -Wl,--defsym,__neorv32_ram_size=8k
|
|||
NEORV32_HOME ?= ../../..
|
||||
|
||||
# Include the main NEORV32 makefile
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
|
|
|
@ -30,4 +30,4 @@ USER_FLAGS += -Wl,--defsym,__neorv32_ram_size=8k
|
|||
NEORV32_HOME ?= ../../..
|
||||
|
||||
# Include the main NEORV32 makefile
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
|
|
|
@ -30,4 +30,4 @@ USER_FLAGS += -Wl,--defsym,__neorv32_ram_size=8k
|
|||
NEORV32_HOME ?= ../../..
|
||||
|
||||
# Include the main NEORV32 makefile
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
|
|
|
@ -30,4 +30,4 @@ USER_FLAGS += -Wl,--defsym,__neorv32_ram_size=8k
|
|||
NEORV32_HOME ?= ../../..
|
||||
|
||||
# Include the main NEORV32 makefile
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
|
|
|
@ -30,4 +30,4 @@ USER_FLAGS += -Wl,--defsym,__neorv32_ram_size=8k
|
|||
NEORV32_HOME ?= ../../..
|
||||
|
||||
# Include the main NEORV32 makefile
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
|
|
|
@ -30,4 +30,4 @@ USER_FLAGS += -Wl,--defsym,__neorv32_ram_size=8k
|
|||
NEORV32_HOME ?= ../../..
|
||||
|
||||
# Include the main NEORV32 makefile
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
|
|
|
@ -30,4 +30,4 @@ USER_FLAGS += -Wl,--defsym,__neorv32_ram_size=8k
|
|||
NEORV32_HOME ?= ../../..
|
||||
|
||||
# Include the main NEORV32 makefile
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
|
|
|
@ -30,4 +30,4 @@ USER_FLAGS += -Wl,--defsym,__neorv32_ram_size=8k
|
|||
NEORV32_HOME ?= ../../..
|
||||
|
||||
# Include the main NEORV32 makefile
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
|
|
|
@ -30,4 +30,4 @@ USER_FLAGS += -Wl,--defsym,__neorv32_ram_size=8k
|
|||
NEORV32_HOME ?= ../../..
|
||||
|
||||
# Include the main NEORV32 makefile
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
include $(NEORV32_HOME)/sw/common/common.mk
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue