A simple pure-Go Linux init system.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. .PHONY: build
  2. PREFIX := /etc
  3. INSTDIR := ${PREFIX}/lutrainit
  4. build: build-lutrainit build-lutractl
  5. build-lutrainit:
  6. $(MAKE) -C lutrainit build
  7. build-lutractl:
  8. $(MAKE) -C lutractl build
  9. build-race: build-race-lutrainit build-race-lutractl
  10. build-race-lutrainit:
  11. $(MAKE) -C lutrainit build-race
  12. build-race-lutractl:
  13. $(MAKE) -C lutractl build-race
  14. vet: vet-lutrainit vet-lutractl
  15. vet-lutrainit:
  16. $(MAKE) -C lutrainit vet
  17. vet-lutractl:
  18. $(MAKE) -C lutractl vet
  19. clean: clean-lutrainit clean-lutractl
  20. clean-lutrainit:
  21. $(MAKE) -C lutrainit clean
  22. clean-lutractl:
  23. $(MAKE) -C lutractl clean
  24. test: test-lutrainit test-lutractl
  25. test-lutrainit:
  26. $(MAKE) -C lutrainit test
  27. test-lutractl:
  28. $(MAKE) -C lutractl test
  29. misspell-check: misspell-check-lutrainit misspell-check-lutractl
  30. misspell-check-lutrainit:
  31. $(MAKE) -C lutrainit misspell-check
  32. misspell-check-lutractl:
  33. $(MAKE) -C lutractl misspell-check
  34. fmt-check: fmt-check-lutrainit fmt-check-lutractl
  35. fmt-check-lutrainit:
  36. $(MAKE) -C lutrainit fmt-check
  37. fmt-check-lutractl:
  38. $(MAKE) -C lutractl fmt-check
  39. fmt: fmt-lutrainit fmt-lutractl
  40. fmt-lutrainit:
  41. $(MAKE) -C lutrainit fmt
  42. fmt-lutractl:
  43. $(MAKE) -C lutractl fmt
  44. lint: lint-lutrainit lint-lutractl
  45. lint-lutrainit:
  46. $(MAKE) -C lutrainit lint
  47. lint-lutractl:
  48. $(MAKE) -C lutractl lint
  49. ## Other targets
  50. install:
  51. install -m 0755 -p lutrainit/lutrainit /lutrainit
  52. install -m 0755 -p lutractl/lutractl /usr/bin/lutractl
  53. CFGFILES = basic.target \
  54. dbus.service \
  55. loopback.service \
  56. mountall.service \
  57. udev.service \
  58. disk.target \
  59. network.target \
  60. network-manager.service \
  61. multi-user.target \
  62. lightdm.service
  63. install-sample-conf:
  64. install -d -m 0755 ${INSTDIR}
  65. install -d -m 0755 ${INSTDIR}/lutra.d
  66. install -m 0755 -p conf/lutra.conf ${INSTDIR}/lutra.conf
  67. for i in ${CFGFILES}; do \
  68. install -m 0755 -p conf/lutra.d/$$i ${INSTDIR}/lutra.d/ ; \
  69. done
  70. docker-build: build
  71. docker build -t dashie/lutrainit:latest .
  72. docker-run: docker-build
  73. docker run --entrypoint /usr/local/bin/lutrainit --name lutrainit dashie/lutrainit:latest
  74. docker-rm:
  75. docker rm lutrainit