diff options
author | Megan Wachs <megan@sifive.com> | 2017-10-06 10:19:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-06 10:19:26 -0700 |
commit | b53187a0434fe5e8dce288f55cfca36b292552e4 (patch) | |
tree | 8d87e93c6480a30fcd9b71dba6406b50c8eb7b2e | |
parent | f584c01fafd402e004682c160fd66e8b78a5c496 (diff) | |
parent | 6053960215538a7eda160d9d5dda0a61e62b39f3 (diff) |
Merge pull request #67 from dgrubb/Makefile-tweaks
Update Makefile with more user-friendly clean options
-rw-r--r-- | Makefile | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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 |