X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=.Makefile.inc;h=1d816a57bc8e0f6e17bc2c194dd351d63d3adbb5;hb=944d154befc9e27b121d221074f4b24af500011b;hp=4d8b948550594a9bb7453f4bca7a95807e04238c;hpb=df167bf4ac944ad8c679d2b2751fcf94adc8c714;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/.Makefile.inc b/.Makefile.inc index 4d8b94855..1d816a57b 100644 --- a/.Makefile.inc +++ b/.Makefile.inc @@ -1,53 +1,96 @@ -# InspIRCd Main Makefile +# InspIRCd Main Makefile # -# (C) InspIRCd Development Team, 2002-2007 +# (C) InspIRCd Development Team, 2002-2009 # This file is automagically generated by configure, from -# .Makefile.inc. Any changes made will go away! :P -# Please do not edit unless you know what you're doing. +# .Makefile.inc. Any changes make will go away! +# Please do not edit unless you know what you're doing. # +@GNU_ONLY MAKESTYLE = gnu +@GNU_ONLY COMPILE_ROOT ?= $(shell pwd) +@BSD_ONLY MAKESTYLE = bsd +@BSD_ONLY COMPILE_ROOT != pwd + +@IFDEF D + NICEFLAGS = @DEVELOPER@ + HEADER = debug-header +@ENDIF + +NICEFLAGS ?= @FLAGS@ +HEADER ?= std-header + +NICEFLAGS += -I$(COMPILE_ROOT)/include + CC = @CC@ -MAKE = @MAKEPROG@ -PROGS = inspircd -NICEFLAGS = @FLAGS@ FLAGS = $(NICEFLAGS) -pedantic -NICEDEBUG = @DEVELOPER@ -DEBUG = $(NICEDEBUG) -pedantic +PICLDFLAGS = -fPIC -DPIC -shared -export-dynamic +CORE_FLAGS = @CORE_FLAGS@ LDLIBS = @LDLIBS@ -BASE = $(DESTDIR)@BASE_DIR@ -CONPATH = $(DESTDIR)@CONFIG_DIR@ -MODPATH = $(DESTDIR)@MODULE_DIR@ -BINPATH = $(DESTDIR)@BINARY_DIR@ -LAUNCHDPATH = $(DESTDIR)/System/Library/LaunchDaemons -LIBPATH = $(DESTDIR)@LIBRARY_DIR@ -MODULES = @MODULES@ +BASE = "@BASE_DIR@" +CONPATH = "@CONFIG_DIR@" +MODPATH = "@MODULE_DIR@" +BINPATH = "@BINARY_DIR@" +LAUNCHDPATH = "/System/Library/LaunchDaemons" +LIBPATH = "@LIBRARY_DIR@" INSTMODE = 0755 -MAKEARGS = 'PROGS=${PROGS}' 'FLAGS=${FLAGS}' 'NICEFLAGS=${NICEFLAGS}' 'CC=${CC}' 'LDLIBS=${LDLIBS}' 'MODULES=${MODULES}' 'MODPATH=${MODPATH}' 'LIBPATH=${LIBPATH}' 'INSTMODE=${INSTMODE}' +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 + +@DO_EXPORT RUNCC FLAGS NICEFLAGS CC LDLIBS PICLDFLAGS VERBOSE SOCKETENGINE CORE_FLAGS + +# Default target + +@IFDEF M + _all: module +@ENDIF -all: @MAKEORDER@ finishmessage +all: finishmessage + +alldep: $(HEADER) + @echo -n "Generating module dependencies..." + @$(MAKEENV) $(MAKE) -C src -f ../make/$(MAKESTYLE)-dep.mk alldep + @echo 'done' + +allreal: alldep + @$(MAKEENV) $(MAKE) -C src -f ../make/$(MAKESTYLE)-real.mk all debug: - @echo "" + @${MAKE} D=1 all + +debug-header: @echo "*************************************" @echo "* BUILDING WITH DEBUG SYMBOLS *" @echo "* *" + @echo "* This will take a *long* time. *" @echo "* Please be aware that this build *" @echo "* will consume a very large amount *" - @echo "* of disk space (350mb+) and may *" - @echo "* run noticably slower. Only build *" - @echo "* InspIRCd with debug symbols if *" - @echo "* you are developing modules or are *" - @echo "* experiencing problems. *" + @echo "* of disk space (150MB+), and can *" + @echo "* run slower. Use the debug build *" + @echo "* for module development or if you *" + @echo "* are experiencing problems. *" @echo "* *" @echo "*************************************" - @${MAKE} -C . 'FLAGS=${DEBUG}' 'NICEFLAGS=${NICEDEBUG}' all -mods: - @echo "Making modules..." - @${MAKE} -C src/modules DIRNAME="src/modules" $(MAKEARGS) +std-header: + @echo "*************************************" + @echo "* BUILDING INSPIRCD *" + @echo "* *" + @echo "* This will take a *long* time. *" + @echo "* Why not read our wiki at *" + @echo "* http://wiki.inspircd.org *" + @echo "* while you wait for make to run? *" + @echo "*************************************" -# 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! *" @@ -56,25 +99,17 @@ finishmessage: ircd mods @echo "* make install *" @echo "*************************************" -ircd: - @echo "*************************************" - @echo "* BUILDING INSPIRCD *" - @echo "* *" - @echo "* This will take a *long* time. *" - @echo "* Why not read our wiki at *" - @echo "* http://www.inspircd.org/wiki *" - @echo "* while you wait for make to run? *" - @echo "*************************************" - @${MAKE} -C src DIRNAME="src" $(MAKEARGS) - -install: all@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) src/commands/*.so $(LIBPATH) + -install -m $(INSTMODE) src/modules/*.so $(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 "* *" @@ -85,23 +120,27 @@ install: all@EXTRA_DIR@ @echo "*************************************" module: - @${MAKE} -C src/modules DIRNAME="src/modules" $(MAKEARGS) ${name} + @BSD_ONLY @${MAKE} -C src/modules $(MAKEARGS) ${M:S/.so$//}.so + @GNU_ONLY @${MAKE} -C src/modules $(MAKEARGS) $(M:.so=).so clean: @echo Cleaning... - @rm -rvf src/*.so src/*.dylib src/*.o src/inspircd src/modules/*.so src/modules/*.o *~ src/*~ src/modules/*~ src/modules/extra/*~ src/modes/*~ src/modes/*.o src/modes/*.a src/commands/*.so src/commands/*.o src/modules/*/*.o src/modules/*/*.so src/socketengines/*.o + @rm -f src/inspircd src/modes/modeclasses.a + @rm -f src/*.so src/modules/*.so src/commands/*.so src/modules/*/*.so + @rm -f src/*.o src/*/*.o src/modules/*/*.o + @rm -f src/.*.d src/*/.*.d src/modules/*/.*.d @echo Completed. modclean: - rm -rf modules/*.so - rm -rf src/modules/*.so - rm -rf src/modules/*.o - rm -rf src/modules/*/*.so - rm -rf src/modules/*/*.o - rm -rf lib/*.so - rm -f bin/inspircd + rm -f src/modules/*.so + rm -f src/modules/*.o + rm -f src/modules/*/*.so + rm -f src/modules/*/*.o deinstall: + -rm $(BINPATH)/inspircd + -rm $(LIBPATH)/*.so + -rm $(MODPATH)/*.so @UNINSTALL_LIST@ squeakyclean: distclean @@ -111,11 +150,38 @@ launchd_dir: configureclean: rm -f .config.cache - rm src/modules/Makefile - rm src/Makefile - rm Makefile - rm include/inspircd_config.h - rm include/inspircd_se_config.h + rm -f src/modules/Makefile + rm -f src/commands/Makefile + rm -f src/Makefile + -rm -f Makefile + rm -f BSDmakefile + rm -f GNUmakefile + rm -f include/inspircd_config.h + rm -f include/inspircd_se_config.h distclean: modclean clean configureclean +help: + @echo 'InspIRCd Makefile' + @echo '' + @echo 'Use: ${MAKE} [flags] [targets]' + @echo '' + @echo 'Flags:' + @echo ' V=1 Show the full command being executed instead of "BUILD: dns.cpp"' + @echo ' D=1 Enable debug build, for module development or crash tracing' + @echo ' -j Run a parallel build using N jobs' + @echo '' + @echo 'User targets:' + @echo ' all Complete build of InspIRCd, without installing' + @echo ' install Build and install InspIRCd to the directory chosen in ./configure' + @echo ' Currently installs to ${BASE}' + @echo ' debug Compile a debug build. Equivalent to "make D=1 all"' + @echo ' module Builds a single module, which is specified by "M=m_modname"' + @echo ' The command "make M=m_modname" is a shortcut for this target' + @echo '' + @echo ' clean Cleans object files produced by the compile' + @echo ' distclean Cleans all files produced by compile and ./configure' + @echo ' deinstall Removes the files created by "make install"' + @echo + +.PHONY: all help debug debug-header std-header ircd mods finishmessage install module clean modclean deinstall squeakyclean launchd_dir configureclean