diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-01 15:04:40 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-01 15:04:40 +0000 |
commit | 990e04bab51bf1c3771938b8f598272c1b31cdca (patch) | |
tree | 8b077d8d3326feeb6736f5eb1fa719103a8822d5 /.Makefile.inc | |
parent | 8f8e244f4f350a53a2a84296a66468b7e5ac4a2b (diff) |
Move dependency tracking from ./configure to Makefile
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11556 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to '.Makefile.inc')
-rw-r--r-- | .Makefile.inc | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/.Makefile.inc b/.Makefile.inc index 76c9b01f9..2e9b3e635 100644 --- a/.Makefile.inc +++ b/.Makefile.inc @@ -6,7 +6,9 @@ # Please do not edit unless you know what you're doing. # -@GNU_ONLY COMPILE_ROOT = $(shell pwd) +@GNU_ONLY MAKESTYLE = gnu +@GNU_ONLY COMPILE_ROOT ?= $(shell pwd) +@BSD_ONLY MAKESTYLE = bsd @BSD_ONLY COMPILE_ROOT != pwd @IFDEF D @@ -21,6 +23,7 @@ NICEFLAGS += -I$(COMPILE_ROOT)/include CC = @CC@ FLAGS = $(NICEFLAGS) -pedantic +PICLDFLAGS = -fPIC -DPIC -shared -export-dynamic LDLIBS = @LDLIBS@ BASE = "@BASE_DIR@" CONPATH = "@CONFIG_DIR@" @@ -28,19 +31,20 @@ MODPATH = "@MODULE_DIR@" BINPATH = "@BINARY_DIR@" LAUNCHDPATH = "/System/Library/LaunchDaemons" LIBPATH = "@LIBRARY_DIR@" -MODULES = @MODULES@ INSTMODE = 0755 +SOCKETENGINE = @SOCKETENGINE@ @GNU_ONLY MAKEFLAGS += --no-print-directory @IFDEF V RUNCC = $(CC) + VERBOSE = -v @ELSE @GNU_ONLY MAKEFLAGS += --silent + @BSD_ONLY MAKE += -s RUNCC = $(COMPILE_ROOT)/make/run-cc.pl $(CC) @ENDIF -@GNU_ONLY export COMPILE_ROOT RUNCC FLAGS NICEFLAGS CC LDLIBS MODULES MODPATH LIBPATH INSTMODE -@BSD_ONLY MAKEARGS = -s 'RUNCC=${RUNCC}' 'FLAGS=${FLAGS}' 'NICEFLAGS=${NICEFLAGS}' 'CC=${CC}' 'LDLIBS=${LDLIBS}' 'MODULES=${MODULES}' 'MODPATH=${MODPATH}' 'LIBPATH=${LIBPATH}' 'INSTMODE=${INSTMODE}' +@DO_EXPORT RUNCC FLAGS NICEFLAGS CC LDLIBS PICLDFLAGS VERBOSE SOCKETENGINE # Default target @@ -48,7 +52,15 @@ INSTMODE = 0755 _all: module @ENDIF -all: ircd mods finishmessage +all: finishmessage + +alldep: $(HEADER) + @echo -n "Generating module dependencies..." + @$(MAKEENV) $(MAKE) -C src -f ../make/$(MAKESTYLE)-dep.mk all + @echo 'done' + +allreal: alldep + @$(MAKEENV) $(MAKE) -C src -f ../make/$(MAKESTYLE)-real.mk all debug: @${MAKE} D=1 all @@ -77,14 +89,7 @@ std-header: @echo "* while you wait for make to run? *" @echo "*************************************" -ircd: $(HEADER) - @${MAKE} -C src $(MAKEARGS) inspircd commands - -mods: $(HEADER) - @${MAKE} -C src/modules $(MAKEARGS) - -# Make this depend on 'ircd' and 'mods', so its always output last even with -j -finishmessage: ircd mods +finishmessage: allreal @echo "" @echo "*************************************" @echo "* BUILD COMPLETE! *" @@ -93,14 +98,15 @@ finishmessage: ircd mods @echo "* make install *" @echo "*************************************" -install: ircd mods@EXTRA_DIR@ +install: allreal@EXTRA_DIR@ @-install -d -m $(INSTMODE) $(BASE) @-install -d -m $(INSTMODE) $(LIBPATH) @-install -d -m $(INSTMODE) $(BINPATH) @-install -d -m $(INSTMODE) $(CONPATH) @-install -d -m $(INSTMODE) $(MODPATH) -install -m $(INSTMODE) @STARTSCRIPT@ $(@DESTINATION@) 2>/dev/null -@INSTALL_LIST@ @echo "" +@INSTALL_LIST@ -install -m $(INSTMODE) src/inspircd $(BINPATH) + @echo "" @echo "*************************************" @echo "* INSTALL COMPLETE! *" @echo "* *" @@ -128,6 +134,7 @@ modclean: rm -f src/modules/*/*.o deinstall: + -rm $(BINPATH)/inspircd @UNINSTALL_LIST@ squeakyclean: distclean |