2
0

Makefile 954 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # Makefile for Dinit.
  2. all: mconfig
  3. $(MAKE) -C build all
  4. $(MAKE) -C src all
  5. $(MAKE) -C doc/manpages all
  6. @echo "***"
  7. @echo "*** Build complete; use \"make check\" to run unit tests, \"make check-igr\" for"
  8. @echo "*** integration tests, or \"make install\" to install."
  9. @echo "***"
  10. check: mconfig
  11. $(MAKE) -C src check
  12. check-igr: mconfig
  13. $(MAKE) -C src check-igr
  14. run-cppcheck:
  15. $(MAKE) -C src run-cppcheck
  16. install: mconfig
  17. $(MAKE) -C src install
  18. $(MAKE) -C doc/manpages install
  19. clean:
  20. $(MAKE) -C src clean
  21. $(MAKE) -C build clean
  22. $(MAKE) -C doc/manpages clean
  23. mconfig:
  24. @UNAME=`uname`;\
  25. if [ -f "./configs/mconfig.$$UNAME.sh" ]; then \
  26. echo "*** Found auto-configuration script for OS: $$UNAME"; \
  27. ( cd ./configs; sh "mconfig.$$UNAME.sh" ) \
  28. elif [ -f "./configs/mconfig.$$UNAME" ]; then \
  29. echo "*** Found configuration for OS: $$UNAME"; \
  30. ln -sf "configs/mconfig.$$UNAME" mconfig; \
  31. else \
  32. ./configure; \
  33. fi