Skip to content
Snippets Groups Projects
Commit 0b4b15df authored by Nicolas Peugnet's avatar Nicolas Peugnet
Browse files

use a config.h for NAME variable not to trigger library rebuilds

also build-cache-path is in fact not needed with arduino-cli current master
parent 074bcae2
Branches
No related tags found
No related merge requests found
# build dirs
build-*
# ignored files
config.h
# arduino-cli local configuration
sketch.json
......@@ -17,9 +17,11 @@ help:
@echo " clean Clean built files"
nano33blesense2: CPPFLAGS += -DSENSE_REV2
$(TARGETS): CPPFLAGS += -DNAME="$(NAME)"
$(TARGETS):
arduino-cli compile -b $(BOARD) --build-cache-path build-$@ --build-path build-$@ $(FLAGS)
$(TARGETS): config.h
arduino-cli compile -b $(BOARD) --build-path build-$@ $(FLAGS)
config.h:
@echo '#define NAME "$(NAME)"' > $@
$(TARGETS:%=upload-%): upload-%:
arduino-cli upload -b $(BOARD) -p $(PORT) --input-dir build-$*
......@@ -27,4 +29,4 @@ $(TARGETS:%=upload-%): upload-%:
clean:
rm -rf build-*
.PHONY: $(TARGETS) upload-% clean
.PHONY: $(TARGETS) upload-% clean config.h
......@@ -8,6 +8,7 @@
<https://www.arduino.cc/en/Tutorial/BuiltInExamples/StateChangeDetection>
*/
#include "config.h"
#include <ArduinoBLE.h>
#ifdef SENSE_REV2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment