Makefile.in 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  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 \
  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 svnversion .)
  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
  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. cleanutils:
  62. @rm -f src/stringfix src/sorthelp src/makehelp
  63. @rm -f src/stringfix.exe src/sorthelp.exe src/makehelp.exe
  64. clean: cleanutils
  65. +@cd src && $(MAKE) clean
  66. +@cd src/compat && $(MAKE) clean
  67. +@cd src/crypto && $(MAKE) clean
  68. +@cd src/mod && $(MAKE) distclean
  69. @rm -f $(BINEXEC) stamp.* *~ src/*~ configure.temp .mangled
  70. @rm -f src/help.h src/response.h src/responses.h utctime ts
  71. distclean: clean
  72. @rm -f Makefile src/Makefile src/compat/Makefile src/mod/Makefile src/crypto/Makefile
  73. @rm -f config.cache config.log config.status config.h
  74. @rm -rf *-$(VERSION)/ autom4te.cache/ autoscan.log configure.scan
  75. @rm -rf src/.deps/ src/compat/.deps/ src/mod/*.mod/.deps/ src/crypto/.deps
  76. distrib: clean
  77. @rm -rf $(DISTRIB)/
  78. @mkdir $(DISTRIB) && cp -r $(DISTROFILES) $(DISTRIB)
  79. @rm -f `find $(DISTRIB)/ \( -name '*~' -o -name '*#' -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \) -print`
  80. @rm -rf `find $(DISTRIB)/ \( -name 'CVS' \) -print`
  81. @for s in $(EXCLUDES); \
  82. do \
  83. rm -rf $(DISTRIB)/$$s; \
  84. done;
  85. @mfiles="`find $(DISTRIB)/src/ -name '*.h' -or -name '*.c'`"; \
  86. for s in $$mfiles; \
  87. do \
  88. mangle -rnw $$s > /dev/null 2>&1;\
  89. done
  90. tar: distrib
  91. tar -czvf $(DISTRIB).tgz $(DISTRIB)/
  92. ls -al $(DISTRIB).tgz
  93. # rm -rf $(DISTRIB)/
  94. # cd ../ && rm -rf distrib/
  95. indent:
  96. @ifiles="`find src -name '*.h' -or -name '*.c'`"; \
  97. for s in $$ifiles; \
  98. do \
  99. indent $$s; \
  100. done
  101. sort: sorthelp
  102. @cp -f misc/help.txt misc/help.bak
  103. @(if test "x`tail -n 1 misc/help.txt`" != "x::end"; then \
  104. echo "::end" >> misc/help.txt; \
  105. fi)
  106. # @(sed misc/help.txt -e "s/^$$/ /" > help~ && mv -f help~ misc/help.txt) || rm -f help~
  107. @(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~
  108. @cp -f misc/help.txt help.txt~
  109. @(src/sorthelp misc/help.txt misc/help.txt || (cp -f help.txt~ misc/help.txt; echo "Sort failed, restoring backup."))
  110. @rm -f help.txt~
  111. help: makehelp stringfix
  112. @src/makehelp misc/help.txt src/help.h.tmp~
  113. @(if [ ! -f src/help.h ]; then \
  114. touch src/help.h; \
  115. fi)
  116. @src/stringfix src/help.h.tmp~ src/help.h~ 1
  117. @(if test "x`$(DIFF) -qurN src/help.h~ src/help.h`" != "x"; then \
  118. cp -f src/help.h~ src/help.h; \
  119. fi)
  120. res: makeres
  121. @src/makeres misc/responses.txt src/ 1
  122. @(if [ ! -f src/response.h ]; then \
  123. touch src/response.h; \
  124. fi)
  125. @(if [ ! -f src/responses.h ]; then \
  126. touch src/responses.h; \
  127. fi)
  128. @(if test "x`$(DIFF) -qurN src/response.h~ src/response.h`" != "x"; then \
  129. cp -f src/response.h~ src/response.h; \
  130. fi)
  131. @(if test "x`$(DIFF) -qurN src/responses.h~ src/responses.h`" != "x"; then \
  132. cp -f src/responses.h~ src/responses.h; \
  133. fi)
  134. stringfix: src/stringfix.c config.h
  135. +@cd src && ${MAKE_UTILS} stringfix
  136. makeres: src/makeres.c
  137. +@cd src && ${MAKE_UTILS} makeres
  138. makehelp: src/makehelp.c
  139. +@cd src && ${MAKE_UTILS} makehelp
  140. sorthelp: src/sorthelp.c
  141. +@cd src && ${MAKE_UTILS} sorthelp
  142. utils: stringfix makehelp
  143. crypto:
  144. +@cd src/crypto && ${MAKE_UTILS} crypto
  145. general: help res
  146. wraith: general
  147. @echo ""
  148. @echo "Making binary"
  149. @echo ""
  150. @echo ""
  151. +@cd src/mod && $(MAKE_BIN) static
  152. +@cd src && $(MAKE_BIN) $(BINEXEC)
  153. @echo ""
  154. dwraith: debug
  155. debug: general
  156. @echo ""
  157. @echo "Making debug binary"
  158. @echo ""
  159. @echo ""
  160. +@cd src/mod && $(MAKE_DEBUG) static
  161. +@cd src && $(MAKE_DEBUG) $(BINEXEC)
  162. @echo ""
  163. #safety hash