1 |
# |
2 |
# This is the Makefile for EGGDROP (the irc bot) |
3 |
# You should never need to edit this. |
4 |
# |
5 |
# $Id: Makefile.in,v 1.23 2000/07/23 20:47:12 fabian Exp $ |
6 |
|
7 |
SHELL = @SHELL@ |
8 |
top_srcdir = @top_srcdir@ |
9 |
srcdir = @srcdir@ |
10 |
VPATH = @srcdir@ |
11 |
|
12 |
@SET_MAKE@ |
13 |
prefix = @prefix@ |
14 |
DEST = @DEST@ |
15 |
EGGEXEC = @EGGEXEC@ |
16 |
EGGVERSION = @EGGVERSION@ |
17 |
|
18 |
# things you can put here: |
19 |
# -Wall if you're using gcc and it supports it |
20 |
# (configure usually detects this anyway now) |
21 |
# |
22 |
# -DDEBUG_ASSERT to enable assert debugging |
23 |
# -DDEBUG_MEM to be able to debug memory allocation (.debug) |
24 |
# These can both be set by using 'make debug' |
25 |
# or 'make sdebug' |
26 |
CFLGS = |
27 |
|
28 |
# configure SHOULD set these...you may need to tweak them to get modules |
29 |
# to compile .. if you do...let the devel-team know the working settings |
30 |
# btw to turn STRIP off, do 'STRIP = touch' not 'STRIP =' |
31 |
|
32 |
# defaults |
33 |
CC = @CC@ |
34 |
LD = @CC@ |
35 |
STRIP = @STRIP@ |
36 |
RANLIB = @RANLIB@ |
37 |
|
38 |
# make eggmod |
39 |
MOD_CC = @MOD_CC@ |
40 |
MOD_LD = @MOD_LD@ |
41 |
MOD_STRIP = @MOD_STRIP@ |
42 |
|
43 |
# make modules |
44 |
SHLIB_CC = @SHLIB_CC@ |
45 |
SHLIB_LD = @SHLIB_LD@ |
46 |
SHLIB_STRIP = @SHLIB_STRIP@ |
47 |
MOD_EXT = @MOD_EXT@ |
48 |
|
49 |
# programs make install uses |
50 |
LN_S = @LN_S@ |
51 |
INSTALL = @INSTALL@ |
52 |
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
53 |
INSTALL_DATA = @INSTALL_DATA@ |
54 |
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
55 |
|
56 |
# STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP # |
57 |
# - - - - - - - - do not edit anything below this line. - - - - - - - - # |
58 |
# - - - - - - - - - it's all done by configure now. - - - - - - - - - # |
59 |
# STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP # |
60 |
|
61 |
# stuff for Tcl |
62 |
XREQS = @TCL_REQS@ |
63 |
XLIBS = @TCL_LIBS@ @LIBS@ |
64 |
TCLLIB = @TCLLIB@ |
65 |
TCLLIBFN = @TCLLIBFN@ |
66 |
|
67 |
DEBCFLAGS = -DDEBUG_ASSERT -DDEBUG_MEM |
68 |
|
69 |
modconf = $(top_srcdir)/misc/modconfig --top_srcdir=$(top_srcdir) |
70 |
|
71 |
egg_test_run = EGG_LANGDIR=$(top_srcdir)/language ./$(EGGEXEC) -v |
72 |
|
73 |
post_config = echo "" && \ |
74 |
echo "You can now compile the bot, using \"make\"." && \ |
75 |
echo "" |
76 |
|
77 |
post_iconfig = $(modconf) update-depends && \ |
78 |
$(modconf) Makefile && \ |
79 |
(cd src/mod && $(MAKE_CONFIG) config) && \ |
80 |
$(modconf) Makefile |
81 |
|
82 |
egg_install_msg = echo "" && \ |
83 |
echo "Now run \"make install\" to install your bot." && \ |
84 |
echo "" |
85 |
|
86 |
MAKE_MODEGG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(MOD_CC)' 'LD=$(MOD_LD)' \ |
87 |
'STRIP=$(MOD_STRIP)' 'RANLIB=$(RANLIB)' 'CFLGS=$(CFLGS)' \ |
88 |
'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \ |
89 |
'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=' 'MODOBJS=' |
90 |
|
91 |
MAKE_MODULES = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \ |
92 |
'STRIP=$(SHLIB_STRIP)' 'CFLGS=$(CFLGS)' 'XLIBS=$(XLIBS)' 'MOD_EXT=$(MOD_EXT)' |
93 |
|
94 |
MAKE_STATIC = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD)' \ |
95 |
'STRIP=$(STRIP)' 'RANLIB=$(RANLIB)' 'CFLGS=$(CFLGS) -DSTATIC' \ |
96 |
'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \ |
97 |
'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(static version)' \ |
98 |
'MODOBJS=mod/*.o' |
99 |
|
100 |
MAKE_DEBEGG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(MOD_CC)' 'LD=$(MOD_LD) -g' \ |
101 |
'STRIP=touch' 'RANLIB=$(RANLIB)' 'CFLGS=-g3 $(DEBCFLAGS) $(CFLGS)' \ |
102 |
'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' \ |
103 |
'XLIBS=$(XLIBS)' 'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(debug version)' 'MODOBJS=' |
104 |
|
105 |
MAKE_DEBMODULES = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \ |
106 |
'XLIBS=$(XLIBS)' 'STRIP=touch' 'CFLGS=-g3 $(DEBCFLAGS) $(CFLGS)' \ |
107 |
'MOD_EXT=$(MOD_EXT)' |
108 |
|
109 |
MAKE_SDEBUG = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD) -g' \ |
110 |
'STRIP=touch' 'RANLIB=$(RANLIB)' 'CFLGS=-g3 $(DEBCFLAGS) -DSTATIC $(CFLGS)' \ |
111 |
'TCLLIB=$(TCLLIB)' 'TCLLIBFN=$(TCLLIBFN)' 'XREQS=$(XREQS)' 'XLIBS=$(XLIBS)' \ |
112 |
'EGGEXEC=$(EGGEXEC)' 'EGGBUILD=(static and debug version)' 'MODOBJS=mod/*.o' |
113 |
|
114 |
MAKE_DEPEND = $(MAKE) 'MAKE=$(MAKE)' 'CC=$(CC)' 'LD=$(LD)' \ |
115 |
'STRIP=$(STRIP)' 'CFLGS=$(CFLGS)' |
116 |
|
117 |
MAKE_CONFIG = $(MAKE) 'MAKE=$(MAKE)' |
118 |
|
119 |
MAKE_INSTALL = $(MAKE) 'MAKE=$(MAKE)' 'DEST=$(DEST)' |
120 |
|
121 |
all: @DEFAULT_MAKE@ |
122 |
|
123 |
eggclean: |
124 |
@rm -f $(EGGEXEC) *.$(MOD_EXT) *.stamp core DEBUG *~ |
125 |
@cd doc && $(MAKE) clean |
126 |
@cd scripts && $(MAKE) clean |
127 |
@cd src && $(MAKE) clean |
128 |
@cd src/md5 && $(MAKE) clean |
129 |
@cd src/compat && $(MAKE) clean |
130 |
|
131 |
clean: eggclean |
132 |
@cd src/mod && $(MAKE) clean |
133 |
|
134 |
distclean: eggclean clean-modconfig |
135 |
@cd src/mod && $(MAKE) distclean |
136 |
@rm -f Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/compat/Makefile src/mod/Makefile |
137 |
@rm -f config.cache config.log config.status config.h lush.h |
138 |
|
139 |
distrib: distclean |
140 |
@rm -f `find . \( -name '*~' -o -name '*#' -o -name '*.orig' \ |
141 |
-o -name '*.rej' -o -name '*.bak' \) -print` |
142 |
@rm -rf `find . \( -name 'CVS' \) -print` |
143 |
@(echo "all:"; \ |
144 |
echo " @echo \"\""; \ |
145 |
echo " @echo \"Before you can compile your bot you have to configure it.\""; \ |
146 |
echo " @echo \"So please start the configure script now:\""; \ |
147 |
echo " @echo \"\""; \ |
148 |
echo " @echo \" % ./configure\""; \ |
149 |
echo " @echo \"\""; ) > Makefile |
150 |
|
151 |
depend: |
152 |
@cat /dev/null > lush.h |
153 |
@cd src && $(MAKE_DEPEND) depend |
154 |
@cd src/md5 && $(MAKE_DEPEND) depend |
155 |
@cd src/mod && $(MAKE_DEPEND) depend |
156 |
@cd src/compat && $(MAKE_DEPEND) depend |
157 |
|
158 |
eggautoconf: |
159 |
@$(modconf) eggautoconf |
160 |
|
161 |
config: |
162 |
@$(modconf) modules-still-exist |
163 |
@$(modconf) detect-modules |
164 |
@$(modconf) update-depends |
165 |
@$(modconf) Makefile |
166 |
@cd src/mod && $(MAKE_CONFIG) config |
167 |
@$(modconf) Makefile |
168 |
@$(post_config) |
169 |
|
170 |
new-iconfig: |
171 |
@$(modconf) modules-still-exist |
172 |
@$(modconf) update-depends |
173 |
@$(modconf) -n configure |
174 |
@$(post_iconfig) |
175 |
@$(post_config) |
176 |
|
177 |
iconfig: |
178 |
@$(modconf) modules-still-exist |
179 |
@$(modconf) detect-modules |
180 |
@$(modconf) update-depends |
181 |
@$(modconf) configure |
182 |
@$(post_iconfig) |
183 |
@$(post_config) |
184 |
|
185 |
clean-modconfig: |
186 |
@rm -f .modules .known_modules |
187 |
|
188 |
conftest: |
189 |
@if test ! -f .modules; then \ |
190 |
echo ""; \ |
191 |
echo "You have NOT configured the modules yet. This has to be done"; \ |
192 |
echo "before you can start compiling."; \ |
193 |
echo ""; \ |
194 |
echo " Run \"make config\" or \"make iconfig\" now."; \ |
195 |
echo ""; \ |
196 |
exit 1; \ |
197 |
fi |
198 |
|
199 |
reconfig: clean-modconfig config |
200 |
|
201 |
eggdrop: modegg modules |
202 |
|
203 |
modegg: modtest |
204 |
@rm -f src/mod/mod.xlibs |
205 |
@cd src && $(MAKE_MODEGG) $(EGGEXEC) |
206 |
@echo "" |
207 |
@$(egg_test_run) |
208 |
@ls -l $(EGGEXEC) |
209 |
|
210 |
modules: modtest |
211 |
@cd src/mod && $(MAKE_MODULES) modules |
212 |
@echo "" |
213 |
@echo "modules made:" |
214 |
@ls -l *.$(MOD_EXT) |
215 |
@$(egg_install_msg) |
216 |
|
217 |
static: eggtest |
218 |
@echo "" |
219 |
@echo "Making module objects for static linking..." |
220 |
@echo "" |
221 |
@rm -f src/mod/mod.xlibs |
222 |
@cd src/mod && $(MAKE_STATIC) static |
223 |
@echo "" |
224 |
@echo "Making core eggdrop for static linking..." |
225 |
@echo "" |
226 |
@cd src && $(MAKE_STATIC) $(EGGEXEC) |
227 |
@echo "" |
228 |
@$(egg_test_run) |
229 |
@ls -l $(EGGEXEC) |
230 |
@$(egg_install_msg) |
231 |
|
232 |
debug: debegg debmodules |
233 |
|
234 |
debegg: modtest |
235 |
@cd src && $(MAKE_DEBEGG) $(EGGEXEC) |
236 |
@echo "" |
237 |
@$(egg_test_run) |
238 |
@ls -l $(EGGEXEC) |
239 |
|
240 |
debmodules: modtest |
241 |
@cd src/mod && $(MAKE_DEBMODULES) modules |
242 |
@echo "" |
243 |
@echo "modules made:" |
244 |
@ls -l *.$(MOD_EXT) |
245 |
@$(egg_install_msg) |
246 |
|
247 |
sdebug: eggtest |
248 |
@echo "" |
249 |
@echo "Making module objects for static linking..." |
250 |
@echo "" |
251 |
@rm -f src/mod/mod.xlibs |
252 |
@cd src/mod && $(MAKE_SDEBUG) static |
253 |
@echo "" |
254 |
@echo "Making core eggdrop for static linking..." |
255 |
@echo "" |
256 |
@cd src && $(MAKE_SDEBUG) $(EGGEXEC) |
257 |
@echo "" |
258 |
@$(egg_test_run) |
259 |
@ls -l $(EGGEXEC) |
260 |
@$(egg_install_msg) |
261 |
|
262 |
eggtest: conftest |
263 |
@if test -f EGGMOD.stamp; then \ |
264 |
echo "You're trying to do a STATIC build of eggdrop when you've";\ |
265 |
echo "already run 'make' for a module build.";\ |
266 |
echo "You must first type \"make clean\" before you can build";\ |
267 |
echo "a static version.";\ |
268 |
exit 1;\ |
269 |
fi |
270 |
@echo "stamp" >EGGDROP.stamp |
271 |
|
272 |
modtest: conftest |
273 |
@if [ -f EGGDROP.stamp ]; then \ |
274 |
echo "You're trying to do a MODULE build of eggdrop when you've";\ |
275 |
echo "already run 'make' for a static build.";\ |
276 |
echo "You must first type \"make clean\" before you can build";\ |
277 |
echo "a module version.";\ |
278 |
exit 1;\ |
279 |
fi |
280 |
@echo "stamp" >EGGMOD.stamp |
281 |
|
282 |
install: ainstall |
283 |
|
284 |
dinstall: eggdrop ainstall |
285 |
|
286 |
sinstall: static ainstall |
287 |
|
288 |
ainstall: install-start install-bin install-modules install-data \ |
289 |
install-help install-language install-filesys install-doc \ |
290 |
install-scripts install-end |
291 |
|
292 |
install-start: |
293 |
@if test ! -f $(EGGEXEC); then \ |
294 |
echo ""; \ |
295 |
echo "You haven't compiled eggdrop yet."; \ |
296 |
echo "To compile eggdrop use:"; \ |
297 |
echo " make <target>"; \ |
298 |
echo ""; \ |
299 |
echo " valid targets: eggdrop static debug sdebug"; \ |
300 |
echo ""; \ |
301 |
exit 1; \ |
302 |
fi |
303 |
@if test "x$(DEST)" = "x"; then \ |
304 |
echo "You must specify a destination directory with DEST="; \ |
305 |
exit 1; \ |
306 |
fi |
307 |
@echo "" |
308 |
@$(egg_test_run) |
309 |
@echo |
310 |
@echo "Installing in directory: '$(DEST)'." |
311 |
@echo |
312 |
@if test ! -d $(DEST); then \ |
313 |
echo "Creating directory: $(DEST)."; \ |
314 |
$(top_srcdir)/misc/mkinstalldirs $(DEST); \ |
315 |
fi |
316 |
|
317 |
install-bin: |
318 |
@if test -f $(DEST)/o$(EGGEXEC); then \ |
319 |
rm -f $(DEST)/o$(EGGEXEC); \ |
320 |
fi |
321 |
@if test -h $(DEST)/$(EGGEXEC); then \ |
322 |
echo "Removing symlink to archival eggdrop binary."; \ |
323 |
rm -f $(DEST)/$(EGGEXEC); \ |
324 |
fi |
325 |
@if test -f $(DEST)/$(EGGEXEC); then \ |
326 |
echo "Renamed the old '$(EGGEXEC)' executable to 'o$(EGGEXEC)'."; \ |
327 |
mv -f $(DEST)/$(EGGEXEC) $(DEST)/o$(EGGEXEC); \ |
328 |
fi |
329 |
@echo "Copying new '$(EGGEXEC)' executable and creating symlink." |
330 |
@$(INSTALL_PROGRAM) $(EGGEXEC) $(DEST)/$(EGGEXEC)-$(EGGVERSION) |
331 |
@(cd $(DEST) && $(LN_S) $(EGGEXEC)-$(EGGVERSION) $(EGGEXEC)) |
332 |
|
333 |
install-modules: |
334 |
@if test -h $(DEST)/modules; then \ |
335 |
echo "Removing symlink to archival modules directory."; \ |
336 |
rm -f $(DEST)/modules; \ |
337 |
fi |
338 |
@if test -d $(DEST)/modules; then \ |
339 |
echo "Moving old modules into 'modules.old' directory."; \ |
340 |
rm -rf $(DEST)/modules.old; \ |
341 |
mv -f $(DEST)/modules $(DEST)/modules.old; \ |
342 |
fi |
343 |
@if test ! "x`echo *.$(MOD_EXT)`" = "x*.$(MOD_EXT)"; then \ |
344 |
if test ! -d $(DEST)/modules-$(EGGVERSION); then \ |
345 |
echo "Creating modules-$(EGGVERSION) directory and symlink."; \ |
346 |
$(top_srcdir)/misc/mkinstalldirs $(DEST)/modules-$(EGGVERSION); \ |
347 |
fi; \ |
348 |
(cd $(DEST) && $(LN_S) modules-$(EGGVERSION) modules); \ |
349 |
echo "Copying new modules."; \ |
350 |
for i in *.$(MOD_EXT); do \ |
351 |
$(INSTALL_PROGRAM) $$i $(DEST)/modules-$(EGGVERSION)/; \ |
352 |
done; \ |
353 |
fi |
354 |
|
355 |
install-data: |
356 |
@$(INSTALL_DATA) $(srcdir)/eggdrop.advanced.conf $(DEST) |
357 |
@$(INSTALL_DATA) $(srcdir)/eggdrop.complete.conf $(DEST) |
358 |
@$(INSTALL_DATA) $(srcdir)/eggdrop.simple.conf $(DEST) |
359 |
@if test ! -d $(DEST)/logs; then \ |
360 |
echo "Creating 'logs' subdirectory."; \ |
361 |
$(top_srcdir)/misc/mkinstalldirs $(DEST)/logs; \ |
362 |
$(INSTALL_DATA) $(srcdir)/logs/CONTENTS $(DEST)/logs/; \ |
363 |
fi; |
364 |
@if test ! -d $(DEST)/text; then \ |
365 |
echo "Creating 'text' subdirectory."; \ |
366 |
$(top_srcdir)/misc/mkinstalldirs $(DEST)/text; \ |
367 |
fi; |
368 |
@if test ! -f $(DEST)/text/motd; then \ |
369 |
$(INSTALL_DATA) $(srcdir)/text/motd $(DEST)/text/; \ |
370 |
fi |
371 |
@if test ! -f $(DEST)/text/banner; then \ |
372 |
$(INSTALL_DATA) $(srcdir)/text/banner $(DEST)/text/; \ |
373 |
fi |
374 |
|
375 |
install-help: |
376 |
@echo "Copying help files." |
377 |
@if test ! "x`echo $(srcdir)/help/*.help`" = "x$(srcdir)/help/*.help"; then \ |
378 |
if test ! -d $(DEST)/help; then \ |
379 |
echo "Creating 'help' subdirectory."; \ |
380 |
$(top_srcdir)/misc/mkinstalldirs $(DEST)/help; \ |
381 |
fi; \ |
382 |
for i in $(srcdir)/help/*.help; do \ |
383 |
$(INSTALL_DATA) $$i $(DEST)/help/; \ |
384 |
done; \ |
385 |
fi |
386 |
@if test ! "x`echo $(srcdir)/help/msg/*.help`" = "x$(srcdir)/help/msg/*.help"; then \ |
387 |
if test ! -d $(DEST)/help/msg; then \ |
388 |
echo "Creating 'help/msg' subdirectory."; \ |
389 |
$(top_srcdir)/misc/mkinstalldirs $(DEST)/help/msg; \ |
390 |
fi; \ |
391 |
for i in $(srcdir)/help/msg/*.help; do \ |
392 |
$(INSTALL_DATA) $$i $(DEST)/help/msg/; \ |
393 |
done; \ |
394 |
fi |
395 |
@if test ! "x`echo $(srcdir)/help/set/*.help`" = "x$(srcdir)/help/set/*.help"; then \ |
396 |
if test ! -d $(DEST)/help/set; then \ |
397 |
echo "Creating 'help/set' subdirectory."; \ |
398 |
$(top_srcdir)/misc/mkinstalldirs $(DEST)/help/set; \ |
399 |
fi; \ |
400 |
for i in $(srcdir)/help/set/*.help; do \ |
401 |
$(INSTALL_DATA) $$i $(DEST)/help/set/; \ |
402 |
done; \ |
403 |
fi |
404 |
@cd src/mod/ && $(MAKE_INSTALL) install-help |
405 |
|
406 |
install-language: |
407 |
@echo "Copying language files." |
408 |
@if test ! "x`echo $(srcdir)/language/*.lang`" = "x$(srcdir)/language/*.lang"; then \ |
409 |
if test ! -d $(DEST)/language; then \ |
410 |
echo "Creating 'language' subdirectory."; \ |
411 |
$(top_srcdir)/misc/mkinstalldirs $(DEST)/language; \ |
412 |
fi; \ |
413 |
for i in $(srcdir)/language/*.lang; do \ |
414 |
$(INSTALL_DATA) $$i $(DEST)/language/; \ |
415 |
done; \ |
416 |
fi |
417 |
@cd src/mod && $(MAKE_INSTALL) install-language |
418 |
|
419 |
install-filesys: |
420 |
@if test ! -d $(DEST)/filesys; then \ |
421 |
echo "Creating a skeletal filesys subdirectory."; \ |
422 |
$(top_srcdir)/misc/mkinstalldirs $(DEST)/filesys; \ |
423 |
$(top_srcdir)/misc/mkinstalldirs $(DEST)/filesys/incoming; \ |
424 |
fi |
425 |
|
426 |
install-doc: |
427 |
@$(INSTALL_DATA) $(srcdir)/README $(DEST) |
428 |
@cd doc/ && $(MAKE_INSTALL) install |
429 |
|
430 |
install-scripts: |
431 |
@cd scripts/ && $(MAKE_INSTALL) install |
432 |
|
433 |
install-end: |
434 |
@echo |
435 |
@echo "Installation completed." |
436 |
@echo "" |
437 |
@echo "You MUST ensure that you edit/verify your configuration file." |
438 |
@echo "Use one of the three configuration files (eggdrop.simple.conf, eggdrop.advanced.conf and eggdrop.complete.conf) distributed with your bot." |
439 |
@echo "" |
440 |
@echo "Remember to change directory to $(DEST) before you proceed." |
441 |
@echo "" |
442 |
|
443 |
#safety hash |