common.dj 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #
  2. # Common defines for curl (djgpp/Watt-32)
  3. #
  4. # Assumes you've unpacked cURL with short-file names
  5. # I.e use "set LFN=n" before untaring on Win9x/XP.
  6. # Requires sed, yacc, rm and the usual stuff.
  7. #
  8. .SUFFIXES: .exe .y
  9. MAKEFILE = Makefile.dj
  10. #
  11. # OpenSSL is available from www.openssl.org and builds okay
  12. # with djgpp/Watt-32. Set to 0 if you don't need https URLs
  13. # (reduces curl.exe with approx 700 kB)
  14. #
  15. USE_SSL = 0
  16. #
  17. # Use zlib for contents encoding
  18. #
  19. USE_ZLIB = 0
  20. #
  21. # Use Watt-32 IPv6 stack (only IPv6 name resolution working at the moment)
  22. #
  23. USE_IPV6 = 1
  24. default: all
  25. #
  26. # Root directory for Waterloo tcp/ip etc. Change to suite.
  27. # WATT_ROOT should be set during Watt-32 install.
  28. #
  29. WATT32_ROOT = $(subst \,/,$(WATT_ROOT))
  30. OPENSSL_ROOT = /net/openssl.098
  31. ZLIB_ROOT = /djgpp/contrib/zlib.121
  32. CC = gcc
  33. YACC = bison -y
  34. CFLAGS = -g -O2 -I. -I../include -Wall -DHAVE_CONFIG_H -DHAVE_SPNEGO
  35. ifeq ($(USE_SSL),1)
  36. CFLAGS += -DUSE_SSLEAY
  37. endif
  38. ifeq ($(USE_ZLIB),1)
  39. CFLAGS += -DUSE_ZLIB -I$(ZLIB_ROOT)
  40. endif
  41. ifeq ($(USE_IPV6),1)
  42. CFLAGS += -DENABLE_IPV6
  43. endif
  44. #
  45. # Generated dependencies; Due to some hacks in gcc 2.95+ and djgpp 2.03
  46. # we must prevent "$(DJDIR)/bin/../include/sys/version.h" from beeing
  47. # included in dependency output (or else this makefile cannot be used on
  48. # another machine). We therefore use a special 'specs' file during
  49. # pre-processing.
  50. #
  51. MM_SPECS = ./specs.dj
  52. depend: $(DEPEND_PREREQ)
  53. @echo Generating dependencies..
  54. @copy $(MAKEFILE) Makefile.bak
  55. @echo "*cpp: %(cpp_cpu) %{posix:-D_POSIX_SOURCE} -remap" > $(MM_SPECS)
  56. sed -e "/^# DO NOT DELETE THIS LINE/,$$d" < Makefile.bak > $(MAKEFILE)
  57. echo "# DO NOT DELETE THIS LINE" >> $(MAKEFILE)
  58. $(CC) -MM -specs=$(MM_SPECS) $(CFLAGS) $(SOURCES) >> $(MAKEFILE)
  59. rm -f $(MM_SPECS)