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