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))