-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
38 lines (34 loc) · 1.04 KB
/
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
30
31
32
33
34
35
36
37
38
######################################################################
# User configuration
######################################################################
# Path to nodemcu-uploader (https://github.com/kmpm/nodemcu-uploader)
NODEMCU-UPLOADER=nodemcu-tool
# Serial port
#PORT=/dev/tty.wchusbserial14310
PORT=COM4
SPEED=115200
######################################################################
# End of user config
######################################################################
LUA_FILES := \
init.lua \
config-secrets.lua \
wifi.lua \
http-request.lua \
ota.lua \
start.lua \
mqtt.lua \
dht.lua \
co2.lua \
light.lua \
move.lua \
# Print usage
usage:
@echo "make upload FILE:=<file> to upload a specific file (i.e make upload FILE:=init.lua)"
@echo "make upload_all to upload all"
# Upload one files only
upload:
$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(FILE)
# Upload all
upload_all: $(LUA_FILES)
$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f))