Makefile.in 5.4 KB

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