summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathaniel Graff <nathaniel.graff@sifive.com>2019-06-20 18:26:41 +0000
committerGitHub <noreply@github.com>2019-06-20 18:26:41 +0000
commite52f5c4ad0c3ad3db876a895c926aab0b2f663b1 (patch)
tree4ccca658340c2cb6c1a07beb4216076a38f2e280
parent4e14a479f958fa2f4259035f3a47d799c6aa4c07 (diff)
parent8c9a08bc9afbaf08f055e4fa3c7daaa7153af569 (diff)
Merge pull request #288 from sifive/fix-benchmark-standalone-builds
Fix benchmark standalone builds
-rw-r--r--Makefile12
-rw-r--r--scripts/standalone.mk2
2 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 2be82e1..aa1839e 100644
--- a/Makefile
+++ b/Makefile
@@ -214,7 +214,11 @@ standalone: \
find $</scripts/elf2hex -name ".git*" | xargs rm -rf
+ifeq ($(PORT_DIR),)
$(MAKE) -C $(SRC_DIR) clean
+else
+ $(MAKE) -C $(SRC_DIR) PORT_DIR=${PORT_DIR} clean
+endif
cp -r $(SRC_DIR)/* $</src/
cp debug.mk $</debug.mk
@@ -222,7 +226,7 @@ standalone: \
echo "PROGRAM = $(PROGRAM)" > $</Makefile
ifneq ($(PORT_DIR),)
- echo "PORT_DIR = $(PORT_DIR)" > $</Makefile
+ echo "PORT_DIR = $(PORT_DIR)" >> $</Makefile
endif
cat scripts/standalone.mk >> $</Makefile
cat scripts/libmetal.mk >> $</Makefile
@@ -243,7 +247,11 @@ standalone: \
find $</freedom-metal -name ".git*" | xargs rm -rf
+ifeq ($(PORT_DIR),)
$(MAKE) -C $(SRC_DIR) clean
+else
+ $(MAKE) -C $(SRC_DIR) PORT_DIR=${PORT_DIR} clean
+endif
cp -r $(SRC_DIR)/* $</src/
cp debug.mk $</debug.mk
@@ -251,7 +259,7 @@ standalone: \
echo "PROGRAM = $(PROGRAM)" > $</Makefile
ifneq ($(PORT_DIR),)
- echo "PORT_DIR = $(PORT_DIR)" > $</Makefile
+ echo "PORT_DIR = $(PORT_DIR)" >> $</Makefile
endif
cat scripts/standalone.mk >> $</Makefile
cat scripts/libmetal.mk >> $</Makefile
diff --git a/scripts/standalone.mk b/scripts/standalone.mk
index a29bce4..2378b12 100644
--- a/scripts/standalone.mk
+++ b/scripts/standalone.mk
@@ -221,7 +221,7 @@ endif
.PHONY: clean-software
clean-software:
- $(MAKE) -C $(SRC_DIR) clean
+ $(MAKE) -C $(SRC_DIR) PORT_DIR=$(PORT_DIR) clean
rm -rf $(SRC_DIR)/$(CONFIGURATION)
.PHONY: clean
clean: clean-software