1 # InspIRCd Main Makefile
3 # (C) InspIRCd Development Team, 2002-2009
4 # This file is automagically generated by configure, from
5 # .Makefile.inc. Any changes make will go away!
6 # Please do not edit unless you know what you're doing.
9 @GNU_ONLY COMPILE_ROOT = $(shell pwd)
10 @BSD_ONLY COMPILE_ROOT != pwd
13 NICEFLAGS = @DEVELOPER@
20 NICEFLAGS += -I$(COMPILE_ROOT)/include
23 FLAGS = $(NICEFLAGS) -pedantic
26 CONPATH = "@CONFIG_DIR@"
27 MODPATH = "@MODULE_DIR@"
28 BINPATH = "@BINARY_DIR@"
29 LAUNCHDPATH = "/System/Library/LaunchDaemons"
30 LIBPATH = "@LIBRARY_DIR@"
33 @GNU_ONLY MAKEFLAGS += --no-print-directory
38 @GNU_ONLY MAKEFLAGS += --silent
39 RUNCC = $(COMPILE_ROOT)/make/run-cc.pl $(CC)
42 @GNU_ONLY export COMPILE_ROOT RUNCC FLAGS NICEFLAGS CC LDLIBS MODULES MODPATH LIBPATH INSTMODE
43 @BSD_ONLY MAKEARGS = -s 'RUNCC=${RUNCC}' 'FLAGS=${FLAGS}' 'NICEFLAGS=${NICEFLAGS}' 'CC=${CC}' 'LDLIBS=${LDLIBS}' 'MODULES=${MODULES}' 'MODPATH=${MODPATH}' 'LIBPATH=${LIBPATH}' 'INSTMODE=${INSTMODE}'
51 all: ircd mods finishmessage
57 @echo "*************************************"
58 @echo "* BUILDING WITH DEBUG SYMBOLS *"
60 @echo "* This will take a *long* time. *"
61 @echo "* Please be aware that this build *"
62 @echo "* will consume a very large amount *"
63 @echo "* of disk space (150MB+), and can *"
64 @echo "* run slower. Use the debug build *"
65 @echo "* for module development or if you *"
66 @echo "* are experiencing problems. *"
68 @echo "*************************************"
71 @echo "*************************************"
72 @echo "* BUILDING INSPIRCD *"
74 @echo "* This will take a *long* time. *"
75 @echo "* Why not read our wiki at *"
76 @echo "* http://wiki.inspircd.org *"
77 @echo "* while you wait for make to run? *"
78 @echo "*************************************"
81 @${MAKE} -C src $(MAKEARGS) inspircd commands
84 @${MAKE} -C src/modules $(MAKEARGS)
86 # Make this depend on 'ircd' and 'mods', so its always output last even with -j
87 finishmessage: ircd mods
89 @echo "*************************************"
90 @echo "* BUILD COMPLETE! *"
92 @echo "* To install InspIRCd, type: *"
93 @echo "* make install *"
94 @echo "*************************************"
96 install: ircd mods@EXTRA_DIR@
97 @-install -d -m $(INSTMODE) $(BASE)
98 @-install -d -m $(INSTMODE) $(LIBPATH)
99 @-install -d -m $(INSTMODE) $(BINPATH)
100 @-install -d -m $(INSTMODE) $(CONPATH)
101 @-install -d -m $(INSTMODE) $(MODPATH)
102 -install -m $(INSTMODE) @STARTSCRIPT@ $(@DESTINATION@) 2>/dev/null
103 @INSTALL_LIST@ @echo ""
104 @echo "*************************************"
105 @echo "* INSTALL COMPLETE! *"
107 @echo "* It is safe to ignore any messages *"
108 @echo "* related to copying of conf files. *"
110 @echo "* REMEMBER TO EDIT YOUR CONFIG FILE *"
111 @echo "*************************************"
114 @BSD_ONLY @${MAKE} -C src/modules $(MAKEARGS) ${M:S/.so$//}.so
115 @GNU_ONLY @${MAKE} -C src/modules $(MAKEARGS) $(M:.so=).so
119 @rm -f src/inspircd src/modes/modeclasses.a
120 @rm -f src/*.so src/modules/*.so src/commands/*.so src/modules/*/*.so
121 @rm -f src/*.o src/*/*.o src/modules/*/*.o
125 rm -f src/modules/*.so
126 rm -f src/modules/*.o
127 rm -f src/modules/*/*.so
128 rm -f src/modules/*/*.o
133 squeakyclean: distclean
136 @-install -d -m $(INSTMODE) ${LAUNCHDPATH}
140 rm -f src/modules/Makefile
141 rm -f src/commands/Makefile
146 rm -f include/inspircd_config.h
147 rm -f include/inspircd_se_config.h
149 distclean: modclean clean configureclean
152 @echo 'InspIRCd Makefile'
154 @echo 'Use: ${MAKE} [flags] [targets]'
157 @echo ' V=1 Show the full command being executed instead of "BUILD: dns.cpp"'
158 @echo ' D=1 Enable debug build, for module development or crash tracing'
159 @echo ' -j <N> Run a parallel build using N jobs'
161 @echo 'User targets:'
162 @echo ' all Complete build of InspIRCd, without installing'
163 @echo ' install Build and install InspIRCd to the directory chosen in ./configure'
164 @echo ' Currently installs to ${BASE}'
165 @echo ' debug Compile a debug build. Equivalent to "make D=1 all"'
166 @echo ' module Builds a single module, which is specified by "M=m_modname"'
167 @echo ' The command "make M=m_modname" is a shortcut for this target'
169 @echo ' clean Cleans object files produced by the compile'
170 @echo ' distclean Cleans all files produced by compile and ./configure'
171 @echo ' deinstall Removes the files created by "make install"'
174 .PHONY: all help debug debug-header std-header ircd mods finishmessage install module clean modclean deinstall squeakyclean launchd_dir configureclean