forked from moononournation/nodemcu-webide
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathhttpserver_makefile.patch
More file actions
executable file
·47 lines (37 loc) · 1.42 KB
/
Copy pathhttpserver_makefile.patch
File metadata and controls
executable file
·47 lines (37 loc) · 1.42 KB
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
39
40
41
42
43
44
45
46
47
diff --git a/Makefile b/Makefile
index a03055b..c1f17d4 100644
--- a/Makefile
+++ b/Makefile
@@ -3,13 +3,16 @@
######################################################################
# Path to nodemcu-uploader (https://github.com/kmpm/nodemcu-uploader)
-NODEMCU-UPLOADER=../nodemcu-uploader/nodemcu-uploader.py
+NODEMCU-UPLOADER?=../nodemcu-uploader/nodemcu-uploader.py
# Serial port
-PORT=/dev/cu.SLAB_USBtoUART
-SPEED=115200
+PORT?=/dev/cu.SLAB_USBtoUART
-NODEMCU-COMMAND=$(NODEMCU-UPLOADER) -b $(SPEED) --start_baud $(SPEED) -p $(PORT) upload
+SPEED?=115200
+
+NODEMCU-COMMAND?=$(NODEMCU-UPLOADER) -b $(SPEED) --start_baud $(SPEED) -p $(PORT) upload
+
+PYTHON?=python3
######################################################################
@@ -26,17 +29,17 @@ usage:
# Upload one files only
upload:
- @python $(NODEMCU-COMMAND) $(FILE)
+ @$(PYTHON) $(NODEMCU-COMMAND) $(FILE)
# Upload HTTP files only
upload_http: $(HTTP_FILES)
- @python $(NODEMCU-COMMAND) $(foreach f, $^, $(f))
+ @$(PYTHON) $(NODEMCU-COMMAND) $(foreach f, $^, $(f))
# Upload httpserver lua files (init and server module)
upload_server: $(LUA_FILES)
- @python $(NODEMCU-COMMAND) $(foreach f, $^, $(f))
+ @$(PYTHON) $(NODEMCU-COMMAND) $(foreach f, $^, $(f))
# Upload all
upload_all: $(LUA_FILES) $(HTTP_FILES)
- @python $(NODEMCU-COMMAND) $(foreach f, $^, $(f))
+ @$(PYTHON) $(NODEMCU-COMMAND) $(foreach f, $^, $(f))