Makefile.in 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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/bdlib/.deps/ src/mod/*.mod/.deps/ src/crypto/.deps
  78. distrib: clean
  79. @rm -rf $(DISTRIB)/
  80. @mkdir $(DISTRIB) && cp -r $(DISTROFILES) $(DISTRIB)
  81. @rm -f `find $(DISTRIB)/ \( -name '*~' -o -name '*#' -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \) -print`
  82. @rm -rf `find $(DISTRIB)/ \( -name 'CVS' \) -print`
  83. @for s in $(EXCLUDES); \
  84. do \
  85. rm -rf $(DISTRIB)/$$s; \
  86. done;
  87. @mfiles="`find $(DISTRIB)/src/ -name '*.h' -or -name '*.c'`"; \
  88. for s in $$mfiles; \
  89. do \
  90. mangle -rnw $$s > /dev/null 2>&1;\
  91. done
  92. tar: distrib
  93. tar -czvf $(DISTRIB).tgz $(DISTRIB)/
  94. ls -al $(DISTRIB).tgz
  95. # rm -rf $(DISTRIB)/
  96. # cd ../ && rm -rf distrib/
  97. indent:
  98. @ifiles="`find src -name '*.h' -or -name '*.c'`"; \
  99. for s in $$ifiles; \
  100. do \
  101. indent $$s; \
  102. done
  103. sort: sorthelp
  104. @cp -f misc/help.txt misc/help.bak
  105. @(if test "x`tail -n 1 misc/help.txt`" != "x::end"; then \
  106. echo "::end" >> misc/help.txt; \
  107. fi)
  108. # @(sed misc/help.txt -e "s/^$$/ /" > help~ && mv -f help~ misc/help.txt) || rm -f help~
  109. @(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~
  110. @cp -f misc/help.txt help.txt~
  111. @(src/sorthelp@EXEEXT@ misc/help.txt misc/help.txt || (cp -f help.txt~ misc/help.txt; echo "Sort failed, restoring backup."))
  112. @rm -f help.txt~
  113. help: makehelp stringfix
  114. @src/makehelp@EXEEXT@ misc/help.txt src/help.h.tmp~
  115. @(if [ ! -f src/help.h ]; then \
  116. touch src/help.h; \
  117. fi)
  118. @src/stringfix@EXEEXT@ src/help.h.tmp~ src/help.h~ 1
  119. @(if test "x`$(DIFF) -qurN src/help.h~ src/help.h`" != "x"; then \
  120. cp -f src/help.h~ src/help.h; \
  121. fi)
  122. set: makeset
  123. @src/makeset@EXEEXT@ misc/settings.txt src/set_default.h~
  124. @(if [ ! -f src/set_default.h ]; then \
  125. touch src/set_default.h; \
  126. fi)
  127. @(if test "x`$(DIFF) -qurN src/set_default.h~ src/set_default.h`" != "x"; then \
  128. cp -f src/set_default.h~ src/set_default.h; \
  129. fi)
  130. res: makeres
  131. @src/makeres@EXEEXT@ misc/responses.txt src/ 1
  132. @(if [ ! -f src/response.h ]; then \
  133. touch src/response.h; \
  134. fi)
  135. @(if [ ! -f src/responses.h ]; then \
  136. touch src/responses.h; \
  137. fi)
  138. @(if test "x`$(DIFF) -qurN src/response.h~ src/response.h`" != "x"; then \
  139. cp -f src/response.h~ src/response.h; \
  140. fi)
  141. @(if test "x`$(DIFF) -qurN src/responses.h~ src/responses.h`" != "x"; then \
  142. cp -f src/responses.h~ src/responses.h; \
  143. fi)
  144. stringfix: src/stringfix.c config.h
  145. +@cd src && ${MAKE_UTILS} stringfix
  146. makeres: src/makeres.c
  147. +@cd src && ${MAKE_UTILS} makeres
  148. makeset: src/makeset.c
  149. +@cd src && ${MAKE_UTILS} makeset
  150. makehelp: src/makehelp.c
  151. +@cd src && ${MAKE_UTILS} makehelp
  152. sorthelp: src/sorthelp.c
  153. +@cd src && ${MAKE_UTILS} sorthelp
  154. utils: stringfix makehelp
  155. crypto:
  156. +@cd src/crypto && ${MAKE_UTILS} crypto
  157. general: help res set
  158. check:
  159. wraith: general
  160. @echo ""
  161. @echo "Making binary"
  162. @echo ""
  163. @echo ""
  164. +@cd src/mod && $(MAKE_BIN) static
  165. +@cd src && $(MAKE_BIN) $(BINEXEC)
  166. @echo ""
  167. dwraith: debug
  168. debug: general
  169. @echo ""
  170. @echo "Making debug binary"
  171. @echo ""
  172. @echo ""
  173. +@cd src/mod && $(MAKE_DEBUG) static
  174. +@cd src && $(MAKE_DEBUG) $(BINEXEC)
  175. @echo ""
  176. #safety hash