Makefile 1.7 KB

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