2
0

Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. echo "*** No config available. Please create suitable mconfig file."; \
  33. exit 1; \
  34. fi