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