From edf6d9ed195e3c1df12382996392b0960f1b88a6 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Tue, 19 Mar 2024 23:45:38 -0700 Subject: [PATCH] Append EXT_FILELISTS to sim_common.f --- common.mk | 9 +++++++-- variables.mk | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index 34c08786..a2e31b51 100644 --- a/common.mk +++ b/common.mk @@ -310,8 +310,13 @@ $(MODEL_SMEMS_FILE) $(MODEL_SMEMS_FIR) &: $(TAPEOUT_CLASSPATH_TARGETS) $(MODEL_S # note: {MODEL,TOP}_BB_MODS_FILELIST is added as a req. so that the files get generated, # however it is really unneeded since ALL_MODS_FILELIST includes all BB files ######################################################################################## -$(sim_common_files): $(sim_files) $(ALL_MODS_FILELIST) $(TOP_SMEMS_FILE) $(MODEL_SMEMS_FILE) $(BB_MODS_FILELIST) - sort -u $(sim_files) $(ALL_MODS_FILELIST) | grep -v '.*\.\(svh\|h\)$$' > $@ +$(sim_common_files): $(sim_files) $(ALL_MODS_FILELIST) $(TOP_SMEMS_FILE) $(MODEL_SMEMS_FILE) $(BB_MODS_FILELIST) $(EXT_FILELISTS) +ifneq (,$(EXT_FILELISTS)) + cat $(EXT_FILELISTS) > $@ +else + rm -f $@ +endif + sort -u $(sim_files) $(ALL_MODS_FILELIST) | grep -v '.*\.\(svh\|h\)$$' >> $@ echo "$(TOP_SMEMS_FILE)" >> $@ echo "$(MODEL_SMEMS_FILE)" >> $@ diff --git a/variables.mk b/variables.mk index 20154c24..3bebdb1a 100644 --- a/variables.mk +++ b/variables.mk @@ -213,6 +213,12 @@ BB_MODS_FILELIST ?= $(build_dir)/$(long_name).bb.f # all module files to include (top, model, bb included) ALL_MODS_FILELIST ?= $(build_dir)/$(long_name).all.f +# external filelists. Users, or project-supplied make fragments can append filelists +# with absolute paths here +EXT_FILELISTS ?= +# external verilog incdirs. Users, or project-supplied make fragments can append to this +EXT_INCDIRS ?= + BOOTROM_FILES ?= bootrom.rv64.img bootrom.rv32.img BOOTROM_TARGETS ?= $(addprefix $(build_dir)/, $(BOOTROM_FILES))