Makefile.in 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. #
  2. # DO NOT EDIT THIS FILE
  3. #
  4. SHELL = @SHELL@
  5. top_srcdir = @top_srcdir@
  6. srcdir = @srcdir@
  7. VPATH = @srcdir@
  8. @SET_MAKE@
  9. VERSION = @VERSION@
  10. DISTRIB = wraith-@VERSION@
  11. CCDEPMODE = @CCDEPMODE@
  12. LEAFEXEC = leaf@EXEEXT@
  13. HUBEXEC = hub@EXEEXT@
  14. DISTROFILES = config.h.in doc/ misc/ scripts/ ChangeLog Makefile.in build configure pack/ src/
  15. EXCLUDES = pack/pack.cfg misc/ind doc/DEVEL src/Makefile src/compat/Makefile src/mod/Makefile \
  16. src/crypto/Makefile src/crypto/.deps src/crypto/.cvsignore \
  17. src/mod/dns.mod/Makefile src/mod/*.mod/.deps/ src/mod/*.mod/.cvsignore \
  18. src/.deps src/compat/.deps misc/commit misc/grep autotools/ \
  19. config.cache config.log config.status config.h stamp.* misc/.cvsignore src/compat/.cvsignore \
  20. src/mod/.cvsignore src/.cvsignore .cvsignore misc/commit misc/fstrings \
  21. misc/plainh misc/grep misc/cp.sh
  22. # defaults
  23. CXX = @DISTCC@ @CXX@
  24. LD = @DISTCC@ @CXX@
  25. CCDEBUG = @DISTCC@ @CCDEBUG@
  26. LDDEBUG = @DISTCC@ @CCDEBUG@
  27. STRIP = @STRIP@
  28. #LIBS = @LIBS@ @ZLIB@ @SSL@
  29. LIBS = @LIBS@ @ZLIB@
  30. DEBCXXFLAGS = -DDEBUG_ASSERT -DDEBUG_MEM -Dinline= -fno-inline -g3 -ggdb3
  31. CFLGS = @GCC3@
  32. _CFLGS = -fno-strict-aliasing -W -Wformat \
  33. #-Wshadow -Wnested-externs -Wno-format-y2k \
  34. #-Wlarger-than-6608 -Wpointer-arith -Wcast-align \
  35. #-Waggrepate-return -Wbad-function-cast \
  36. #-Wlong-long @GCC3@
  37. #-Wmissing-noreturn
  38. #-Wunused-parameter
  39. #-Wwrite-strings
  40. #-Wconversion
  41. #-Wtraditional
  42. MAKEFLAGS = -s -j4
  43. MAKE_LEAF = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CXX)' 'LD=$(LD)' \
  44. 'CCDEPMODE=$(CCDEPMODE)' \
  45. 'STRIP=$(STRIP)' 'CFLGS=$(CFLGS) -DLEAF' \
  46. 'LIBS=$(LIBS)' 'EGGEXEC=$(LEAFEXEC)' 'EGGBUILD=(leaf)'
  47. MAKE_DLEAF = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CCDEBUG)' 'LD=$(LDDEBUG) -g' \
  48. 'CCDEPMODE=$(CCDEPMODE)' \
  49. 'STRIP=touch' 'CFLGS=$(DEBCXXFLAGS) -DLEAF $(CFLGS)' \
  50. 'LIBS=$(LIBS)' 'EGGEXEC=$(LEAFEXEC)' 'EGGBUILD=(debug leaf)'
  51. MAKE_HUB = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CXX)' 'LD=$(LD)' \
  52. 'CCDEPMODE=$(CCDEPMODE)' \
  53. 'STRIP=$(STRIP)' 'CFLGS=$(CFLGS) -DHUB' \
  54. 'LIBS=$(LIBS)' 'EGGEXEC=$(HUBEXEC)' 'EGGBUILD=(hub)'
  55. MAKE_DHUB = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CCDEBUG)' 'LD=$(LDDEBUG) -g' \
  56. 'CCDEPMODE=$(CCDEPMODE)' \
  57. 'STRIP=touch' 'CFLGS=$(DEBCXXFLAGS) -DHUB $(CFLGS)' \
  58. 'LIBS=$(LIBS)' 'EGGEXEC=$(HUBEXEC)' 'EGGBUILD=(debug hub)'
  59. MAKE_UTILS = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CCDEBUG)' 'STRIP=touch' \
  60. 'CCDEPMODE=$(CCDEPMODE)' \
  61. 'CFLGS=$(DEBCXXFLAGS) $(CFLGS)' 'LIBS=$(LIBS)' 'LD=$(LDDEBUG) -g'
  62. MAKE_UTILS_NR = $(MAKE) 'CXX=$(CXX)' 'STRIP=touch' \
  63. 'CCDEPMODE=$(CCDEPMODE)' \
  64. 'CFLGS=$(DEBCXXFLAGS) $(CFLGS)' 'LIBS=$(LIBS)' 'LD=$(LD) -g'
  65. MAKE_CONFIG = $(MAKE) 'MAKE=$(MAKE)'
  66. all:
  67. echo ""
  68. echo "Use the build script"
  69. echo ""
  70. cleanutils:
  71. @rm -f src/stringfix src/sorthelp src/makehelp
  72. clean: cleanutils
  73. +@cd src && $(MAKE) clean
  74. +@cd src/compat && $(MAKE) clean
  75. +@cd src/crypto && $(MAKE) clean
  76. +@cd src/mod && $(MAKE) distclean
  77. @rm -f $(HUBEXEC) $(LEAFEXEC) stamp.* *~ src/*~ configure.temp .mangled
  78. @rm -f $(HUBEXEC).* $(LEAFEXEC).* src/help.h src/response.h src/responses.h utctime
  79. distclean: clean
  80. @rm -f Makefile src/Makefile src/compat/Makefile src/mod/Makefile src/crypto/Makefile
  81. @rm -f config.cache config.log config.status config.h
  82. @rm -rf *-$(VERSION)/ autom4te.cache/ autoscan.log configure.scan
  83. @rm -rf src/.deps/ src/compat/.deps/ src/mod/*.mod/.deps/ src/crypto/.deps
  84. distrib: clean
  85. @rm -rf $(DISTRIB)/
  86. @mkdir $(DISTRIB) && cp -r $(DISTROFILES) $(DISTRIB)
  87. @rm -f `find $(DISTRIB)/ \( -name '*~' -o -name '*#' -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \) -print`
  88. @rm -rf `find $(DISTRIB)/ \( -name 'CVS' \) -print`
  89. @for s in $(EXCLUDES); \
  90. do \
  91. rm -rf $(DISTRIB)/$$s; \
  92. done;
  93. @mfiles="`find $(DISTRIB)/src/ -name '*.h' -or -name '*.c'`"; \
  94. for s in $$mfiles; \
  95. do \
  96. mangle -rnw $$s > /dev/null 2>&1;\
  97. done
  98. tar: distrib
  99. tar -czvf $(DISTRIB).tgz $(DISTRIB)/
  100. ls -al $(DISTRIB).tgz
  101. # rm -rf $(DISTRIB)/
  102. # cd ../ && rm -rf distrib/
  103. indent:
  104. @ifiles="`find src -name '*.h' -or -name '*.c'`"; \
  105. for s in $$ifiles; \
  106. do \
  107. indent $$s; \
  108. done
  109. sort: sorthelp
  110. @cp -f misc/help.txt misc/help.bak
  111. @(if test "x`tail -n 1 misc/help.txt`" != "x::end"; then \
  112. echo "::end" >> misc/help.txt; \
  113. fi)
  114. # @(sed misc/help.txt -e "s/^$$/ /" > help~ && mv -f help~ misc/help.txt) || rm -f help~
  115. @(sed -r -e :a -e 's/^$$/ /' -e '$$!N;s/^ \n:/:/;ta' -e 'P;D' misc/help.txt > help~ && mv -f help~ misc/help.txt) || rm -f help~
  116. @cp -f misc/help.txt help.txt~
  117. @(src/sorthelp misc/help.txt misc/help.txt || (cp -f help.txt~ misc/help.txt; echo "Sort failed, restoring backup."))
  118. @rm -f help.txt~
  119. help: makehelp stringfix
  120. @src/makehelp misc/help.txt src/help.h.tmp~
  121. @(if [ ! -f src/help.h ]; then \
  122. touch src/help.h; \
  123. fi)
  124. @src/stringfix src/help.h.tmp~ src/help.h~ 1
  125. @(if test "x`diff -qurN src/help.h~ src/help.h`" != "x"; then \
  126. cp -f src/help.h~ src/help.h; \
  127. fi)
  128. res: makeres
  129. @src/makeres misc/responses.txt src/ 1
  130. @(if [ ! -f src/response.h ]; then \
  131. touch src/response.h; \
  132. fi)
  133. @(if [ ! -f src/responses.h ]; then \
  134. touch src/responses.h; \
  135. fi)
  136. @(if test "x`diff -qurN src/response.h~ src/response.h`" != "x"; then \
  137. cp -f src/response.h~ src/response.h; \
  138. fi)
  139. @(if test "x`diff -qurN src/responses.h~ src/responses.h`" != "x"; then \
  140. cp -f src/responses.h~ src/responses.h; \
  141. fi)
  142. stringfix: src/stringfix.c config.h
  143. +@cd src && ${MAKE_UTILS} stringfix
  144. makeres: src/makeres.c
  145. +@cd src && ${MAKE_UTILS} makeres
  146. makehelp: src/makehelp.c
  147. +@cd src && ${MAKE_UTILS} makehelp
  148. sorthelp: src/sorthelp.c
  149. +@cd src && ${MAKE_UTILS} sorthelp
  150. utils: stringfix makehelp
  151. crypto:
  152. +@cd src/crypto && ${MAKE_UTILS} crypto
  153. general: help res
  154. leaf: general
  155. @echo ""
  156. @echo "Making leaf"
  157. @echo ""
  158. @./misc/maketype leaf
  159. @echo ""
  160. +@cd src/mod && $(MAKE_LEAF) static
  161. +@cd src && $(MAKE_LEAF) $(LEAFEXEC)
  162. @echo ""
  163. dleaf: general
  164. @echo ""
  165. @echo "Making debug leaf"
  166. @echo ""
  167. @./misc/maketype leaf
  168. @echo ""
  169. +@cd src/mod && $(MAKE_DLEAF) static
  170. +@cd src && $(MAKE_DLEAF) $(LEAFEXEC)
  171. @echo ""
  172. hub: general
  173. @echo ""
  174. @echo "Making hub"
  175. @echo ""
  176. @./misc/maketype hub
  177. @echo ""
  178. +@cd src/mod && $(MAKE_HUB) static
  179. +@cd src && $(MAKE_HUB) $(HUBEXEC)
  180. @echo ""
  181. dhub: general
  182. @echo ""
  183. @echo "Making debug hub"
  184. @echo ""
  185. @./misc/maketype hub
  186. @echo ""
  187. +@cd src/mod && $(MAKE_DHUB) static
  188. +@cd src && $(MAKE_DHUB) $(HUBEXEC)
  189. @echo ""
  190. #safety hash