summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorhsiang-chia.huang <hsiangchia.huang@sifive.com>2019-06-05 09:30:32 +0800
committerGitHub <noreply@github.com>2019-06-05 09:30:32 +0800
commit78b48aac4add3ba3a8a46eafa2b8c8cde065d1f2 (patch)
tree529b31e1159e56592621439d1bca1db64da03817 /Makefile
parentf2c7f75ceef24aec9891d75c2b4fb5db5b847868 (diff)
parent9ed1c05e3b202ef2ef17cae4bfc0ca6425541d13 (diff)
Merge pull request #259 from sifive/coremark_development-19.05
Coremark development 19.05
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