Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. it:
  19. $(MAKE) -wC integration-tests
  20. go-tools:
  21. $(MAKE) -wC service go-tools
  22. proto: go-tools
  23. $(MAKE) -wC proto
  24. dist:
  25. echo "dist noop"
  26. podman-image:
  27. buildah bud -f Dockerfile.singlearch -t olivetin
  28. podman-container:
  29. podman kill olivetin || true
  30. podman rm olivetin || true
  31. podman create --name olivetin -p 1337:1337 -v /etc/OliveTin/:/config:ro olivetin
  32. podman start olivetin
  33. integration-tests-docker-image:
  34. docker rm -f olivetin && docker rmi -f olivetin
  35. docker build -f Dockerfile.singlearch -t olivetin:latest .
  36. docker create --name olivetin -p 1337:1337 -v `pwd`/integration-tests/configs/:/config/ olivetin
  37. devrun: compile
  38. killall OliveTin || true
  39. ./OliveTin &
  40. devcontainer: compile podman-image podman-container
  41. webui-dist:
  42. $(MAKE) -wC frontend dist
  43. mv frontend/dist webui
  44. clean:
  45. $(call delete-files,dist)
  46. $(call delete-files,OliveTin)
  47. $(call delete-files,OliveTin.armhf)
  48. $(call delete-files,OliveTin.exe)
  49. rm -f service/resource_windows_*.syso
  50. $(call delete-files,reports)
  51. $(call delete-files,gen)
  52. config-tool:
  53. cd service && go run cmd/config-tool/main.go
  54. .PHONY: proto service windows-resources windows-msi