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.
11 SOCKETENGINE = @SOCKETENGINE@
12 CXXFLAGS += -pipe -fPIC -DPIC
13 LDLIBS = -pthread -lstdc++
15 SHARED = -shared -rdynamic
16 CORELDFLAGS = -rdynamic -L. $(LDFLAGS)
17 PICLDFLAGS = -fPIC -shared -rdynamic $(LDFLAGS)
19 CONPATH = "@CONFIG_DIR@"
20 MODPATH = "@MODULE_DIR@"
21 BINPATH = "@BINARY_DIR@"
22 LAUNCHDPATH = "/System/Library/LaunchDaemons"
28 CXXFLAGS += -pedantic -Woverloaded-virtual -Wshadow -Wformat=2 -Wmissing-format-attribute -Wall
34 @ELSIFEQ $(SYSTEM) solaris
35 LDLIBS += -lsocket -lnsl -lrt -lresolv
36 @ELSIFEQ $(SYSTEM) sunos
37 LDLIBS += -lsocket -lnsl -lrt -lresolv
38 @ELSIFEQ $(SYSTEM) darwin
39 CXXFLAGS += -DDARWIN -frtti
41 SHARED = -bundle -twolevel_namespace -undefined dynamic_lookup
42 CORE_FLAGS = -dynamic -bind_at_load -L.
52 FOOTER = finishmessage
54 CXXFLAGS += -I../include
56 @GNU_ONLY MAKEFLAGS += --no-print-directory
62 @GNU_ONLY MAKEFLAGS += --silent
64 RUNCC = ../make/run-cc.pl $(CC)
67 @DO_EXPORT RUNCC CXXFLAGS CC LDLIBS PICLDFLAGS VERBOSE SOCKETENGINE CORELDFLAGS
68 @DO_EXPORT BASE CONPATH MODPATH BINPATH
76 @BSD_ONLY TARGET = modules/${M:S/.so$//}.so
77 @GNU_ONLY TARGET = modules/$(M:.so=).so
89 @GNU_ONLY $(MAKEENV) $(MAKE) -C src -f ../make/gnu-real.mk $(TARGET)
90 @BSD_ONLY $(MAKEENV) $(MAKE) -C src -f ../make/bsd-real.mk $(TARGET)
96 @echo "*************************************"
97 @echo "* BUILDING WITH DEBUG SYMBOLS *"
99 @echo "* This will take a *long* time. *"
100 @echo "* Please be aware that this build *"
101 @echo "* will consume a very large amount *"
102 @echo "* of disk space (150MB+), and can *"
103 @echo "* run slower. Use the debug build *"
104 @echo "* for module development or if you *"
105 @echo "* are experiencing problems. *"
107 @echo "*************************************"
110 @echo 'Building single module:'
113 @echo 'To install, copy src/$(TARGET) to $(MODPATH)'
114 @echo 'Or, run "make install"'
117 @echo "*************************************"
118 @echo "* BUILDING INSPIRCD *"
120 @echo "* This will take a *long* time. *"
121 @echo "* Why not read our wiki at *"
122 @echo "* http://wiki.inspircd.org *"
123 @echo "* while you wait for make to run? *"
124 @echo "*************************************"
126 finishmessage: target
128 @echo "*************************************"
129 @echo "* BUILD COMPLETE! *"
131 @echo "* To install InspIRCd, type: *"
132 @echo "* make install *"
133 @echo "*************************************"
135 install: target@EXTRA_DIR@
136 @-install -d -m $(INSTMODE) $(BASE)
137 @-install -d -m $(INSTMODE) $(BINPATH)
138 @-install -d -m $(INSTMODE) $(CONPATH)
139 @-install -d -m $(INSTMODE) $(MODPATH)
140 -install -m $(INSTMODE) src/commands/*.so $(MODPATH)
141 -install -m $(INSTMODE) src/modules/*.so $(MODPATH)
142 -install -m $(INSTMODE) @STARTSCRIPT@ $(@DESTINATION@) 2>/dev/null
143 -install -m $(INSTMODE) src/inspircd $(BINPATH)
144 @$(MAKEENV) make/install-extras.pl install
146 @echo "*************************************"
147 @echo "* INSTALL COMPLETE! *"
149 @echo "* It is safe to ignore any messages *"
150 @echo "* related to copying of conf files. *"
152 @echo "* REMEMBER TO EDIT YOUR CONFIG FILE *"
153 @echo "*************************************"
157 @rm -f src/inspircd src/modes/modeclasses.a
158 @rm -f src/*.so src/modules/*.so src/commands/*.so src/modules/*/*.so
159 @rm -f src/*.o src/*/*.o src/modules/*/*.o
160 @rm -f src/.*.d src/*/.*.d src/modules/*/.*.d
164 -rm $(BINPATH)/inspircd
166 @make/install-extras.pl deinstall
168 squeakyclean: distclean
171 @-install -d -m $(INSTMODE) ${LAUNCHDPATH}
175 rm -f src/modules/Makefile
176 rm -f src/commands/Makefile
181 rm -f include/inspircd_config.h
182 rm -f include/inspircd_se_config.h
184 distclean: clean configureclean
187 @echo 'InspIRCd Makefile'
189 @echo 'Use: ${MAKE} [flags] [targets]'
192 @echo ' V=1 Show the full command being executed instead of "BUILD: dns.cpp"'
193 @echo ' D=1 Enable debug build, for module development or crash tracing'
194 @echo ' -j <N> Run a parallel build using N jobs'
196 @echo 'User targets:'
197 @echo ' all Complete build of InspIRCd, without installing'
198 @echo ' install Build and install InspIRCd to the directory chosen in ./configure'
199 @echo ' Currently installs to ${BASE}'
200 @echo ' debug Compile a debug build. Equivalent to "make D=1 all"'
202 @echo ' M=m_foo Builds a single module'
203 @echo ' T=target Builds a user-specified target'
204 @echo ' Target can be a file path relative to src/, or one of:'
205 @echo ' inspircd commands modules'
206 @echo ' Multiple targets may be separated by a space'
208 @echo ' clean Cleans object files produced by the compile'
209 @echo ' distclean Cleans all files produced by compile and ./configure'
210 @echo ' Note: this includes the Makefile'
211 @echo ' deinstall Removes the files created by "make install"'
214 .PHONY: all target debug debug-header mod-header mod-footer std-header finishmessage install clean deinstall squeakyclean launchd_dir configureclean help