Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. define delete-files
  2. python3 -c "import shutil;shutil.rmtree('$(1)', ignore_errors=True)"
  3. endef
  4. default: proto service webui-dist
  5. service:
  6. $(MAKE) -wC service
  7. service-prep:
  8. $(MAKE) -wC service prep
  9. windows-resources:
  10. VERSION="$(VERSION)" ./var/windows/generate-resources.sh
  11. windows-msi:
  12. VERSION="$(VERSION)" ./var/windows/build-msi.sh
  13. service-unittests:
  14. $(MAKE) -wC service unittests
  15. service-codestyle:
  16. $(MAKE) -wC service codestyle
  17. frontend-codestyle:
  18. $(MAKE) -wC frontend codestyle
  19. frontend-unittests:
  20. $(MAKE) -wC frontend unittests
  21. it:
  22. $(MAKE) -wC integration-tests
  23. go-tools:
  24. $(MAKE) -wC service go-tools
  25. proto: go-tools
  26. $(MAKE) -wC proto
  27. dist:
  28. echo "dist noop"
  29. podman-image:
  30. buildah bud -f Dockerfile.singlearch -t olivetin
  31. podman-container:
  32. podman kill olivetin || true
  33. podman rm olivetin || true
  34. podman create --name olivetin -p 1337:1337 -v /etc/OliveTin/:/config:ro olivetin
  35. podman start olivetin
  36. integration-tests-docker-image:
  37. docker rm -f olivetin && docker rmi -f olivetin
  38. docker build -f Dockerfile.singlearch -t olivetin:latest .
  39. docker create --name olivetin -p 1337:1337 -v `pwd`/integration-tests/configs/:/config/ olivetin
  40. devrun: compile
  41. killall OliveTin || true
  42. ./OliveTin &
  43. devcontainer: compile podman-image podman-container
  44. webui-dist:
  45. $(call delete-files,webui)
  46. $(MAKE) -wC frontend dist
  47. mv frontend/dist webui
  48. clean:
  49. $(call delete-files,dist)
  50. $(call delete-files,OliveTin)
  51. $(call delete-files,OliveTin.armhf)
  52. $(call delete-files,OliveTin.exe)
  53. rm -f service/resource_windows_*.syso
  54. $(call delete-files,reports)
  55. $(call delete-files,gen)
  56. config-tool:
  57. cd service && go run cmd/config-tool/main.go
  58. devcheck:
  59. python3 scripts/devcheck.py $(ARGS)
  60. .PHONY: proto default service windows-resources windows-msi frontend-unittests it devcheck