diff --git a/target/snitch_cluster/sw.mk b/target/snitch_cluster/sw.mk index 2d03dd176..d56649770 100644 --- a/target/snitch_cluster/sw.mk +++ b/target/snitch_cluster/sw.mk @@ -22,22 +22,22 @@ CLUSTER_GEN_HEADERS = snitch_cluster_cfg.h \ REGGEN_HEADERS = snitch_cluster_peripheral.h -TARGET_C_HDRS_DIR = $(ROOT)/target/snitch_cluster/sw/runtime/common -TARGET_C_HDRS = $(addprefix $(TARGET_C_HDRS_DIR)/,$(CLUSTER_GEN_HEADERS) $(REGGEN_HEADERS)) +SNRT_HAL_HDRS_DIR = $(ROOT)/target/snitch_cluster/sw/runtime/common +SNRT_HAL_HDRS = $(addprefix $(SNRT_HAL_HDRS_DIR)/,$(CLUSTER_GEN_HEADERS) $(REGGEN_HEADERS)) # CLUSTERGEN headers -$(addprefix $(TARGET_C_HDRS_DIR)/,$(CLUSTER_GEN_HEADERS)): %.h: $(CFG) $(CLUSTER_GEN_PREREQ) %.h.tpl +$(addprefix $(SNRT_HAL_HDRS_DIR)/,$(CLUSTER_GEN_HEADERS)): %.h: $(CFG) $(CLUSTER_GEN_PREREQ) %.h.tpl @echo "[CLUSTERGEN] Generate $@" - $(CLUSTER_GEN) -c $< --outdir $(TARGET_C_HDRS_DIR) --template $@.tpl + $(CLUSTER_GEN) -c $< --outdir $(SNRT_HAL_HDRS_DIR) --template $@.tpl # REGGEN headers -$(TARGET_C_HDRS_DIR)/snitch_cluster_peripheral.h: $(ROOT)/hw/snitch_cluster/src/snitch_cluster_peripheral/snitch_cluster_peripheral_reg.hjson $(REGGEN) +$(SNRT_HAL_HDRS_DIR)/snitch_cluster_peripheral.h: $(ROOT)/hw/snitch_cluster/src/snitch_cluster_peripheral/snitch_cluster_peripheral_reg.hjson $(REGGEN) $(call reggen_generate_header,$@,$<) .PHONY: clean-headers clean-sw: clean-headers clean-headers: - rm -f $(TARGET_C_HDRS) + rm -f $(SNRT_HAL_HDRS) ################## # Subdirectories # diff --git a/target/snitch_cluster/sw/apps/common.mk b/target/snitch_cluster/sw/apps/common.mk index d593619c4..a854307b6 100644 --- a/target/snitch_cluster/sw/apps/common.mk +++ b/target/snitch_cluster/sw/apps/common.mk @@ -8,7 +8,7 @@ # Build variables # ################### -$(APP)_HEADERS += $(TARGET_C_HDRS) +$(APP)_HEADERS += $(SNRT_HAL_HDRS) $(APP)_INCDIRS += $(SNRT_INCDIRS) $(APP)_INCDIRS += $(ROOT)/sw/deps/riscv-opcodes diff --git a/target/snitch_cluster/sw/runtime/runtime.mk b/target/snitch_cluster/sw/runtime/runtime.mk index 2cfd10cfa..b801aa710 100644 --- a/target/snitch_cluster/sw/runtime/runtime.mk +++ b/target/snitch_cluster/sw/runtime/runtime.mk @@ -26,7 +26,7 @@ SNRT_INCDIRS += $(SNRT_DIR)/src/omp SNRT_INCDIRS += $(SNRT_DIR)/api/omp SNRT_INCDIRS += $(SNRT_DIR)/vendor/riscv-opcodes SNRT_INCDIRS += $(SNRT_SRCDIR) -SNRT_INCDIRS += $(SNRT_TARGET_DIR)/../common +SNRT_INCDIRS += $(SNRT_HAL_HDRS_DIR) SNRT_RISCV_CFLAGS += $(RISCV_CFLAGS) SNRT_RISCV_CFLAGS += $(addprefix -I,$(SNRT_INCDIRS)) @@ -83,7 +83,7 @@ $(SNRT_LIB): $(SNRT_OBJS) | $(SNRT_BUILDDIR) $(SNRT_DUMP): $(SNRT_LIB) | $(SNRT_BUILDDIR) $(RISCV_OBJDUMP) $(RISCV_OBJDUMP_FLAGS) $< > $@ -$(SNRT_DEPS): | $(TARGET_C_HDRS) +$(SNRT_DEPS): | $(SNRT_HAL_HDRS) ifneq ($(filter-out clean%,$(MAKECMDGOALS)),) -include $(SNRT_DEPS) diff --git a/target/snitch_cluster/sw/tests/tests.mk b/target/snitch_cluster/sw/tests/tests.mk index 730bd0f17..a6f3b72f1 100644 --- a/target/snitch_cluster/sw/tests/tests.mk +++ b/target/snitch_cluster/sw/tests/tests.mk @@ -69,7 +69,7 @@ $(TESTS_BUILDDIR)/%.elf: $(TESTS_SRCDIR)/%.c $(LD_DEPS) $(TESTS_BUILDDIR)/%.d | $(TESTS_BUILDDIR)/%.dump: $(TESTS_BUILDDIR)/%.elf | $(TESTS_BUILDDIR) $(RISCV_OBJDUMP) $(RISCV_OBJDUMP_FLAGS) $< > $@ -$(TEST_DEPS): | $(TARGET_C_HDRS) +$(TEST_DEPS): | $(SNRT_HAL_HDRS) ifneq ($(filter-out clean%,$(MAKECMDGOALS)),) -include $(DEP)