X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=.Makefile.inc;h=76c9b01f9b96d99542c671f0a880a2fc32b992d4;hb=90ea385688339d21861166d7de840fc0494edcdb;hp=0a51ad40d0a9e9c6a50ce432bb425b25054c10e7;hpb=828011aeaf136e67fb69ce16fb4265667ccda008;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/.Makefile.inc b/.Makefile.inc index 0a51ad40d..76c9b01f9 100644 --- a/.Makefile.inc +++ b/.Makefile.inc @@ -1,9 +1,9 @@ -# InspIRCd Main Makefile +# InspIRCd Main Makefile # -# (C) InspIRCd Development Team, 2002-2009 +# (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 COMPILE_ROOT = $(shell pwd) @@ -14,13 +14,8 @@ HEADER = debug-header @ENDIF -@IFNDEF NICEFLAGS - NICEFLAGS = @FLAGS@ -@ENDIF - -@IFNDEF HEADER - HEADER = std-header -@ENDIF +NICEFLAGS ?= @FLAGS@ +HEADER ?= std-header NICEFLAGS += -I$(COMPILE_ROOT)/include @@ -47,6 +42,12 @@ INSTMODE = 0755 @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}' +# Default target + +@IFDEF M + _all: module +@ENDIF + all: ircd mods finishmessage debug: @@ -110,21 +111,21 @@ install: ircd mods@EXTRA_DIR@ @echo "*************************************" module: - @${MAKE} -C 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 -rf 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 @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: @UNINSTALL_LIST@ @@ -139,10 +140,35 @@ configureclean: rm -f src/modules/Makefile rm -f src/commands/Makefile rm -f src/Makefile - rm -f 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 -.PHONY: all debug debug-header std-header ircd mods finishmessage install module clean modclean deinstall squeakyclean launchd_dir 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