]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - .Makefile.inc
Hooray unused variables. Thanks MSVC.
[user/henk/code/inspircd.git] / .Makefile.inc
index 3e60143f71800acfb7d106fa64e04f738544f0cf..76c9b01f9b96d99542c671f0a880a2fc32b992d4 100644 (file)
@@ -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)
     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@
@@ -147,4 +148,27 @@ configureclean:
 
 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 <N>    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