forked from CircuitMess/Nibble-Launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (18 loc) · 676 Bytes
/
Makefile
File metadata and controls
26 lines (18 loc) · 676 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
NAME = Nibble-Launcher
DIR = .
PORT = /dev/ttyUSB0
ACLI = /home/cm/.arduino/arduino-cli
srcFiles = $(shell find $(DIR)/src/ -name '*.cpp') $(shell find $(DIR)/ src/ -name '*.cpp')
headerFiles = $(shell find $(DIR)/src/ -name '*.h') $(shell find $(DIR)/src/ -name '*.hpp')
.PHONY: upload clean
build: $(DIR)/build/$(NAME).bin
$(DIR)/build/$(NAME).bin: $(srcFiles) $(headerFiles) $(DIR)/$(NAME).ino
@mkdir -p $(DIR)/build
cd $(DIR); \
$(ACLI) compile --fqbn cm:esp8266:nibble -o build/$(NAME).bin $(NAME).ino
upload: | $(DIR)/build/$(NAME).bin
@cd $(DIR); \
$(ACLI) upload --fqbn cm:esp8266:nibble -p $(PORT) -i build/$(NAME).bin
clean:
cd $(DIR); \
rm -rf build