-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (23 loc) · 946 Bytes
/
Makefile
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
26
27
28
29
######################################################################
# User configuration
######################################################################
# Path to nodemcu-uploader (https://github.com/kmpm/nodemcu-uploader)
NODEMCU-UPLOADER=python ../nodemcu-uploader/nodemcu-uploader.py --start_baud 115200 --baud 115200
# Serial port
PORT=/dev/ttyUSB0
SPEED=115200
######################################################################
# End of user config
######################################################################
LUA_FILES := $(wildcard *lua) words.json
# Upload all
all: $(LUA_FILES)
@$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f))
# Print usage
usage:
@echo "make upload FILE:=<file> to upload a specific file (i.e make upload FILE:=init.lua)"
@echo "make to upload all"
@echo $(TEST)
# Upload one files only
upload:
@$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(FILE)