Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. it:
  11. $(MAKE) -wC integration-tests
  12. go-tools:
  13. $(MAKE) -wC service go-tools
  14. proto: grpc
  15. grpc: go-tools
  16. $(MAKE) -wC proto
  17. dist: protoc
  18. protoc:
  19. protoc --go_out=. --go-grpc_out=. --grpc-gateway_out=. -I .:/usr/include/ OliveTin.proto
  20. podman-image:
  21. buildah bud -t olivetin
  22. podman-container:
  23. podman kill olivetin || true
  24. podman rm olivetin || true
  25. podman create --name olivetin -p 1337:1337 -v /etc/OliveTin/:/config:ro olivetin
  26. podman start olivetin
  27. integration-tests-docker-image:
  28. docker rm -f olivetin && docker rmi -f olivetin
  29. docker build -t olivetin:latest .
  30. docker create --name olivetin -p 1337:1337 -v `pwd`/integration-tests/configs/:/config/ olivetin
  31. devrun: compile
  32. killall OliveTin || true
  33. ./OliveTin &
  34. devcontainer: compile podman-image podman-container
  35. webui-dist:
  36. $(MAKE) -wC frontend dist
  37. mv frontend/dist webui
  38. clean:
  39. $(call delete-files,dist)
  40. $(call delete-files,OliveTin)
  41. $(call delete-files,OliveTin.armhf)
  42. $(call delete-files,OliveTin.exe)
  43. $(call delete-files,reports)
  44. $(call delete-files,gen)
  45. .PHONY: grpc proto service