diff options
author | Neel Gala <neelgala@incoresemi.com> | 2022-02-25 11:42:33 +0530 |
---|---|---|
committer | Neel Gala <neelgala@incoresemi.com> | 2022-02-25 11:42:33 +0530 |
commit | e78559f521c1cae445e02ec5cd43db15bb32d51e (patch) | |
tree | 188af22797ce9d22065dfb3b0265fb6a7e2cdd61 /arch_test_target/spike/device/rv32i_m/C/Makefile.include | |
parent | 8ca012a6cc7e5b9edfaacca2d04b5a0f267377cf (diff) | |
download | spike-e78559f521c1cae445e02ec5cd43db15bb32d51e.zip spike-e78559f521c1cae445e02ec5cd43db15bb32d51e.tar.gz spike-e78559f521c1cae445e02ec5cd43db15bb32d51e.tar.bz2 |
clean up the the arch-test directory to avoid copypasta
- move all common stuff to a Makefile_common.inc
- include this file in all individual Makefile.includes
Diffstat (limited to 'arch_test_target/spike/device/rv32i_m/C/Makefile.include')
-rw-r--r-- | arch_test_target/spike/device/rv32i_m/C/Makefile.include | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/arch_test_target/spike/device/rv32i_m/C/Makefile.include b/arch_test_target/spike/device/rv32i_m/C/Makefile.include index 7853baf..346feaa 100644 --- a/arch_test_target/spike/device/rv32i_m/C/Makefile.include +++ b/arch_test_target/spike/device/rv32i_m/C/Makefile.include @@ -1,37 +1,4 @@ -TARGET_SIM ?= spike -TARGET_FLAGS ?= $(RISCV_TARGET_FLAGS) -ifeq ($(shell command -v $(TARGET_SIM) 2> /dev/null),) - $(error Target simulator executable '$(TARGET_SIM)` not found) -endif - -RISCV_PREFIX ?= riscv32-unknown-elf- -RISCV_GCC ?= $(RISCV_PREFIX)gcc -RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump -RISCV_GCC_OPTS ?= -g -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles $(RVTEST_DEFINES) - -COMPILE_CMD = $$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ - -I$(ROOTDIR)/riscv-test-suite/env/ \ - -I$(TARGETDIR)/$(RISCV_TARGET)/ \ - -T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ - $$(<) -o $$@ -OBJ_CMD = $$(RISCV_OBJDUMP) $$@ -D > $$@.objdump; \ - $$(RISCV_OBJDUMP) $$@ --source > $$@.debug - - -COMPILE_TARGET=\ - $(COMPILE_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m$$(RISCV_GCC) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; \ - $(OBJ_CMD); \ - if [ $$$$? -ne 0 ] ; \ - then \ - echo "\e[31m $$(RISCV_OBJDUMP) failed for target $$(@) \e[39m" ; \ - exit 1 ; \ - fi ; - +include $(TARGETDIR)/spike/device/Makefile_common.inc RUN_CMD = $(TARGET_SIM) $(TARGET_FLAGS) --isa=rv32ic \ +signature=$(*).signature.output +signature-granularity=4\ $< |