build: rebuild exe when header files change (#1212)
Some checks are pending
Processor / processor simulation (push) Waiting to run

This commit is contained in:
stnolting 2025-03-19 21:06:56 +01:00 committed by GitHub
commit fc5bc029e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 18 additions and 13 deletions

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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