common.dj 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. # Define TOPDIR before including this file.
  9. .SUFFIXES: .exe .y
  10. MAKEFILE = Makefile.dj
  11. OBJ_DIR = djgpp
  12. #
  13. # OpenSSL is available from www.openssl.org and builds okay
  14. # with djgpp/Watt-32. Set to 0 if you don't need https URLs
  15. # (reduces curl.exe with approx 700 kB)
  16. #
  17. USE_SSL = 0
  18. #
  19. # Use zlib for contents encoding
  20. #
  21. USE_ZLIB = 0
  22. #
  23. # Use libidn for international domain names
  24. #
  25. USE_IDNA = 0
  26. #
  27. # Use Watt-32 IPv6 stack (only IPv6 name resolution working at the moment)
  28. #
  29. USE_IPV6 = 0
  30. #
  31. # Use C-Ares resolver library
  32. # This conflicts with USE_IPV6=1
  33. #
  34. USE_ARES = 0
  35. #
  36. # Enable debug code in libcurl/curl
  37. #
  38. USE_DEBUG = 0
  39. default: all
  40. #
  41. # Root directory for Waterloo tcp/ip etc. Change to suite.
  42. # WATT_ROOT should be set during Watt-32 install.
  43. #
  44. WATT32_ROOT = $(subst \,/,$(WATT_ROOT))
  45. OPENSSL_ROOT = e:/net/openssl.099
  46. ZLIB_ROOT = $(DJDIR)/contrib/zlib
  47. LIBIDN_ROOT = $(TOPDIR)/../IDN/libidn
  48. ARES_ROOT = $(TOPDIR)/ares
  49. CC = gcc
  50. YACC = bison -y
  51. CFLAGS = -g -gcoff -O2 -I. -I$(TOPDIR)/include -I$(TOPDIR)/lib \
  52. -I$(WATT32_ROOT)/inc -Wall -DHAVE_CONFIG_H
  53. ifeq ($(USE_SSL),1)
  54. CFLAGS += -DUSE_SSLEAY -DUSE_OPENSSL -I$(OPENSSL_ROOT)
  55. endif
  56. ifeq ($(USE_ZLIB),1)
  57. CFLAGS += -DUSE_ZLIB -I$(ZLIB_ROOT)
  58. endif
  59. ifeq ($(USE_IPV6),1)
  60. CFLAGS += -DENABLE_IPV6
  61. endif
  62. ifeq ($(USE_ARES),1)
  63. CFLAGS += -DUSE_ARES -I$(ARES_ROOT)
  64. endif
  65. ifeq ($(USE_IDNA),1)
  66. CFLAGS += -DHAVE_LIBIDN -DHAVE_IDN_FREE_H -DHAVE_IDN_FREE -DHAVE_TLD_H \
  67. -DHAVE_TLD_STRERROR -I$(LIBIDN_ROOT)/lib
  68. endif
  69. ifeq ($(USE_DEBUG),1)
  70. CFLAGS += -DDEBUG=1 -DCURLDEBUG # -DDPRINTF_DEBUG2=1
  71. endif
  72. $(OBJ_DIR):
  73. mkdir $(OBJ_DIR)
  74. $(OBJ_DIR)/%.o: %.c
  75. $(CC) $(CFLAGS) -o $@ -c $<
  76. @echo
  77. depend: $(DEPEND_PREREQ) $(MAKEFILE)
  78. $(CC) -MM $(CFLAGS) $(CSOURCES) | \
  79. sed -e 's/^\([a-zA-Z0-9_-]*\.o:\)/$$(OBJ_DIR)\/\1/' > depend.dj