Makefile.in 6.1 KB

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