Makefile 864 B

123456789101112131415161718192021222324
  1. -include ../mconfig
  2. -include version.conf
  3. all: ../mconfig includes/mconfig.h
  4. # Look for a suitable build config file and use it.
  5. ../mconfig:
  6. @UNAME=`uname`;\
  7. if [ -f "../configs/mconfig.$$UNAME.sh" ]; then \
  8. echo "Found auto-configuration script for OS: $$UNAME"; \
  9. ( cd ../configs; sh "mconfig.$$UNAME.sh" ) \
  10. elif [ -f "../configs/mconfig.$$UNAME" ]; then \
  11. echo "Found configuration for OS: $$UNAME"; \
  12. ln -sf "configs/mconfig.$$UNAME" ../mconfig; \
  13. else \
  14. echo "No config available. Please create suitable mconfig file."; \
  15. exit 1; \
  16. fi
  17. includes/mconfig.h: ../mconfig tools/mconfig-gen.cc
  18. $(MAKE) -C tools mconfig-gen
  19. ./tools/mconfig-gen SBINDIR=$(SBINDIR) SYSCONTROLSOCKET=$(SYSCONTROLSOCKET) \
  20. SHUTDOWN_PREFIX=$(SHUTDOWN_PREFIX) VERSION=$(VERSION) \
  21. $(if $(USE_UTMPX),USE_UTMPX=$(USE_UTMPX),) > includes/mconfig.h