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. STATICMAKEFILES = lib/Makefile src/mod/Makefile src/crypto/Makefile src/compat/Makefile src/Makefile Makefile
  15. CONFIGFILES = config.cache config.log config.status config.h src/buildinfo.h
  16. DISTROFILES = README LICENSE config.h.in autotools/ doc/ scripts/ lib/ Makefile.in build.sh configure pack/ src/
  17. EXCLUDES = pack/pack.cfg $(CONFIGFILES) $(STATICMAKEFILES)
  18. REVISION := $(shell private/getrev.sh)
  19. BUILDTS := $(shell private/getts.sh)
  20. HELPFILE = doc/help.txt
  21. SETTINGSFILE = doc/settings.txt
  22. RESPONSESFILE = doc/responses.txt
  23. # defaults
  24. CXX = @CCACHE@ @DISTCC@ @CXX@ -static
  25. LD = @CXX@ -static
  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 -O0 -Wshadow -Wpointer-arith -Wcast-align @GCC3DEB@
  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=$(CFLGS) $(DEBCXXFLAGS)' \
  52. 'LIBS=$(LIBS)' 'EGGEXEC=$(BINEXEC)' 'EGGBUILD=(debug)'
  53. MAKE_UTILS = $(MAKE) 'MAKE=$(MAKE)' 'CXX=$(CCDEBUG)' 'STRIP=touch' \
  54. 'CCDEPMODE=$(CCDEPMODE)' \
  55. 'CFLGS=$(CFLGS) $(DEBCXXFLAGS)' 'LIBS=$(LIBS)' 'LD=$(LDDEBUG) -g'
  56. MAKE_UTILS_NR = $(MAKE) 'CXX=$(CXX)' 'STRIP=touch' \
  57. 'CCDEPMODE=$(CCDEPMODE)' \
  58. 'CFLGS=$(CFLGS) $(DEBCXXFLAGS)' 'LIBS=$(LIBS)' 'LD=$(LD) -g'
  59. MAKE_CONFIG = $(MAKE) 'MAKE=$(MAKE)'
  60. default: wraith
  61. test:
  62. cleanutils:
  63. @rm -f src/stringfix@EXEEXT@ src/sorthelp@EXEEXT@ src/makehelp@EXEEXT@ src/makeres@EXEEXT@ src/makeset@EXEEXT@
  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. -+@cd lib && $(MAKE) clean
  70. @rm -f $(BINEXEC) stamp.* *~ src/*~ configure.temp .mangled
  71. @rm -f src/help.h src/response.h src/responses.h utctime@EXEEXT@ ts@EXEEXT@
  72. distclean: clean
  73. @rm -rf *-$(VERSION)/ autom4te.cache/ autoscan.log configure.scan
  74. @rm -rf src/.deps/ src/compat/.deps/ src/strucutres/.deps/ src/mod/*.mod/.deps/ src/crypto/.deps
  75. -+@cd lib && $(MAKE) distclean
  76. @rm -f $(STATICMAKEFILES) $(CONFIGFILES)
  77. distrib: clean
  78. @rm -rf $(DISTRIB)/
  79. @mkdir $(DISTRIB) && cp -r $(DISTROFILES) $(DISTRIB)
  80. @rm -rf `find $(DISTRIB)/ \( -name '*~' -o -name '*#' -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' -o -name '.cvsignore' -o -name '.*.swp' \) -type f -print`
  81. @rm -rf `find $(DISTRIB)/ \( -name '.svn' -o -name '.deps' \) -type d -print`
  82. @for s in $(EXCLUDES); do \
  83. rm -rf $(DISTRIB)/$$s; \
  84. done;
  85. @sed -e 's/^REVISION .*/REVISION = $(REVISION)/' -e 's/^BUILDTS .*/BUILDTS = $(BUILDTS)/' $(DISTRIB)/Makefile.in > Makefile.in.tmp && mv Makefile.in.tmp $(DISTRIB)/Makefile.in
  86. # @for s in `find $(DISTRIB)/src/ -name '*.h' -or -name '*.c'`; do mangle -rnw $$s > /dev/null 2>&1; done
  87. tar: distrib
  88. tar -czvf $(DISTRIB).tar.gz $(DISTRIB)/
  89. ls -al $(DISTRIB).tar.gz
  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_PROFILE=private/indent.pro indent $$s; \
  97. done
  98. sort: sorthelp
  99. @(if test "x`tail -n 1 $(HELPFILE)`" != "x::end"; then \
  100. echo "::end" >> $(HELPFILE); \
  101. fi)
  102. # @(sed $(HELPFILE) -e "s/^$$/ /" > help~ && mv -f help~ $(HELPFILE)) || rm -f help~
  103. @(sed -r -e :a -e 's/^$$/ /' -e '$$!N;s/^ \n:/:/;ta' -e 'P;D' $(HELPFILE) > help~ && mv -f help~ $(HELPFILE)) || rm -f help~
  104. @cp -f $(HELPFILE) help.txt~
  105. @(src/sorthelp@EXEEXT@ $(HELPFILE) $(HELPFILE) || (cp -f help.txt~ $(HELPFILE); echo "Sort failed, restoring backup."))
  106. @rm -f help.txt~
  107. help: makehelp stringfix
  108. @src/makehelp@EXEEXT@ $(HELPFILE) src/help.h.tmp~
  109. @(if [ ! -f src/help.h ]; then \
  110. touch src/help.h; \
  111. fi)
  112. @src/stringfix@EXEEXT@ 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. set: makeset
  117. @src/makeset@EXEEXT@ $(SETTINGSFILE) src/set_default.h~
  118. @(if [ ! -f src/set_default.h ]; then \
  119. touch src/set_default.h; \
  120. fi)
  121. @(if test "x`$(DIFF) -qurN src/set_default.h~ src/set_default.h`" != "x"; then \
  122. cp -f src/set_default.h~ src/set_default.h; \
  123. fi)
  124. res: makeres
  125. @src/makeres@EXEEXT@ $(RESPONSESFILE) src/ 1
  126. @(if [ ! -f src/response.h ]; then \
  127. touch src/response.h; \
  128. fi)
  129. @(if [ ! -f src/responses.h ]; then \
  130. touch src/responses.h; \
  131. fi)
  132. @(if test "x`$(DIFF) -qurN src/response.h~ src/response.h`" != "x"; then \
  133. cp -f src/response.h~ src/response.h; \
  134. fi)
  135. @(if test "x`$(DIFF) -qurN src/responses.h~ src/responses.h`" != "x"; then \
  136. cp -f src/responses.h~ src/responses.h; \
  137. fi)
  138. stringfix: src/stringfix.c config.h
  139. +@cd src && ${MAKE_UTILS} stringfix
  140. makeres: src/makeres.c
  141. +@cd src && ${MAKE_UTILS} makeres
  142. makeset: src/makeset.c
  143. +@cd src && ${MAKE_UTILS} makeset
  144. makehelp: src/makehelp.c
  145. +@cd src && ${MAKE_UTILS} makehelp
  146. sorthelp: src/sorthelp.c
  147. +@cd src && ${MAKE_UTILS} sorthelp
  148. utils: stringfix makehelp
  149. crypto:
  150. +@cd src/crypto && ${MAKE_UTILS} crypto
  151. general: help res set
  152. check:
  153. wraith: general
  154. @echo ""
  155. @echo "Making binary"
  156. @echo ""
  157. @echo ""
  158. +@cd lib && $(MAKE)
  159. +@cd src/mod && $(MAKE_BIN) static
  160. +@cd src && $(MAKE_BIN) $(BINEXEC)
  161. @echo ""
  162. dwraith: debug
  163. debug: general
  164. @echo ""
  165. @echo "Making debug binary"
  166. @echo ""
  167. @echo ""
  168. +@cd lib && $(MAKE) debug
  169. +@cd src/mod && $(MAKE_DEBUG) static
  170. +@cd src && $(MAKE_DEBUG) $(BINEXEC)
  171. @echo ""
  172. #safety hash