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