Makefile 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <<<<<<< HEAD:Makefile
  2. ######################################################################
  3. # User configuration
  4. ######################################################################
  5. # Path to nodemcu-uploader (https://github.com/kmpm/nodemcu-uploader)
  6. NODEMCU-UPLOADER=nodemcu-uploader.py
  7. # Serial port
  8. PORT=/dev/ttyUSB0
  9. SPEED=460800
  10. ######################################################################
  11. # End of user config
  12. ######################################################################
  13. HTTP_FILES := $(wildcard http/*)
  14. LUA_FILES := init.lua httpserver.lua httpserver-request.lua httpserver-static.lua httpserver-error.lua
  15. # Print usage
  16. usage:
  17. @echo "make upload_http to upload files to be served"
  18. @echo "make upload_server to upload the server code and init.lua"
  19. @echo "make upload to upload all"
  20. # Upload HTTP files only
  21. upload_http: $(HTTP_FILES)
  22. @$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f))
  23. # Upload httpserver lua files (init and server module)
  24. upload_server: $(LUA_FILES)
  25. @$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f))
  26. # Upload all
  27. upload: $(LUA_FILES) $(HTTP_FILES)
  28. @$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f))
  29. #test
  30. test: $(LUA_FILES) $(HTTP_FILES)
  31. echo -b $(SPEED) -p $(PORT) upload $(foreach f, $^, -f $(f) -d $(f))
  32. =======
  33. ######################################################################
  34. # User configuration
  35. ######################################################################
  36. # Path to nodemcu-uploader (https://github.com/kmpm/nodemcu-uploader)
  37. NODEMCU-UPLOADER=../nodemcu-uploader/nodemcu-uploader.py
  38. # Serial port
  39. PORT=/dev/cu.usbserial-A602HRAZ
  40. # Bauds for the serial connection
  41. SPEED=115200
  42. ######################################################################
  43. # End of user config
  44. ######################################################################
  45. HTTP_FILES := $(wildcard http/*)
  46. LUA_FILES := init.lua httpserver.lua httpserver-request.lua httpserver-static.lua httpserver-error.lua
  47. # Print usage
  48. usage:
  49. @echo "make upload_http to upload files to be served"
  50. @echo "make upload_server to upload the server code and init.lua"
  51. @echo "make upload to upload all"
  52. # Upload HTTP files only
  53. upload_http: $(HTTP_FILES)
  54. @$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f))
  55. # Upload httpserver lua files (init and server module)
  56. upload_server: $(LUA_FILES)
  57. @$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f))
  58. # Upload all
  59. upload: $(LUA_FILES) $(HTTP_FILES)
  60. @$(NODEMCU-UPLOADER) -b $(SPEED) -p $(PORT) upload $(foreach f, $^, $(f))
  61. >>>>>>> 2357415466bb24cba8ee33109146f6a6a2df0282:makefile