aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRobert Norton <rmn30@cam.ac.uk>2019-04-18 16:28:54 +0100
committerRobert Norton <rmn30@cam.ac.uk>2019-04-18 16:29:02 +0100
commitca5788f07ad099c3891a193d4d3d95ea71863961 (patch)
treee91b0e4890cdd591bf0d970121464f2f06e35c18 /Makefile
parent3f7974a8f5ee5718d77c4e8d713f4ebcd434bd5a (diff)
downloadsail-riscv-ca5788f07ad099c3891a193d4d3d95ea71863961.zip
sail-riscv-ca5788f07ad099c3891a193d4d3d95ea71863961.tar.gz
sail-riscv-ca5788f07ad099c3891a193d4d3d95ea71863961.tar.bz2
It turns out that the problem I was encountering with ARCH=32 was that I was setting it on the command line which overrides all assignments (including the ones that change it to RV32). Digging deeper down the Make rabbit hole it turns out that 'override' allows you to fix this.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 2 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d155327..3df901f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,10 @@
# Select architecture: RV32 or RV64.
ARCH ?= RV64
-.PHONY: ARCH
ifeq ($(ARCH),32)
-ARCH := RV32
+ override ARCH := RV32
else ifeq ($(ARCH),64)
-ARCH := RV64
+ override ARCH := RV64
endif
ifeq ($(ARCH),RV32)