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 MAKESTYLE = gnu
10 @GNU_ONLY COMPILE_ROOT ?= $(shell pwd)
11 @BSD_ONLY MAKESTYLE = bsd
12 @BSD_ONLY COMPILE_ROOT != pwd
15 NICEFLAGS = @DEVELOPER@
22 NICEFLAGS += -I$(COMPILE_ROOT)/include
25 FLAGS = $(NICEFLAGS) -pedantic
26 PICLDFLAGS = -fPIC -DPIC -shared -export-dynamic
27 CORE_FLAGS = @CORE_FLAGS@
30 CONPATH = "@CONFIG_DIR@"
31 MODPATH = "@MODULE_DIR@"
32 BINPATH = "@BINARY_DIR@"
33 LAUNCHDPATH = "/System/Library/LaunchDaemons"
34 LIBPATH = "@LIBRARY_DIR@"
36 SOCKETENGINE = @SOCKETENGINE@
37 @GNU_ONLY MAKEFLAGS += --no-print-directory
43 @GNU_ONLY MAKEFLAGS += --silent
45 RUNCC = $(COMPILE_ROOT)/make/run-cc.pl $(CC)
48 @DO_EXPORT RUNCC FLAGS NICEFLAGS CC LDLIBS PICLDFLAGS VERBOSE SOCKETENGINE CORE_FLAGS
59 @echo -n "Generating module dependencies..."
60 @$(MAKEENV) $(MAKE) -C src -f ../make/$(MAKESTYLE)-dep.mk alldep
64 @$(MAKEENV) $(MAKE) -C src -f ../make/$(MAKESTYLE)-real.mk all
70 @echo "*************************************"
71 @echo "* BUILDING WITH DEBUG SYMBOLS *"
73 @echo "* This will take a *long* time. *"
74 @echo "* Please be aware that this build *"
75 @echo "* will consume a very large amount *"
76 @echo "* of disk space (150MB+), and can *"
77 @echo "* run slower. Use the debug build *"
78 @echo "* for module development or if you *"
79 @echo "* are experiencing problems. *"
81 @echo "*************************************"
84 @echo "*************************************"
85 @echo "* BUILDING INSPIRCD *"
87 @echo "* This will take a *long* time. *"
88 @echo "* Why not read our wiki at *"
89 @echo "* http://wiki.inspircd.org *"
90 @echo "* while you wait for make to run? *"
91 @echo "*************************************"
93 finishmessage: allreal
95 @echo "*************************************"
96 @echo "* BUILD COMPLETE! *"
98 @echo "* To install InspIRCd, type: *"
99 @echo "* make install *"
100 @echo "*************************************"
102 install: allreal@EXTRA_DIR@
103 @-install -d -m $(INSTMODE) $(BASE)
104 @-install -d -m $(INSTMODE) $(LIBPATH)
105 @-install -d -m $(INSTMODE) $(BINPATH)
106 @-install -d -m $(INSTMODE) $(CONPATH)
107 @-install -d -m $(INSTMODE) $(MODPATH)
108 -install -m $(INSTMODE) src/commands/*.so $(LIBPATH)
109 -install -m $(INSTMODE) src/modules/*.so $(MODPATH)
110 -install -m $(INSTMODE) @STARTSCRIPT@ $(@DESTINATION@) 2>/dev/null
111 @INSTALL_LIST@ -install -m $(INSTMODE) src/inspircd $(BINPATH)
113 @echo "*************************************"
114 @echo "* INSTALL COMPLETE! *"
116 @echo "* It is safe to ignore any messages *"
117 @echo "* related to copying of conf files. *"
119 @echo "* REMEMBER TO EDIT YOUR CONFIG FILE *"
120 @echo "*************************************"
123 @BSD_ONLY @${MAKE} -C src/modules $(MAKEARGS) ${M:S/.so$//}.so
124 @GNU_ONLY @${MAKE} -C src/modules $(MAKEARGS) $(M:.so=).so
128 @rm -f src/inspircd src/modes/modeclasses.a
129 @rm -f src/*.so src/modules/*.so src/commands/*.so src/modules/*/*.so
130 @rm -f src/*.o src/*/*.o src/modules/*/*.o
134 rm -f src/modules/*.so
135 rm -f src/modules/*.o
136 rm -f src/modules/*/*.so
137 rm -f src/modules/*/*.o
140 -rm $(BINPATH)/inspircd
145 squeakyclean: distclean
148 @-install -d -m $(INSTMODE) ${LAUNCHDPATH}
152 rm -f src/modules/Makefile
153 rm -f src/commands/Makefile
158 rm -f include/inspircd_config.h
159 rm -f include/inspircd_se_config.h
161 distclean: modclean clean configureclean
164 @echo 'InspIRCd Makefile'
166 @echo 'Use: ${MAKE} [flags] [targets]'
169 @echo ' V=1 Show the full command being executed instead of "BUILD: dns.cpp"'
170 @echo ' D=1 Enable debug build, for module development or crash tracing'
171 @echo ' -j <N> Run a parallel build using N jobs'
173 @echo 'User targets:'
174 @echo ' all Complete build of InspIRCd, without installing'
175 @echo ' install Build and install InspIRCd to the directory chosen in ./configure'
176 @echo ' Currently installs to ${BASE}'
177 @echo ' debug Compile a debug build. Equivalent to "make D=1 all"'
178 @echo ' module Builds a single module, which is specified by "M=m_modname"'
179 @echo ' The command "make M=m_modname" is a shortcut for this target'
181 @echo ' clean Cleans object files produced by the compile'
182 @echo ' distclean Cleans all files produced by compile and ./configure'
183 @echo ' deinstall Removes the files created by "make install"'
186 .PHONY: all help debug debug-header std-header ircd mods finishmessage install module clean modclean deinstall squeakyclean launchd_dir configureclean