1c428edea1343d9e3c6465b9c7621746bf9f5289
[platform/upstream/curl.git] / src / Makefile.netware
1 #################################################################
2 #
3 ## Makefile for building curl.nlm (NetWare version - gnu make)
4 ## Use: make -f Makefile.netware
5 ##
6 ## Comments to: Guenter Knauf http://www.gknw.net/phpbb
7 #
8 #################################################################
9
10 # Edit the path below to point to the base of your Novell NDK.
11 ifndef NDKBASE
12 NDKBASE = c:/novell
13 endif
14
15 # Edit the path below to point to the base of your Zlib sources.
16 ifndef ZLIB_PATH
17 ZLIB_PATH = ../../zlib-1.2.5
18 endif
19
20 # Edit the path below to point to the base of your OpenSSL package.
21 ifndef OPENSSL_PATH
22 OPENSSL_PATH = ../../openssl-0.9.8o
23 endif
24
25 # Edit the path below to point to the base of your LibSSH2 package.
26 ifndef LIBSSH2_PATH
27 LIBSSH2_PATH = ../../libssh2-1.2.6
28 endif
29
30 # Edit the path below to point to the base of your libidn package.
31 ifndef LIBIDN_PATH
32 LIBIDN_PATH = ../../libidn-1.18
33 endif
34
35 # Edit the path below to point to the base of your c-ares package.
36 ifndef LIBCARES_PATH
37 LIBCARES_PATH = ../ares
38 endif
39
40 ifndef INSTDIR
41 INSTDIR = ..$(DS)curl-$(LIBCURL_VERSION_STR)-bin-nw
42 endif
43
44 # Edit the vars below to change NLM target settings.
45 TARGET  = curl
46 VERSION = $(LIBCURL_VERSION)
47 COPYR   = Copyright (C) $(LIBCURL_COPYRIGHT_STR)
48 DESCR   = cURL $(LIBCURL_VERSION_STR) ($(LIBARCH)) - http://curl.haxx.se
49 MTSAFE  = YES
50 STACK   = 64000
51 SCREEN  = $(TARGET) commandline utility
52 # Comment the line below if you dont want to load protected automatically.
53 # LDRING = 3
54
55 # Uncomment the next line to enable linking with POSIX semantics.
56 # POSIXFL = 1
57
58 # Edit the var below to point to your lib architecture.
59 ifndef LIBARCH
60 LIBARCH = LIBC
61 endif
62
63 # must be equal to NDEBUG or DEBUG, CURLDEBUG
64 ifndef DB
65 DB      = NDEBUG
66 endif
67 # Optimization: -O<n> or debugging: -g
68 ifeq ($(DB),NDEBUG)
69         OPT     = -O2
70         OBJDIR  = release
71 else
72         OPT     = -g
73         OBJDIR  = debug
74 endif
75
76 # The following lines defines your compiler.
77 ifdef CWFolder
78         METROWERKS = $(CWFolder)
79 endif
80 ifdef METROWERKS
81         # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
82         MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support
83         CC = mwccnlm
84 else
85         CC = gcc
86 endif
87 PERL    = perl
88 # a native win32 awk can be downloaded from here:
89 # http://www.gknw.net/development/prgtools/awk-20070501.zip
90 AWK     = awk
91 CP      = cp -afv
92 MKDIR   = mkdir
93 # RM    = rm -f
94 # if you want to mark the target as MTSAFE you will need a tool for
95 # generating the xdc data for the linker; here's a minimal tool:
96 # http://www.gknw.net/development/prgtools/mkxdc.zip
97 MPKXDC  = mkxdc
98
99 # LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH))
100 LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH))
101
102 # Include the version info retrieved from curlver.h
103 -include $(OBJDIR)/version.inc
104
105 # Global flags for all compilers
106 CFLAGS  += $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
107
108 ifeq ($(CC),mwccnlm)
109 LD      = mwldnlm
110 LDFLAGS = -nostdlib $(OBJS) $(PRELUDE) $(LDLIBS) -o $@ -commandfile
111 LIBEXT  = lib
112 CFLAGS  += -gccinc -inline off -opt nointrinsics -proc 586
113 CFLAGS  += -relax_pointers
114 #CFLAGS += -w on
115 ifeq ($(LIBARCH),LIBC)
116 ifeq ($(POSIXFL),1)
117         PRELUDE = $(SDK_LIBC)/imports/posixpre.o
118 else
119         PRELUDE = $(SDK_LIBC)/imports/libcpre.o
120 endif
121         CFLAGS += -align 4
122 else
123         # PRELUDE = $(SDK_CLIB)/imports/clibpre.o
124         # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
125         PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
126         # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
127         CFLAGS += -align 1
128 endif
129 else
130 LD      = nlmconv
131 LDFLAGS = -T
132 LIBEXT  = a
133 CFLAGS  += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
134 CFLAGS  += -Wall # -pedantic
135 ifeq ($(LIBARCH),LIBC)
136 ifeq ($(POSIXFL),1)
137         PRELUDE = $(SDK_LIBC)/imports/posixpre.gcc.o
138 else
139         PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
140 endif
141 else
142         # PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
143         # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
144         # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
145         PRELUDE = $(NDK_ROOT)/pre/prelude.o
146         CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
147 endif
148 endif
149
150 NDK_ROOT = $(NDKBASE)/ndk
151 SDK_CLIB = $(NDK_ROOT)/nwsdk
152 SDK_LIBC = $(NDK_ROOT)/libc
153 SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
154 CURL_INC = ../include
155 CURL_LIB = ../lib
156
157 INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
158
159 ifdef LINK_STATIC
160         LDLIBS  = $(CURL_LIB)/libcurl.$(LIBEXT)
161 ifdef WITH_ARES
162         LDLIBS += $(LIBCARES_PATH)/libcares.$(LIBEXT)
163 endif
164 else
165         MODULES = libcurl.nlm
166         IMPORTS = @$(CURL_LIB)/libcurl.imp
167 endif
168 ifdef WITH_SSH2
169         INCLUDES += -I$(LIBSSH2_PATH)/include
170 ifdef LINK_STATIC
171         LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT)
172 else
173         MODULES += libssh2.nlm
174         IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp
175 endif
176 endif
177 ifdef WITH_SSL
178         INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
179         LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
180         LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
181         IMPORTS += GetProcessSwitchCount RunningProcess
182 endif
183 ifdef WITH_ZLIB
184         INCLUDES += -I$(ZLIB_PATH)
185 ifdef LINK_STATIC
186         LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
187 else
188         MODULES += libz.nlm
189         IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
190 endif
191 endif
192 ifdef WITH_IDN
193         # INCLUDES += -I$(LIBIDN_PATH)/include
194         LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT)
195 endif
196
197 ifeq ($(LIBARCH),LIBC)
198         INCLUDES += -I$(SDK_LIBC)/include
199         # INCLUDES += -I$(SDK_LIBC)/include/nks
200         # INCLUDES += -I$(SDK_LIBC)/include/winsock
201         CFLAGS += -D_POSIX_SOURCE
202 else
203         INCLUDES += -I$(SDK_CLIB)/include/nlm
204         # INCLUDES += -I$(SDK_CLIB)/include
205 endif
206 ifndef DISABLE_LDAP
207         # INCLUDES += -I$(SDK_LDAP)/$(LIBARCH_L)/inc
208 endif
209 CFLAGS  += $(INCLUDES)
210
211 ifeq ($(MTSAFE),YES)
212         XDCOPT = -n
213 endif
214 ifeq ($(MTSAFE),NO)
215         XDCOPT = -u
216 endif
217 ifdef XDCOPT
218         XDCDATA = $(OBJDIR)/$(TARGET).xdc
219 endif
220
221 ifeq ($(findstring /sh,$(SHELL)),/sh)
222 DL      = '
223 DS      = /
224 PCT     = %
225 #-include $(NDKBASE)/nlmconv/ncpfs.inc
226 else
227 DS      = \\
228 PCT     = %%
229 endif
230
231 # Makefile.inc provides the CSOURCES and HHEADERS defines
232 include Makefile.inc
233
234 OBJX    := $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(strip $(CURLX_ONES))))
235 OBJS    := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CURL_SOURCES))) $(OBJX)
236
237 vpath %.c $(CURL_LIB)
238
239 all: prebuild $(TARGET).nlm
240
241 prebuild: $(OBJDIR) $(OBJDIR)/version.inc curl_config.h
242
243 $(OBJDIR)/%.o: %.c
244 #       @echo Compiling $<
245         $(CC) $(CFLAGS) -c $< -o $@
246
247 $(OBJDIR)/version.inc: $(CURL_INC)/curl/curlver.h $(OBJDIR)
248         @echo Creating $@
249         @$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
250
251 install: $(INSTDIR) all
252         @-$(CP) ../docs/$(TARGET).pdf $(INSTDIR)
253         @-$(CP) ../docs/$(TARGET).html $(INSTDIR)
254         @$(CP) $(TARGET).nlm $(INSTDIR)
255
256 clean:
257 ifeq "$(wildcard hugehelp.c.cvs)" "hugehelp.c.cvs"
258         -$(RM) hugehelp.c
259 endif
260         -$(RM) curl_config.h
261         -$(RM) -r $(OBJDIR)
262
263 distclean: clean
264         -$(RM) $(TARGET).nlm
265
266 $(OBJDIR) $(INSTDIR):
267         @$(MKDIR) $@
268
269 $(TARGET).nlm: $(OBJS) $(OBJDIR)/$(TARGET).def $(XDCDATA)
270         @echo Linking $@
271         @-$(RM) $@
272         @$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
273
274 $(OBJDIR)/%.xdc: Makefile.netware
275         @echo Creating $@
276         @$(MPKXDC) $(XDCOPT) $@
277
278 $(OBJDIR)/%.def: Makefile.netware
279         @echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
280         @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
281         @echo $(DL)# All your changes will be lost!!$(DL) >> $@
282         @echo $(DL)#$(DL) >> $@
283         @echo $(DL)copyright "$(COPYR)"$(DL) >> $@
284         @echo $(DL)description "$(DESCR)"$(DL) >> $@
285         @echo $(DL)version $(VERSION)$(DL) >> $@
286 ifdef NLMTYPE
287         @echo $(DL)type $(NLMTYPE)$(DL) >> $@
288 endif
289 ifdef STACK
290         @echo $(DL)stack $(STACK)$(DL) >> $@
291 endif
292 ifdef SCREEN
293         @echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
294 else
295         @echo $(DL)screenname "DEFAULT"$(DL) >> $@
296 endif
297 ifneq ($(DB),NDEBUG)
298         @echo $(DL)debug$(DL) >> $@
299 endif
300         @echo $(DL)threadname "$(TARGET)"$(DL) >> $@
301 ifdef XDCDATA
302         @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
303 endif
304 ifeq ($(LDRING),0)
305         @echo $(DL)flag_on 16$(DL) >> $@
306 endif
307 ifeq ($(LDRING),3)
308         @echo $(DL)flag_on 512$(DL) >> $@
309 endif
310 ifeq ($(LIBARCH),CLIB)
311         @echo $(DL)start _Prelude$(DL) >> $@
312         @echo $(DL)exit _Stop$(DL) >> $@
313         @echo $(DL)import @$(SDK_CLIB)/imports/clib.imp$(DL) >> $@
314         @echo $(DL)import @$(SDK_CLIB)/imports/threads.imp$(DL) >> $@
315         @echo $(DL)import @$(SDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
316         @echo $(DL)import @$(SDK_CLIB)/imports/socklib.imp$(DL) >> $@
317         @echo $(DL)module clib$(DL) >> $@
318 ifndef DISABLE_LDAP
319         @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
320         @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
321 #       @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
322         @echo $(DL)module ldapsdk ldapssl$(DL) >> $@
323 endif
324 else
325 ifeq ($(POSIXFL),1)
326         @echo $(DL)flag_on 4194304$(DL) >> $@
327 endif
328         @echo $(DL)flag_on 64$(DL) >> $@
329         @echo $(DL)pseudopreemption$(DL) >> $@
330 ifeq ($(findstring posixpre,$(PRELUDE)),posixpre)
331         @echo $(DL)start POSIX_Start$(DL) >> $@
332         @echo $(DL)exit POSIX_Stop$(DL) >> $@
333         @echo $(DL)check POSIX_CheckUnload$(DL) >> $@
334 else
335         @echo $(DL)start _LibCPrelude$(DL) >> $@
336         @echo $(DL)exit _LibCPostlude$(DL) >> $@
337         @echo $(DL)check _LibCCheckUnload$(DL) >> $@
338 endif
339         @echo $(DL)import @$(SDK_LIBC)/imports/libc.imp$(DL) >> $@
340         @echo $(DL)import @$(SDK_LIBC)/imports/netware.imp$(DL) >> $@
341         @echo $(DL)module libc$(DL) >> $@
342 ifndef DISABLE_LDAP
343         @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
344         @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
345 #       @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
346         @echo $(DL)module lldapsdk lldapssl$(DL) >> $@
347 endif
348 endif
349 ifdef MODULES
350         @echo $(DL)module $(MODULES)$(DL) >> $@
351 endif
352 ifdef EXPORTS
353         @echo $(DL)export $(EXPORTS)$(DL) >> $@
354 endif
355 ifdef IMPORTS
356         @echo $(DL)import $(IMPORTS)$(DL) >> $@
357 endif
358 ifeq ($(findstring nlmconv,$(LD)),nlmconv)
359         @echo $(DL)input $(PRELUDE)$(DL) >> $@
360         @echo $(DL)input $(OBJS)$(DL) >> $@
361 ifdef LDLIBS
362         @echo $(DL)input $(LDLIBS)$(DL) >> $@
363 endif
364         @echo $(DL)output $(TARGET).nlm$(DL) >> $@
365 endif
366
367 curl_config.h: Makefile.netware
368         @echo Creating $@
369         @echo $(DL)/* $@ for NetWare target.$(DL) > $@
370         @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
371         @echo $(DL)** All your changes will be lost!!$(DL) >> $@
372         @echo $(DL)*/$(DL) >> $@
373         @echo $(DL)#ifndef NETWARE$(DL) >> $@
374         @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
375         @echo $(DL)#endif$(DL) >> $@
376         @echo $(DL)#define VERSION "$(LIBCURL_VERSION_STR)"$(DL) >> $@
377         @echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
378 ifeq ($(LIBARCH),CLIB)
379         @echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
380         @echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
381         @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@
382         @echo $(DL)#define HAVE_STRNICMP 1$(DL) >> $@
383         @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
384         @echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
385         @echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
386         @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
387         @echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
388         @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
389         @echo $(DL)#define RECVFROM_TYPE_ARG2 char$(DL) >> $@
390         @echo $(DL)#define RECVFROM_TYPE_ARG3 int$(DL) >> $@
391         @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
392         @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
393         @echo $(DL)#define RECVFROM_TYPE_ARG6 int$(DL) >> $@
394         @echo $(DL)#define RECVFROM_TYPE_RETV int$(DL) >> $@
395         @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
396         @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
397         @echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
398         @echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
399         @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
400         @echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
401         @echo $(DL)#define pressanykey PressAnyKeyToContinue$(DL) >> $@
402 else
403         @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
404         @echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
405         @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
406         @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
407         @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
408         @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
409         @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
410         @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
411         @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
412         @echo $(DL)#define HAVE_STRTOLL 1$(DL) >> $@
413         @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
414         @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
415         @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
416         @echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
417         @echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
418         @echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
419         @echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
420         @echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@
421         @echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
422         @echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
423         @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
424         @echo $(DL)#define RECV_TYPE_ARG2 void *$(DL) >> $@
425         @echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@
426         @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
427         @echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@
428         @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
429         @echo $(DL)#define RECVFROM_TYPE_ARG2 void$(DL) >> $@
430         @echo $(DL)#define RECVFROM_TYPE_ARG3 size_t$(DL) >> $@
431         @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
432         @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
433         @echo $(DL)#define RECVFROM_TYPE_ARG6 size_t$(DL) >> $@
434         @echo $(DL)#define RECVFROM_TYPE_RETV ssize_t$(DL) >> $@
435         @echo $(DL)#define RECVFROM_TYPE_ARG2_IS_VOID 1$(DL) >> $@
436         @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
437         @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
438         @echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@
439         @echo $(DL)#define SEND_TYPE_ARG3 size_t$(DL) >> $@
440         @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
441         @echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@
442         @echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
443         @echo $(DL)#define SIZEOF_OFF_T 8$(DL) >> $@
444         @echo $(DL)#define _LARGEFILE 1$(DL) >> $@
445 ifdef ENABLE_IPV6
446         @echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
447 endif
448 endif
449         @echo $(DL)#define USE_MANUAL 1$(DL) >> $@
450         @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
451         @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
452         @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
453         @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
454         @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
455         @echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@
456         @echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
457         @echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
458         @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
459         @echo $(DL)#define HAVE_IOCTL 1$(DL) >> $@
460         @echo $(DL)#define HAVE_IOCTL_FIONBIO 1$(DL) >> $@
461         @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
462         @echo $(DL)#define HAVE_LL 1$(DL) >> $@
463         @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@
464         @echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
465         @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
466         @echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
467         @echo $(DL)#define HAVE_RECV 1$(DL) >> $@
468         @echo $(DL)#define HAVE_RECVFROM 1$(DL) >> $@
469         @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
470         @echo $(DL)#define HAVE_SEND 1$(DL) >> $@
471         @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
472         @echo $(DL)#define HAVE_SETLOCALE 1$(DL) >> $@
473         @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
474         @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
475         @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
476         @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
477         @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
478         @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
479         @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
480         @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
481         @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
482         @echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
483         @echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
484         @echo $(DL)#define HAVE_SYS_IOCTL_H 1$(DL) >> $@
485         @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
486         @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
487         @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
488         @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
489         @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
490         @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
491         @echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
492         @echo $(DL)#define HAVE_WRITEV 1$(DL) >> $@
493         @echo $(DL)#define RETSIGTYPE void$(DL) >> $@
494         @echo $(DL)#define SIZEOF_INT 4$(DL) >> $@
495         @echo $(DL)#define SIZEOF_SHORT 2$(DL) >> $@
496         @echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
497         @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
498         @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
499 ifdef DISABLE_LDAP
500         @echo $(DL)#define CURL_DISABLE_LDAP 1$(DL) >> $@
501 else
502         @echo $(DL)#define CURL_HAS_NOVELL_LDAPSDK 1$(DL) >> $@
503 ifndef DISABLE_LDAPS
504         @echo $(DL)#define HAVE_LDAP_SSL 1$(DL) >> $@
505 endif
506         @echo $(DL)#define HAVE_LDAP_SSL_H 1$(DL) >> $@
507         @echo $(DL)#define HAVE_LDAP_URL_PARSE 1$(DL) >> $@
508 endif
509 ifdef NW_WINSOCK
510         @echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
511 else
512         @echo $(DL)#define USE_BSD_SOCKETS 1$(DL) >> $@
513         @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
514         @echo $(DL)#define HAVE_SYS_SOCKET_H 1$(DL) >> $@
515         @echo $(DL)#define HAVE_SYS_SOCKIO_H 1$(DL) >> $@
516         @echo $(DL)#define HAVE_NETDB_H 1$(DL) >> $@
517 endif
518 ifdef WITH_ARES
519         @echo $(DL)#define USE_ARES 1$(DL) >> $@
520 endif
521 ifdef WITH_ZLIB
522         @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
523         @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
524 endif
525 ifdef WITH_SSL
526         @echo $(DL)#define USE_SSLEAY 1$(DL) >> $@
527         @echo $(DL)#define USE_OPENSSL 1$(DL) >> $@
528         @echo $(DL)#define HAVE_OPENSSL_X509_H 1$(DL) >> $@
529         @echo $(DL)#define HAVE_OPENSSL_SSL_H 1$(DL) >> $@
530         @echo $(DL)#define HAVE_OPENSSL_RSA_H 1$(DL) >> $@
531         @echo $(DL)#define HAVE_OPENSSL_PEM_H 1$(DL) >> $@
532         @echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@
533         @echo $(DL)#define HAVE_OPENSSL_CRYPTO_H 1$(DL) >> $@
534         @echo $(DL)#define HAVE_OPENSSL_ENGINE_H 1$(DL) >> $@
535         @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
536         @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
537         @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
538 endif
539 ifdef WITH_SSH2
540         @echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
541         @echo $(DL)#define HAVE_LIBSSH2_H 1$(DL) >> $@
542 endif
543 ifdef WITH_IDN
544         @echo $(DL)#define HAVE_LIBIDN 1$(DL) >> $@
545         @echo $(DL)#define HAVE_TLD_H 1$(DL) >> $@
546 endif
547         @echo $(DL)#ifdef __GNUC__$(DL) >> $@
548         @echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@
549         @echo $(DL)#else$(DL) >> $@
550         @echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@
551         @echo $(DL)#endif$(DL) >> $@
552 ifdef CABUNDLE
553         @echo $(DL)#define CURL_CA_BUNDLE "$(CABUNDLE)"$(DL) >> $@
554 else
555         @echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@
556 endif
557
558 hugehelp.c:
559         @echo Creating $@
560         @$(CP) hugehelp.c.cvs $@
561
562 $(LIBCARES_PATH)/libcares.$(LIBEXT):
563         $(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib
564
565