Makefile 1.4 KB

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