Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. PY?=python3
  2. SERVERMODULE=http.server
  3. ifeq ($(PY), tauthon)
  4. SERVERMODULE = SimpleHTTPServer
  5. else ifeq ($(PY), python2)
  6. SERVERMODULE = SimpleHTTPServer
  7. else ifeq ($(PY), python3)
  8. SERVERMODULE = http.server
  9. endif
  10. help:
  11. @echo 'Makefile for generate styles, fonts, icons, js to cl-theme '
  12. @echo ' '
  13. @echo 'Usage: '
  14. @echo ' make all compile all frontend '
  15. @echo ' make clean delete all fonts, icons, styles, js '
  16. @echo ' make bulma compile bulma styles '
  17. @echo ' make icons compile icons '
  18. @echo ' make styles compile custom styles '
  19. @echo ' make playlist compile playlist javascript '
  20. @echo ' make aplaylist compile playlist styles '
  21. @echo ' make fonts generate fonts '
  22. @echo ' make js compile javascript files '
  23. @echo ' make serve [PY=python] [PORT=8000] serve site at http://localhost:8000 '
  24. @echo ' '
  25. all: generate
  26. generate: clean bulma fonts icons js styles playlist aplaylist
  27. clean:
  28. @rm -rf dist/
  29. bulma:
  30. @bash scripts/bulma.sh
  31. icons:
  32. @bash scripts/icons.sh
  33. styles:
  34. @bash scripts/styles.sh
  35. playlist:
  36. @bash scripts/playlist.sh
  37. aplaylist:
  38. @bash scripts/aplaylist.sh
  39. fonts:
  40. @bash scripts/fonts.sh
  41. js:
  42. @bash scripts/js.sh
  43. serve: generate
  44. ifdef PORT
  45. $(PY) -m $(SERVERMODULE) $(PORT)
  46. else
  47. $(PY) -m $(SERVERMODULE)
  48. endif