Skip to content

Commit

Permalink
target: Improve Makefile reusability for use in Occamy
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Sep 2, 2024
1 parent c83ff1f commit 35da8ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions target/snitch_cluster/sw/apps/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ ifeq ($(SELECT_RUNTIME), banshee)
$(APP)_RISCV_CFLAGS += -DBIST
endif

$(APP)_LIBS += $(SNRT_TARGET_DIR)/build/libsnRuntime.a
$(APP)_LIBS += $(SNRT_BUILDDIR)/libsnRuntime.a

$(APP)_LIBDIRS = $(dir $($(APP)_LIBS))
$(APP)_LIBNAMES = $(patsubst lib%,%,$(notdir $(basename $($(APP)_LIBS))))

MEMORY_LD ?= $(ROOT)/target/snitch_cluster/sw/runtime/memory.ld

$(APP)_RISCV_LDFLAGS += $(RISCV_LDFLAGS)
$(APP)_RISCV_LDFLAGS += -L$(abspath $(SNRT_TARGET_DIR)/..)
$(APP)_RISCV_LDFLAGS += -L$(dir $(MEMORY_LD))
$(APP)_RISCV_LDFLAGS += -T$(abspath $(SNRT_DIR)/base.ld)
$(APP)_RISCV_LDFLAGS += $(addprefix -L,$($(APP)_LIBDIRS))
$(APP)_RISCV_LDFLAGS += $(addprefix -l,$($(APP)_LIBNAMES))
Expand Down

0 comments on commit 35da8ab

Please sign in to comment.