summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMegan Wachs <megan@sifive.com>2017-10-06 10:19:26 -0700
committerGitHub <noreply@github.com>2017-10-06 10:19:26 -0700
commitb53187a0434fe5e8dce288f55cfca36b292552e4 (patch)
tree8d87e93c6480a30fcd9b71dba6406b50c8eb7b2e /Makefile
parentf584c01fafd402e004682c160fd66e8b78a5c496 (diff)
parent6053960215538a7eda160d9d5dda0a61e62b39f3 (diff)
Merge pull request #67 from dgrubb/Makefile-tweaks
Update Makefile with more user-friendly clean options
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 7014674..6b8e1c6 100644
--- a/Makefile
+++ b/Makefile
@@ -71,6 +71,12 @@ help:
@echo " tools [BOARD = $(BOARD)]:"
@echo " Install compilation & debugging tools to target your desired board."
@echo ""
+ @echo " toolchain-clean:"
+ @echo " Removes the installed toolchain."
+ @echo ""
+ @echo " openocd-clean:"
+ @echo " Removes the locally built instance of OpenOCD."
+ @echo ""
@echo " uninstall:"
@echo " Uninstall the compilation & debugging tools."
@echo ""
@@ -78,6 +84,10 @@ help:
@echo " Build a software program to load with the"
@echo " debugger."
@echo ""
+ @echo " clean [PROGRAM=$(PROGRAM) BOARD=$(BOARD)]:"
+ @echo " Clean compiled objects for a specified "
+ @echo " software program."
+ @echo ""
@echo " upload [PROGRAM=$(PROGRAM) BOARD=$(BOARD)]:"
@echo " Launch OpenOCD to flash your program to the"
@echo " on-board Flash."
@@ -92,9 +102,6 @@ help:
@echo ""
@echo " For more information, visit dev.sifive.com"
-.PHONY: clean
-clean:
-
#############################################################
# This section is for tool installation
#############################################################
@@ -144,7 +151,6 @@ $(builddir)/riscv-gnu-toolchain/%-elf/configure.stamp:
date > $@
.PHONY: toolchain-clean
-clean: toolchain-clean
toolchain-clean:
rm -rf $(toolchain_builddir)
@@ -180,7 +186,6 @@ $(openocd_builddir)/configure.stamp:
date > $@
.PHONY: openocd-clean
-clean: openocd-clean
openocd-clean:
rm -rf $(openocd_builddir)
@@ -191,6 +196,7 @@ PROGRAM_DIR = software/$(PROGRAM)
PROGRAM_ELF = software/$(PROGRAM)/$(PROGRAM)
.PHONY: software_clean
+clean: software_clean
software_clean:
$(MAKE) -C $(PROGRAM_DIR) CC=$(RISCV_GCC) RISCV_ARCH=$(RISCV_ARCH) RISCV_ABI=$(RISCV_ABI) AR=$(RISCV_AR) BSP_BASE=$(abspath bsp) BOARD=$(BOARD) LINK_TARGET=$(LINK_TARGET) clean