Makefile.in 5.5 KB

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