summaryrefslogtreecommitdiff
path: root/examples/rules.mk
diff options
context:
space:
mode:
authorReinhard Panhuber <[email protected]>2020-07-25 14:26:24 +0200
committerReinhard Panhuber <[email protected]>2020-07-25 14:26:24 +0200
commite047fbe8fbc4727cee1fa720b82d4d6918a2d6c0 (patch)
tree6de402b58f82c14d7fc516c2351650ae3059ab94 /examples/rules.mk
parentd91843bcd21262658b43480240e5dfc2b7d7bd20 (diff)
parent60355720364f66fff7856c3de1d18382f7912e31 (diff)
Merge remote-tracking branch 'upstream/master' into uac2
Diffstat (limited to 'examples/rules.mk')
-rw-r--r--examples/rules.mk13
1 files changed, 9 insertions, 4 deletions
diff --git a/examples/rules.mk b/examples/rules.mk
index 2f4c8b860..dacb81363 100644
--- a/examples/rules.mk
+++ b/examples/rules.mk
@@ -12,11 +12,10 @@ all:
idf.py -B$(BUILD) -DBOARD=$(BOARD) build
clean:
- idf.py -B$(BUILD) clean
+ idf.py -B$(BUILD) -DBOARD=$(BOARD) clean
flash:
- @:$(call check_defined, SERIAL, example: SERIAL=/dev/ttyUSB0)
- idf.py -B$(BUILD) -p $(SERIAL) flash
+ idf.py -B$(BUILD) -DBOARD=$(BOARD) flash
else
# GNU Make build system
@@ -132,8 +131,14 @@ size: $(BUILD)/$(BOARD)-firmware.elf
@$(SIZE) $<
-@echo ''
+.PHONY: clean
clean:
- rm -rf $(BUILD)
+ $(RM) -rf $(BUILD)
+
+# Print out the value of a make variable.
+# https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile
+print-%:
+ @echo $* = $($*)
# Flash binary using Jlink
ifeq ($(OS),Windows_NT)