From d25e3867dbf01cb9f931704b5e844c63da6e4102 Mon Sep 17 00:00:00 2001 From: rishi Date: Mon, 19 Mar 2018 12:02:53 -0400 Subject: [PATCH] Update Makefile to allow for RISCV_PREFIX to be set by the configure --target --- Makefile.in | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index c073655..ea71c6b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,12 @@ prefix := @prefix@ abs_top_src_dir := @abs_top_srcdir@ XLEN := @XLEN@ +target_alias := @target_alias@ +ifeq ($(target_alias),) +RISCV_PREFIX_VAR := +else +RISCV_PREFIX_VAR := RISCV_PREFIX=@target_alias@- +endif instbasedir := $(DESTDIR)$(prefix) bmarkdir := $(abs_top_src_dir)/benchmarks isa_src_dir := $(abs_top_src_dir)/isa @@ -16,11 +22,11 @@ install: all benchmarks: mkdir -p benchmarks - $(MAKE) -C benchmarks -f $(bmarkdir)/Makefile src_dir=$(bmarkdir) XLEN=$(XLEN) + $(MAKE) -C benchmarks -f $(bmarkdir)/Makefile src_dir=$(bmarkdir) XLEN=$(XLEN) $(RISCV_PREFIX_VAR) isa: mkdir -p isa - $(MAKE) -C isa -f $(isa_src_dir)/Makefile src_dir=$(isa_src_dir) XLEN=$(XLEN) + $(MAKE) -C isa -f $(isa_src_dir)/Makefile src_dir=$(isa_src_dir) XLEN=$(XLEN) $(RISCV_PREFIX_VAR) debug-check: mkdir -p debug -- 2.30.2