patch-Makefile 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --- maradns-1.4.05.orig/Makefile 2006-01-02 17:59:33.000000000 +0100
  2. +++ maradns-1.4.05/Makefile 2011-01-21 16:48:06.124913980 +0100
  3. @@ -1,15 +1,82 @@
  4. -# This is a wrapper that runs "./configure ; make"
  5. -all:
  6. - ./compile.sh
  7. +VERSION=1.4.05
  8. +COMPILED="Linux system at Fri Jan 21 16:48:06 CET 2011"
  9. +COMPILED_DEBUG="Linux system at Fri Jan 21 16:48:06 CET 2011 (Debug)"
  10. +# Server objects
  11. +SOBJECTS=server/MaraBigHash.o
  12. +# js_string library (buffer overflow resistant string library) objects
  13. +JOBJS=libs/JsStr.o libs/JsStrOS.o libs/JsStrCP.o
  14. +# MaraHash (assosciative array) library objects
  15. +MHOBJS=libs/MaraHash.o
  16. +# Parser objects
  17. +POBJECTS=parse/ParseMaraRc.o parse/ParseCsv1.o ../parse/ParseIpAcl.o
  18. +# DNS query processing library objects
  19. +DOBJECTS=dns/Queries.o dns/Compress.o dns/bobbit.o
  20. +# Secure random number generator objects
  21. +ROBJECTS=rng/rng-api-fst.o rng/rng-alg-fst.o
  22. +OBJECTS=$(JOBJS) $(MHOBJS) $(SOBJECTS) $(DOBJECTS) $(POBJECTS) $(DOBJECTS) $(ROBJECTS)
  23. +EXECS=server/maradns
  24. -debug:
  25. - ./configure ; make debug
  26. +# Uncomment the following three lines to get this to compile on Solaris
  27. +# LDFLAGS=-lxnet
  28. +# CC=gcc $(LDFLAGS) -DSELECT_PROBLEM
  29. +# M="CC=$(CC)"
  30. +# These are currently unused, but will be needed again if we use flock() again
  31. +# CFLAGS=-I/usr/ucbinclude
  32. +# L="CC=$(CC) $(CFLAGS)"
  33. +# LDFLAGS=-L/usr/ucblib -lucb -lxnet
  34. +# end the Solaris section
  35. +# Non-Solaris version of "M"
  36. +VER="VERSION=$(VERSION)"
  37. +Q="DEFINES=-DSELECT_PROBLEM"
  38. +
  39. +# Debug
  40. +
  41. +CFLAGS ?= -O2 -Wall -DSELECT_PROBLEM
  42. +M="CC=$(CC)"
  43. +D="CC=$(CC) -DDEBUG -DTHREADS"
  44. +#FLAGS = -g
  45. +
  46. +all:
  47. + cd libs ; make $(M) ; cd ../dns ; make $(M) ; \
  48. + cd ../rng ; make $(M) ; cd ../parse ; make $(M) ; \
  49. + cd ../qual ; make $(M) ; cd ../server ; \
  50. + make $(M) $(VER) COMPILED=\"$(COMPILED)\" ; \
  51. + cd ../tools ; make $(M) ; \
  52. + cd ../tcp ; make $(M) $(VER)
  53. +
  54. +debug:
  55. + cd libs ; make $(D) DEBUG="-DDEBUG -DTHREADS" ; \
  56. + cd ../dns ; make $(D) ; cd ../rng ; make $(D) ; \
  57. + cd ../parse ; make $(D) ; cd ../qual ; make $(D) ; \
  58. + cd ../server ; \
  59. + make $(D) $(Q) $(V) COMPILED=\"$(COMPILED_DEBUG)\" ; \
  60. + cd ../tools ; make $(D) ; \
  61. + cd ../tcp ; make $(D) $(V) ; cat ../00README.FIRST
  62. clean:
  63. - ./configure ; make clean
  64. + rm -f $(OBJECTS) core $(EXECS) ; \
  65. + cp build/Makefile.w Makefile ; cd dns ; make clean ; \
  66. + cd ../libs ; make clean ; cd ../parse ; make clean ; \
  67. + cd ../qual ; make clean ; \
  68. + cd ../server ; make clean ; \
  69. + cp Makefile.recursive Makefile ; \
  70. + cd ../test ; make clean ; \
  71. + cd ../tools ; make clean ; \
  72. + cd misc ; make clean ; \
  73. + cd ../../utf8 ; make clean ; \
  74. + cd ../tcp ; make clean ; \
  75. + cd ../rng ; make clean ; \
  76. + cd ../sqa ; make clean ; \
  77. + # ; cd .. ; find . -type d | grep .deps | xargs rm -fr ; find . -name '*.o' | xargs rm
  78. -uninstall:
  79. - ./configure ; make uninstall
  80. +strip:
  81. + cd server; strip maradns ; cd ../tcp ; \
  82. + strip zoneserver getzone fetchzone ; \
  83. + cd ../tools ; strip askmara
  84. install:
  85. - echo Please compile MaraDNS first
  86. + VERSION=$(VERSION) ./build/install.sh
  87. +
  88. +uninstall:
  89. + VERSION=$(VERSION) ./build/uninstall.sh
  90. +