From 3125f997f7b57b6bbbcdc153d4e778084788b416 Mon Sep 17 00:00:00 2001 From: Marcos Kirsch Date: Sat, 18 Apr 2015 23:13:04 -0500 Subject: [PATCH] Changed upload to upload_all which is more clear. You can now use make upload to upload a specific file --- Makefile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 4ff9c0e..348bfcc 100644 --- a/Makefile +++ b/Makefile @@ -2,10 +2,10 @@ # User configuration ###################################################################### # Path to nodemcu-uploader (https://github.com/kmpm/nodemcu-uploader) -NODEMCU-UPLOADER=nodemcu-uploader.py +NODEMCU-UPLOADER=../nodemcu-uploader/nodemcu-uploader.py # Serial port -PORT=/dev/ttyUSB0 -SPEED=460800 +PORT=/dev/cu.usbserial-A602HRAZ +SPEED=9600 ###################################################################### # End of user config @@ -15,9 +15,15 @@ LUA_FILES := init.lua httpserver.lua httpserver-request.lua httpserver-static.lu # Print usage usage: - @echo "make upload_http to upload files to be served" - @echo "make upload_server to upload the server code and init.lua" - @echo "make upload to upload all" + @echo "make upload FILE:= to upload a specific file (i.e make upload FILE:=init.lua)" + @echo "make upload_http to upload files to be served" + @echo "make upload_server to upload the server code and init.lua" + @echo "make upload_all to upload all" + @echo $(TEST) + +# Upload one files only +upload: + @$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(FILE) # Upload HTTP files only upload_http: $(HTTP_FILES) @@ -28,6 +34,6 @@ upload_server: $(LUA_FILES) @$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f)) # Upload all -upload: $(LUA_FILES) $(HTTP_FILES) +upload_all: $(LUA_FILES) $(HTTP_FILES) @$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f))