summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBunnaroath Sou <bsou@sifive.com>2019-03-27 18:05:49 -0700
committerHsiang-Chia.Huang <hsiangchiah@sifive.com>2019-06-02 18:30:10 -0700
commit7fff977c8853a9c30f0017f4e47dd838b529997d (patch)
tree93923b43b5c3335d29919a9afbc52c8bc1ff95d9 /Makefile
parentf2c7f75ceef24aec9891d75c2b4fb5db5b847868 (diff)
Update Makefile to handle special ENV require for coremark, dhrystone
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 16 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c19045b..e742c35 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,13 @@ endif
PROGRAM ?= hello
TARGET ?= sifive-hifive1
+# Coremark require PORT_DIR set for different OS, freedom-metal for us!
+ifeq ($(PROGRAM),coremark)
+ifeq ($(PORT_DIR),)
+PORT_DIR = freedom-metal
+endif
+endif
+
TARGET_ROOT ?= $(abspath .)
PROGRAM_ROOT ?= $(abspath .)
@@ -102,9 +109,9 @@ clean:
#############################################################
# Enumerate BSPs and Programs
#
-# List all available boards and programs in a form that
-# Freedom Studio knows how to parse. Do not change the
-# format or fixed text of the output without consulting the
+# List all available boards and programs in a form that
+# Freedom Studio knows how to parse. Do not change the
+# format or fixed text of the output without consulting the
# Freedom Studio dev team.
#############################################################
@@ -194,6 +201,9 @@ standalone: \
cp release.mk $</release.mk
echo "PROGRAM = $(PROGRAM)" > $</Makefile
+ifneq ($(PORT_DIR),)
+ echo "PORT_DIR = $(PORT_DIR)" > $</Makefile
+endif
cat scripts/standalone.mk >> $</Makefile
cat scripts/libmetal.mk >> $</Makefile
else # "rtl" not in TARGET_TAGS
@@ -220,6 +230,9 @@ standalone: \
cp release.mk $</release.mk
echo "PROGRAM = $(PROGRAM)" > $</Makefile
+ifneq ($(PORT_DIR),)
+ echo "PORT_DIR = $(PORT_DIR)" > $</Makefile
+endif
cat scripts/standalone.mk >> $</Makefile
cat scripts/libmetal.mk >> $</Makefile
endif # rtl in TARGET_TAGS