Makefile.in 13 KB

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