Makefile 1.2 KB

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