2 # Common defines for curl (djgpp/Watt-32)
4 # Assumes you've unpacked cURL with long-file names
5 # I.e use "set LFN=y" before untaring on Win9x/XP.
6 # Requires sed, yacc, rm and the usual stuff.
8 # Define TOPDIR before including this file.
12 MAKEFILE = Makefile.dj
16 # Find out if using a Unix-like shell or a DOS command interpreter
18 ifneq ($(findstring COMMAND.COM,$(SHELL)),COMMAND.COM)
19 ifneq ($(findstring CMD.EXE,$(SHELL)),CMD.EXE)
20 ifneq ($(findstring 4DOS.COM,$(SHELL)),4DOS.COM)
27 # Define shell dependent commands and vars
29 ifeq ($(IS_UNIX_SHELL),1)
44 # OpenSSL is available from www.openssl.org and builds okay
45 # with djgpp/Watt-32. Set to 0 if you don't need https URLs
46 # (reduces curl.exe with approx 700 kB)
51 # Use zlib for contents encoding
56 # Use libidn for international domain names
61 # Use Watt-32 IPv6 stack (only IPv6 name resolution working at the moment)
66 # Use C-Ares resolver library
71 # Enable debug code in libcurl/curl
76 # Enable memory tracking code in libcurl/curl
83 # Root directory for Waterloo tcp/ip etc. Change to suite.
84 # WATT_ROOT should be set during Watt-32 install.
86 WATT32_ROOT = $(subst \,/,$(WATT_ROOT))
87 OPENSSL_ROOT = e:/net/openssl.099
88 ZLIB_ROOT = $(DJDIR)/contrib/zlib
89 LIBIDN_ROOT = $(TOPDIR)/../IDN/libidn
90 ARES_ROOT = $(TOPDIR)/ares
95 CFLAGS = -g -O2 -I. -I$(TOPDIR)/include -I$(TOPDIR)/lib \
96 -I$(WATT32_ROOT)/inc -Wall -DHAVE_CONFIG_H
99 CFLAGS += -DUSE_SSLEAY -DUSE_OPENSSL -I$(OPENSSL_ROOT)
103 CFLAGS += -DUSE_ZLIB -I$(ZLIB_ROOT)
107 CFLAGS += -DENABLE_IPV6
111 CFLAGS += -DUSE_ARES -I$(ARES_ROOT)
115 CFLAGS += -DHAVE_LIBIDN -DHAVE_IDN_FREE_H -DHAVE_IDN_FREE -DHAVE_TLD_H \
116 -DHAVE_TLD_STRERROR -I$(LIBIDN_ROOT)/lib
119 ifeq ($(USE_DEBUG),1)
120 CFLAGS += -DDEBUG=1 -DDEBUGBUILD
123 ifeq ($(USE_CURLDEBUG),1)
124 CFLAGS += -DCURLDEBUG
131 $(CC) $(CFLAGS) -o $@ -c $<
134 depend: $(DEPEND_PREREQ) $(MAKEFILE)
135 $(CC) -MM $(CFLAGS) $(CSOURCES) | \
136 sed -e 's/^\([a-zA-Z0-9_-]*\.o:\)/$$(OBJ_DIR)\/\1/' > depend.dj