Makefile.in 5.3 KB

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