Makefile.in 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. #
  2. # DO NOT EDIT THIS FILE
  3. #
  4. #
  5. SHELL = @SHELL@
  6. top_srcdir = @top_srcdir@
  7. srcdir = @srcdir@
  8. VPATH = @srcdir@
  9. @SET_MAKE@
  10. VERSION = @VERSION@
  11. DISTRIB = wraith-@VERSION@
  12. CCDEPMODE = @CCDEPMODE@
  13. BINEXEC = wraith@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 src/buildinfo.h \
  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. REVISION := $(shell misc/getrev.sh)
  23. BUILDTS := $(shell misc/getts.sh)
  24. # defaults
  25. CXX = @CCACHE@ @DISTCC@ @CXX@ -static
  26. LD = @CXX@ -static
  27. CCDEBUG = @CCACHE@ @DISTCC@ @CCDEBUG@
  28. LDDEBUG = @CCDEBUG@
  29. STRIP = @STRIP@
  30. DIFF = @DIFF@
  31. #LIBS = @LIBS@ @ZLIB@ @SSL@
  32. LIBS = @LIBS@ @ZLIB@
  33. DEBCXXFLAGS = -DDEBUG -fno-inline -g3 -ggdb3 -O0
  34. CFLGS = @GCC3@
  35. _CFLGS = -fno-strict-aliasing -W -Wformat \
  36. #-Wshadow -Wnested-externs -Wno-format-y2k \
  37. #-Wlarger-than-6608 -Wpointer-arith -Wcast-align \
  38. #-Waggrepate-return -Wbad-function-cast \
  39. #-Wlong-long @GCC3@
  40. #-Wmissing-noreturn
  41. #-Wunused-parameter
  42. #-Wwrite-strings
  43. #-Wconversion
  44. #-Wtraditional
  45. MAKEFLAGS = -s -j4
  46. MAKE_BIN = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CXX)' 'LD=$(LD)' \
  47. 'CCDEPMODE=$(CCDEPMODE)' 'REVISION=$(REVISION)' 'BUILDTS=$(BUILDTS)' \
  48. 'STRIP=$(STRIP)' 'CFLGS=$(CFLGS)' \
  49. 'LIBS=$(LIBS)' 'EGGEXEC=$(BINEXEC)' 'EGGBUILD=(wraith)'
  50. MAKE_DEBUG = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CCDEBUG)' 'LD=$(LDDEBUG) -g' \
  51. 'CCDEPMODE=$(CCDEPMODE)' 'REVISION=$(REVISION)' 'BUILDTS=$(BUILDTS)' \
  52. 'STRIP=touch' 'CFLGS=$(DEBCXXFLAGS) $(CFLGS)' \
  53. 'LIBS=$(LIBS)' 'EGGEXEC=$(BINEXEC)' 'EGGBUILD=(debug)'
  54. MAKE_UTILS = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CCDEBUG)' 'STRIP=touch' \
  55. 'CCDEPMODE=$(CCDEPMODE)' \
  56. 'CFLGS=$(DEBCXXFLAGS) $(CFLGS)' 'LIBS=$(LIBS)' 'LD=$(LDDEBUG) -g'
  57. MAKE_UTILS_NR = $(MAKE) 'CXX=$(CXX)' 'STRIP=touch' \
  58. 'CCDEPMODE=$(CCDEPMODE)' \
  59. 'CFLGS=$(DEBCXXFLAGS) $(CFLGS)' 'LIBS=$(LIBS)' 'LD=$(LD) -g'
  60. MAKE_CONFIG = $(MAKE) 'MAKE=$(MAKE)'
  61. default: wraith
  62. test:
  63. cleanutils:
  64. @rm -f src/stringfix@EXEEXT@ src/sorthelp@EXEEXT@ src/makehelp@EXEEXT@ src/makeres@EXEEXT@ src/makeset@EXEEXT@
  65. clean: cleanutils
  66. +@cd src && $(MAKE) clean
  67. +@cd src/compat && $(MAKE) clean
  68. +@cd src/bdlib && $(MAKE) clean
  69. +@cd src/crypto && $(MAKE) clean
  70. +@cd src/mod && $(MAKE) distclean
  71. @rm -f $(BINEXEC) stamp.* *~ src/*~ configure.temp .mangled
  72. @rm -f src/help.h src/response.h src/responses.h utctime@EXEEXT@ ts@EXEEXT@
  73. distclean: clean
  74. @rm -f Makefile src/Makefile src/compat/Makefile src/bdlib/Makefile src/mod/Makefile src/crypto/Makefile src/buildinfo.h
  75. @rm -f config.cache config.log config.status config.h
  76. @rm -rf *-$(VERSION)/ autom4te.cache/ autoscan.log configure.scan
  77. @rm -rf src/.deps/ src/compat/.deps/ src/strucutres/.deps/ src/mod/*.mod/.deps/ src/crypto/.deps
  78. +@cd src/bdlib && $(MAKE) distclean
  79. distrib: clean
  80. @rm -rf $(DISTRIB)/
  81. @mkdir $(DISTRIB) && cp -r $(DISTROFILES) $(DISTRIB)
  82. @rm -f `find $(DISTRIB)/ \( -name '*~' -o -name '*#' -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \) -print`
  83. @rm -rf `find $(DISTRIB)/ \( -name 'CVS' \) -print`
  84. @for s in $(EXCLUDES); \
  85. do \
  86. rm -rf $(DISTRIB)/$$s; \
  87. done;
  88. @mfiles="`find $(DISTRIB)/src/ -name '*.h' -or -name '*.c'`"; \
  89. for s in $$mfiles; \
  90. do \
  91. mangle -rnw $$s > /dev/null 2>&1;\
  92. done
  93. tar: distrib
  94. tar -czvf $(DISTRIB).tgz $(DISTRIB)/
  95. ls -al $(DISTRIB).tgz
  96. # rm -rf $(DISTRIB)/
  97. # cd ../ && rm -rf distrib/
  98. indent:
  99. @ifiles="`find src -name '*.h' -or -name '*.c'`"; \
  100. for s in $$ifiles; \
  101. do \
  102. indent $$s; \
  103. done
  104. sort: sorthelp
  105. @cp -f misc/help.txt misc/help.bak
  106. @(if test "x`tail -n 1 misc/help.txt`" != "x::end"; then \
  107. echo "::end" >> misc/help.txt; \
  108. fi)
  109. # @(sed misc/help.txt -e "s/^$$/ /" > help~ && mv -f help~ misc/help.txt) || rm -f help~
  110. @(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~
  111. @cp -f misc/help.txt help.txt~
  112. @(src/sorthelp@EXEEXT@ misc/help.txt misc/help.txt || (cp -f help.txt~ misc/help.txt; echo "Sort failed, restoring backup."))
  113. @rm -f help.txt~
  114. help: makehelp stringfix
  115. @src/makehelp@EXEEXT@ misc/help.txt src/help.h.tmp~
  116. @(if [ ! -f src/help.h ]; then \
  117. touch src/help.h; \
  118. fi)
  119. @src/stringfix@EXEEXT@ src/help.h.tmp~ src/help.h~ 1
  120. @(if test "x`$(DIFF) -qurN src/help.h~ src/help.h`" != "x"; then \
  121. cp -f src/help.h~ src/help.h; \
  122. fi)
  123. set: makeset
  124. @src/makeset@EXEEXT@ misc/settings.txt src/set_default.h~
  125. @(if [ ! -f src/set_default.h ]; then \
  126. touch src/set_default.h; \
  127. fi)
  128. @(if test "x`$(DIFF) -qurN src/set_default.h~ src/set_default.h`" != "x"; then \
  129. cp -f src/set_default.h~ src/set_default.h; \
  130. fi)
  131. res: makeres
  132. @src/makeres@EXEEXT@ misc/responses.txt src/ 1
  133. @(if [ ! -f src/response.h ]; then \
  134. touch src/response.h; \
  135. fi)
  136. @(if [ ! -f src/responses.h ]; then \
  137. touch src/responses.h; \
  138. fi)
  139. @(if test "x`$(DIFF) -qurN src/response.h~ src/response.h`" != "x"; then \
  140. cp -f src/response.h~ src/response.h; \
  141. fi)
  142. @(if test "x`$(DIFF) -qurN src/responses.h~ src/responses.h`" != "x"; then \
  143. cp -f src/responses.h~ src/responses.h; \
  144. fi)
  145. stringfix: src/stringfix.c config.h
  146. +@cd src && ${MAKE_UTILS} stringfix
  147. makeres: src/makeres.c
  148. +@cd src && ${MAKE_UTILS} makeres
  149. makeset: src/makeset.c
  150. +@cd src && ${MAKE_UTILS} makeset
  151. makehelp: src/makehelp.c
  152. +@cd src && ${MAKE_UTILS} makehelp
  153. sorthelp: src/sorthelp.c
  154. +@cd src && ${MAKE_UTILS} sorthelp
  155. utils: stringfix makehelp
  156. crypto:
  157. +@cd src/crypto && ${MAKE_UTILS} crypto
  158. general: help res set
  159. check:
  160. wraith: general
  161. @echo ""
  162. @echo "Making binary"
  163. @echo ""
  164. @echo ""
  165. +@cd src/mod && $(MAKE_BIN) static
  166. +@cd src && $(MAKE_BIN) $(BINEXEC)
  167. @echo ""
  168. dwraith: debug
  169. debug: general
  170. @echo ""
  171. @echo "Making debug binary"
  172. @echo ""
  173. @echo ""
  174. +@cd src/mod && $(MAKE_DEBUG) static
  175. +@cd src && $(MAKE_DEBUG) $(BINEXEC)
  176. @echo ""
  177. #safety hash