1 |
# |
2 |
# This is the Makefile for EGGDROP (the irc bot) |
3 |
# You should never need to edit this. |
4 |
# |
5 |
|
6 |
SHELL = /bin/sh |
7 |
|
8 |
prefix = @prefix@ |
9 |
DEST = @DEST@ |
10 |
EGGEXEC = @EGGEXEC@ |
11 |
EGGVERSION = @EGGVERSION@ |
12 |
|
13 |
# things you can put here: |
14 |
# -Wall if you're using gcc and it supports it (configure |
15 |
# usually detects this anyway now) |
16 |
# -DEBUG_MEM to be able to debug memory allocation (.debug) |
17 |
# this can now be set by using 'make debugmem' |
18 |
CFLGS = |
19 |
|
20 |
# configure SHOULD set these...you may need to tweak them to get modules |
21 |
# to compile .. if you do...let the devel-team know the working settings |
22 |
# btw to turn STRIP off, do 'STRIP = touch' not 'STRIP =' |
23 |
|
24 |
# defaults |
25 |
CC = @CC@ |
26 |
LD = @CC@ |
27 |
STRIP = @STRIP@ |
28 |
RANLIB = @RANLIB@ |
29 |
|
30 |
# make eggmod |
31 |
MOD_CC = @MOD_CC@ |
32 |
MOD_LD = @MOD_LD@ |
33 |
MOD_STRIP = @MOD_STRIP@ |
34 |
|
35 |
# make modules |
36 |
SHLIB_CC = @SHLIB_CC@ |
37 |
SHLIB_LD = @SHLIB_LD@ |
38 |
SHLIB_STRIP = @SHLIB_STRIP@ |
39 |
|
40 |
# programs make install uses |
41 |
LN_S = @LN_S@ |
42 |
INSTALL = @INSTALL@ |
43 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
44 |
INSTALL_DATA = @INSTALL_DATA@ |
45 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
46 |
|
47 |
# STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP # |
48 |
# - - - - - - - - do not edit anything below this line. - - - - - - - - # |
49 |
# - - - - - - - - - it's all done by configure now. - - - - - - - - - # |
50 |
# STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP # |
51 |
|
52 |
# stuff for Tcl |
53 |
XREQ = @T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'RANLIB=$(RANLIB)' 'CFLAGS=-g3 $(CFLAGS) -DEBUG_MEM' \ |
79 |
'CPPFLAGS=$(CPPFLAGS)' 'EGGEXEC=$(EGGEXEC)' 'TCLLIB=$(TCLLIB)' \ |
80 |
'XREQ=$(XREQ)' 'XLIBS=@TCL_LIBS@ @LIBS@' |
81 |
|
82 |
MAKE_DEBMODULES = $(MAKE) 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \ |
83 |
'STRIP=touch' 'CFLAGS=-g3 $(CFLAGS) -DEBUG_MEM' 'CPPFLAGS=$(CPPFLAGS)' |
84 |
|
85 |
MAKE_INSTALL = $(MAKE) 'DEST=$(DEST)' |
86 |
|
87 |
all: @DEFAULT_MAKE@ |
88 |
|
89 |
clean: |
90 |
@rm -f $(EGGEXEC) *.so *.stamp core DEBUG *~ |
91 |
@cd doc; $(MAKE) clean |
92 |
@cd scripts; $(MAKE) clean |
93 |
@cd src; $(MAKE) clean |
94 |
@cd src/md5; $(MAKE) clean |
95 |
@cd src/mod; $(MAKE) clean |
96 |
|
97 |
distclean: clean |
98 |
@rm -f Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/mod/Makefile |
99 |
@rm -f config.cache config.log config.status config.h lush.h |
100 |
|
101 |
distrib: distclean |
102 |
@rm -f `find . \( -name '*~' -o -name '*#' -o -name '*.orig' \ |
103 |
-o -name '*.rej' -o -name '*.bak' \) -print` |
104 |
@rm -rf `find . \( -name "CVS" \) -print` |
105 |
@(echo "all:"; \ |
106 |
echo " @echo \"\""; \ |
107 |
echo " @echo \"Before you can compile your bot you have to configure it.\""; \ |
108 |
echo " @echo \"So please start the configure script now:\""; \ |
109 |
echo " @echo \"\""; \ |
110 |
echo " @echo \" % ./configure\""; \ |
111 |
echo " @echo \"\""; ) > Makefile |
112 |
|
113 |
eggdrop: modegg modules |
114 |
|
115 |
modegg: modtest |
116 |
@cd src; $(MAKE_MODEGG) modegg |
117 |
@echo "" |
118 |
@./$(EGGEXEC) -v |
119 |
@ls -l $(EGGEXEC) |
120 |
|
121 |
modules: modtest |
122 |
@cd src/mod; $(MAKE_MODULES) modules |
123 |
@echo "" |
124 |
@echo "modules made:" |
125 |
@ls -l *.so |
126 |
|
127 |
static: eggtest |
128 |
@echo "" |
129 |
@echo "Making module objects for static linking..." |
130 |
@echo "" |
131 |
@cd src/mod; $(MAKE_STATIC) static |
132 |
@echo "" |
133 |
@echo "Making core eggdrop for static linking..." |
134 |
@echo "" |
135 |
@cd src; $(MAKE_STATIC) static |
136 |
@echo "" |
137 |
@./$(EGGEXEC) -v |
138 |
@ls -l $(EGGEXEC) |
139 |
|
140 |
debugmem: memegg debmodules |
141 |
|
142 |
memegg: modtest |
143 |
@cd src; $(MAKE_MEMEGG) memegg |
144 |
@echo "" |
145 |
@./$(EGGEXEC) -v |
146 |
@ls -l $(EGGEXEC) |
147 |
|
148 |
debmodules: modtest |
149 |
@cd src/mod; $(MAKE_DEBMODULES) modules |
150 |
@echo "" |
151 |
@echo "modules made:" |
152 |
@ls -l *.so |
153 |
|
154 |
sdebug: eggtest |
155 |
@echo "" |
156 |
@echo "Making module objects for static linking..." |
157 |
@echo "" |
158 |
@cd src/mod; $(MAKE_SDEBUG) static |
159 |
@echo "" |
160 |
@echo "Making core eggdrop for static linking..." |
161 |
@echo "" |
162 |
@cd src; $(MAKE_SDEBUG) sdebug |
163 |
@echo "" |
164 |
@./$(EGGEXEC) -v |
165 |
@ls -l $(EGGEXEC) |
166 |
|
167 |
eggtest: |
168 |
@if [ -f EGGMOD.stamp ]; then \ |
169 |
echo "You're trying to do a STATIC build of eggdrop when you've";\ |
170 |
echo "already run 'make' for a module build.";\ |
171 |
echo "You must first type \"make clean\" before you can build";\ |
172 |
echo "a static version.";\ |
173 |
exit 1;\ |
174 |
fi |
175 |
@echo "stamp" >EGGDROP.stamp |
176 |
|
177 |
modtest: |
178 |
@if [ -f EGGDROP.stamp ]; then \ |
179 |
echo "You're trying to do a MODULE build of eggdrop when you've";\ |
180 |
echo "already run 'make' for a static build.";\ |
181 |
echo "You must first type \"make clean\" before you can build";\ |
182 |
echo "a module version.";\ |
183 |
exit 1;\ |
184 |
fi |
185 |
@echo "stamp" >EGGMOD.stamp |
186 |
|
187 |
install: ainstall |
188 |
|
189 |
dinstall: eggdrop ainstall |
190 |
|
191 |
sinstall: static ainstall |
192 |
|
193 |
ainstall: install-start install-bin install-modules install-data \ |
194 |
install-help install-language install-filesys install-doc \ |
195 |
install-scripts install-end |
196 |
|
197 |
install-start: |
198 |
@if test ! -f $(EGGEXEC); then \ |
199 |
echo ""; \ |
200 |
echo "You haven't compiled eggdrop yet."; \ |
201 |
echo "To compile eggdrop use:"; \ |
202 |
echo " make <target>"; \ |
203 |
echo ""; \ |
204 |
echo " valid targets: eggdrop static debug sdebug"; \ |
205 |
echo ""; \ |
206 |
exit 1; \ |
207 |
fi |
208 |
@if test "x$(DEST)" = "x"; then \ |
209 |
echo "You must specify a destination directory with DEST="; \ |
210 |
exit 1; \ |
211 |
fi |
212 |
@echo "" |
213 |
@./$(EGGEXEC) -v |
214 |
@echo |
215 |
@echo "Installing in directory: '$(DEST)'." |
216 |
@echo |
217 |
@if test ! -d $(DEST); then \ |
218 |
echo "Creating directory: $(DEST)."; \ |
219 |
$(INSTALL) -d $(DEST); \ |
220 |
fi |
221 |
|
222 |
install-bin: |
223 |
@if test -f $(DEST)/$(EGGEXEC); then \ |
224 |
rm -f $(DEST)/o$(EGGEXEC); \ |
225 |
fi |
226 |
@if test -h $(DEST)/$(EGGEXEC); then \ |
227 |
echo "Removing symlink to archival eggdrop binary."; \ |
228 |
rm -f $(DEST)/$(EGGEXEC); \ |
229 |
fi |
230 |
@if test -f $(DEST)/$(EGGEXEC); then \ |
231 |
echo "Renamed the old '$(EGGEXEC)' executable to 'o$(EGGEXEC)'."; \ |
232 |
mv -f $(DEST)/$(EGGEXEC) $(DEST)/o$(EGGEXEC); \ |
233 |
fi |
234 |
@echo "Copying new '$(EGGEXEC)' executable and creating symlink." |
235 |
@$(INSTALL_PROGRAM) $(EGGEXEC) $(DEST)/$(EGGEXEC)-$(EGGVERSION) |
236 |
@(cd $(DEST) && $(LN_S) $(EGGEXEC)-$(EGGVERSION) $(EGGEXEC)) |
237 |
|
238 |
install-modules: |
239 |
@if test -h $(DEST)/modules; then \ |
240 |
echo "Removing symlink to archival modules directory."; \ |
241 |
rm -f $(DEST)/modules; \ |
242 |
fi |
243 |
@if test -d $(DEST)/modules; then \ |
244 |
echo "Moving old modules into 'modules.old' directory."; \ |
245 |
rm -rf $(DEST)/modules.old; \ |
246 |
mv -f $(DEST)/modules $(DEST)/modules.old; \ |
247 |
fi |
248 |
@if test ! "x`echo *.so`" = "x*.so"; then \ |
249 |
if test ! -d $(DEST)/modules-$(EGGVERSION); then \ |
250 |
echo "Creating modules-$(EGGVERSION) directory and symlink."; \ |
251 |
$(INSTALL) -d $(DEST)/modules-$(EGGVERSION); \ |
252 |
fi; \ |
253 |
(cd $(DEST) && $(LN_S) modules-$(EGGVERSION) modules); \ |
254 |
echo "Copying new modules."; \ |
255 |
for i in *.so; do \ |
256 |
$(INSTALL_PROGRAM) $$i $(DEST)/modules-$(EGGVERSION)/; \ |
257 |
done; \ |
258 |
fi |
259 |
|
260 |
install-data: |
261 |
@$(INSTALL_DATA) eggdrop.conf.dist $(DEST) |
262 |
@if test ! -f $(DEST)/motd; then \ |
263 |
$(INSTALL_DATA) motd $(DEST); \ |
264 |
fi |
265 |
@if test ! -f $(DEST)/telnet-banner; then \ |
266 |
$(INSTALL_DATA) telnet-banner $(DEST); \ |
267 |
fi |
268 |
|
269 |
install-help: |
270 |
@echo "Copying help files." |
271 |
@if test ! "x`echo help/*.help`" = "xhelp/*.help"; then \ |
272 |
if test ! -d $(DEST)/help; then \ |
273 |
echo "Creating 'help' subdirectory."; \ |
274 |
$(INSTALL) -d $(DEST)/help; \ |
275 |
fi; \ |
276 |
for i in help/*.help; do \ |
277 |
$(INSTALL_DATA) $$i $(DEST)/help/; \ |
278 |
done; \ |
279 |
fi |
280 |
@if test ! "x`echo help/msg/*.help`" = "xhelp/msg/*.help"; then \ |
281 |
if test ! -d $(DEST)/help/msg; then \ |
282 |
echo "Creating 'help/msg' subdirectory."; \ |
283 |
$(INSTALL) -d $(DEST)/help/msg; \ |
284 |
fi; \ |
285 |
for i in help/msg/*.help; do \ |
286 |
$(INSTALL_DATA) $$i $(DEST)/help/msg/; \ |
287 |
done; \ |
288 |
fi |
289 |
@if test ! "x`echo help/set/*.help`" = "xhelp/set/*.help"; then \ |
290 |
if test ! -d $(DEST)/help/set; then \ |
291 |
echo "Creating 'help/set' subdirectory."; \ |
292 |
$(INSTALL) -d $(DEST)/help/set; \ |
293 |
fi; \ |
294 |
for i in help/set/*.help; do \ |
295 |
$(INSTALL_DATA) $$i $(DEST)/help/set/; \ |
296 |
done; \ |
297 |
fi |
298 |
@cd src/mod/; $(MAKE_INSTALL) install-help |
299 |
|
300 |
install-language: |
301 |
@echo "Copying language files." |
302 |
@if test ! "x`echo language/*.lang`" = "xlanguage/*.lang"; then \ |
303 |
if test ! -d $(DEST)/language; then \ |
304 |
echo "Creating 'language' subdirectory."; \ |
305 |
$(INSTALL) -d $(DEST)/language; \ |
306 |
fi; \ |
307 |
for i in language/*.lang; do \ |
308 |
$(INSTALL_DATA) $$i $(DEST)/language/; \ |
309 |
done; \ |
310 |
fi |
311 |
@cd src/mod/; $(MAKE_INSTALL) install-language |
312 |
|
313 |
install-filesys: |
314 |
@if test ! -d $(DEST)/filesys; then \ |
315 |
echo "Creating a skeletal filesys subdirectory."; \ |
316 |
$(INSTALL) -d $(DEST)/filesys; \ |
317 |
$(INSTALL) -d $(DEST)/filesys/incoming; \ |
318 |
fi |
319 |
|
320 |
install-doc: |
321 |
@$(INSTALL_DATA) README $(DEST) |
322 |
@cd doc/; $(MAKE_INSTALL) install |
323 |
|
324 |
install-scripts: |
325 |
@cd scripts/; $(MAKE_INSTALL) install |
326 |
|
327 |
install-end: |
328 |
@echo |
329 |
@echo "Installation completed." |
330 |
@echo "" |
331 |
@echo "You MUST ensure that you edit/verify your configuration file." |
332 |
@echo "'eggdrop.conf.dist' lists current options." |
333 |
@echo "" |
334 |
@echo "Remember to change directory to $(DEST) before you proceed." |
335 |
@echo "" |
336 |
|
337 |
#safety hash |