makefile 992 B

12345678910111213141516171819202122232425262728293031
  1. ######################################################################
  2. # User configuration
  3. ######################################################################
  4. # Path to the tool and serial port
  5. LUATOOL=../luatool/luatool/luatool.py
  6. PORT=/dev/cu.usbserial-A602HRAZ
  7. ######################################################################
  8. # End of user config
  9. ######################################################################
  10. HTTP_FILES := $(wildcard http/*)
  11. LUA_FILES := init.lua httpserver.lua
  12. # Print usage
  13. usage:
  14. @echo "make upload_http to upload http files only"
  15. @echo "make upload_lua to upload init.lua and httpserver.lua"
  16. @echo "make upload to upload all"
  17. # Upload HTTP files only
  18. upload_http: $(HTTP_FILES)
  19. $(foreach f, $^, $(LUATOOL) -f $(f) -t $(f) -p $(PORT);)
  20. # Upload httpserver lua files (init and server module)
  21. upload_lua: $(LUA_FILES)
  22. $(foreach f, $^, $(LUATOOL) -f $(f) -t $(f) -p $(PORT);)
  23. # Upload all
  24. upload: upload_http upload_lua