Makefile.in 6.2 KB

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