Updated OpenSSL version, added links to docu.
[platform/upstream/curl.git] / lib / Makefile.netware
1 #################################################################
2 #
3 ## Makefile for building libcurl.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.8r
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.7
28 endif
29
30 # Edit the path below to point to the base of your axTLS package.
31 ifndef AXTLS_PATH
32 AXTLS_PATH = ../../axTLS-1.2.7
33 endif
34
35 # Edit the path below to point to the base of your libidn package.
36 ifndef LIBIDN_PATH
37 LIBIDN_PATH = ../../libidn-1.18
38 endif
39
40 # Edit the path below to point to the base of your librtmp package.
41 ifndef LIBRTMP_PATH
42 LIBRTMP_PATH = ../../librtmp-2.3
43 endif
44
45 # Edit the path below to point to the base of your c-ares package.
46 ifndef LIBCARES_PATH
47 LIBCARES_PATH = ../ares
48 endif
49
50 ifndef INSTDIR
51 INSTDIR = ..$(DS)curl-$(LIBCURL_VERSION_STR)-bin-nw
52 endif
53
54 # Edit the vars below to change NLM target settings.
55 TARGET  = libcurl
56 VERSION = $(LIBCURL_VERSION)
57 COPYR   = Copyright (C) $(LIBCURL_COPYRIGHT_STR)
58 DESCR   = cURL libcurl $(LIBCURL_VERSION_STR) ($(LIBARCH)) - http://curl.haxx.se
59 MTSAFE  = YES
60 STACK   = 64000
61 SCREEN  = none
62 EXPORTS = @libcurl.imp
63
64 # Uncomment the next line to enable linking with POSIX semantics.
65 # POSIXFL = 1
66
67 # Edit the var below to point to your lib architecture.
68 ifndef LIBARCH
69 LIBARCH = LIBC
70 endif
71
72 # must be equal to NDEBUG or DEBUG, CURLDEBUG
73 ifndef DB
74 DB      = NDEBUG
75 endif
76 # Optimization: -O<n> or debugging: -g
77 ifeq ($(DB),NDEBUG)
78         OPT     = -O2
79         OBJDIR  = release
80 else
81         OPT     = -g
82         OBJDIR  = debug
83 endif
84
85 # The following lines defines your compiler.
86 ifdef CWFolder
87         METROWERKS = $(CWFolder)
88 endif
89 ifdef METROWERKS
90         # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
91         MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support
92         CC = mwccnlm
93 else
94         CC = gcc
95 endif
96 PERL    = perl
97 # Here you can find a native Win32 binary of the original awk:
98 # http://www.gknw.net/development/prgtools/awk-20070501.zip
99 AWK     = awk
100 CP      = cp -afv
101 MKDIR   = mkdir
102 # RM    = rm -f
103 # If you want to mark the target as MTSAFE you will need a tool for
104 # generating the xdc data for the linker; here's a minimal tool:
105 # http://www.gknw.net/development/prgtools/mkxdc.zip
106 MPKXDC  = mkxdc
107
108 # LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH))
109 LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH))
110
111 # Include the version info retrieved from curlver.h
112 -include $(OBJDIR)/version.inc
113
114 # Global flags for all compilers
115 CFLAGS  += $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
116
117 ifeq ($(CC),mwccnlm)
118 LD      = mwldnlm
119 LDFLAGS = -nostdlib $(PRELUDE) $(OBJL) -o $@ -commandfile
120 AR      = mwldnlm
121 ARFLAGS = -nostdlib -type library -o
122 LIBEXT  = lib
123 #RANLIB =
124 CFLAGS  += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586
125 CFLAGS  += -relax_pointers
126 #CFLAGS += -w on
127 ifeq ($(LIBARCH),LIBC)
128 ifeq ($(POSIXFL),1)
129         PRELUDE = $(NDK_LIBC)/imports/posixpre.o
130 else
131         PRELUDE = $(NDK_LIBC)/imports/libcpre.o
132 endif
133         CFLAGS += -align 4
134 else
135         # PRELUDE = $(NDK_CLIB)/imports/clibpre.o
136         # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
137         PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
138         # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
139         CFLAGS += -align 1
140 endif
141 else
142 LD      = nlmconv
143 LDFLAGS = -T
144 AR      = ar
145 ARFLAGS = -cq
146 LIBEXT  = a
147 RANLIB  = ranlib
148 CFLAGS  += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
149 CFLAGS  += -Wall # -pedantic
150 ifeq ($(LIBARCH),LIBC)
151 ifeq ($(POSIXFL),1)
152         PRELUDE = $(NDK_LIBC)/imports/posixpre.gcc.o
153 else
154         PRELUDE = $(NDK_LIBC)/imports/libcpre.gcc.o
155 endif
156 else
157         PRELUDE = $(NDK_CLIB)/imports/clibpre.gcc.o
158         # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
159         # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
160         # PRELUDE = $(NDK_ROOT)/pre/prelude.o
161         CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
162 endif
163 endif
164
165 NDK_ROOT = $(NDKBASE)/ndk
166 ifndef NDK_CLIB
167 NDK_CLIB = $(NDK_ROOT)/nwsdk
168 endif
169 ifndef NDK_LIBC
170 NDK_LIBC = $(NDK_ROOT)/libc
171 endif
172 ifndef NDK_LDAP
173 NDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
174 endif
175 CURL_INC = ../include
176 CURL_LIB = ../lib
177
178 INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
179
180 ifdef WITH_ARES
181         INCLUDES += -I$(LIBCARES_PATH)
182         LDLIBS += $(LIBCARES_PATH)/libcares.$(LIBEXT)
183 endif
184 ifdef WITH_SSH2
185         INCLUDES += -I$(LIBSSH2_PATH)/include
186 ifdef LINK_STATIC
187         LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT)
188 else
189         MODULES += libssh2.nlm
190         IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp
191 endif
192 endif
193 ifdef WITH_RTMP
194         INCLUDES += -I$(LIBRTMP_PATH)
195         LDLIBS += $(LIBRTMP_PATH)/librtmp/librtmp.$(LIBEXT)
196 endif
197 ifdef WITH_SSL
198         INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)
199         LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
200         LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
201         IMPORTS += GetProcessSwitchCount RunningProcess
202         INSTDEP += ca-bundle.crt
203 else
204 ifdef WITH_AXTLS
205         INCLUDES += -I$(AXTLS_PATH)/inc
206 ifdef LINK_STATIC
207         LDLIBS += $(AXTLS_PATH)/lib/libaxtls.$(LIBEXT)
208 else
209         MODULES += libaxtls.nlm
210         IMPORTS += $(AXTLS_PATH)/lib/libaxtls.imp
211 endif
212         INSTDEP += ca-bundle.crt
213 endif
214 endif
215 ifdef WITH_ZLIB
216         INCLUDES += -I$(ZLIB_PATH)
217 ifdef LINK_STATIC
218         LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
219 else
220         MODULES += libz.nlm
221         IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
222 endif
223 endif
224 ifdef WITH_IDN
225         INCLUDES += -I$(LIBIDN_PATH)/include
226         LDLIBS += $(LIBIDN_PATH)/lib/libidn.$(LIBEXT)
227 endif
228
229 ifeq ($(LIBARCH),LIBC)
230         INCLUDES += -I$(NDK_LIBC)/include
231         # INCLUDES += -I$(NDK_LIBC)/include/nks
232         # INCLUDES += -I$(NDK_LIBC)/include/winsock
233         CFLAGS += -D_POSIX_SOURCE
234 else
235         INCLUDES += -I$(NDK_CLIB)/include/nlm
236         # INCLUDES += -I$(NDK_CLIB)/include/nlm/obsolete
237         # INCLUDES += -I$(NDK_CLIB)/include
238 endif
239 ifndef DISABLE_LDAP
240         INCLUDES += -I$(NDK_LDAP)/$(LIBARCH_L)/inc
241 endif
242 CFLAGS  += $(INCLUDES)
243
244 ifeq ($(MTSAFE),YES)
245         XDCOPT = -n
246 endif
247 ifeq ($(MTSAFE),NO)
248         XDCOPT = -u
249 endif
250 ifdef XDCOPT
251         XDCDATA = $(OBJDIR)/$(TARGET).xdc
252 endif
253
254 ifeq ($(findstring /sh,$(SHELL)),/sh)
255 DL      = '
256 DS      = /
257 PCT     = %
258 #-include $(NDKBASE)/nlmconv/ncpfs.inc
259 else
260 DS      = \\
261 PCT     = %%
262 endif
263
264 # Makefile.inc provides the CSOURCES and HHEADERS defines
265 include Makefile.inc
266
267 OBJS    := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CSOURCES))) $(OBJDIR)/nwos.o
268
269 OBJL    = $(OBJS) $(OBJDIR)/nwlib.o $(LDLIBS)
270
271 all: lib nlm
272
273 nlm: prebuild $(TARGET).nlm
274
275 lib: prebuild $(TARGET).$(LIBEXT)
276
277 prebuild: $(OBJDIR) $(CURL_INC)/curl/curlbuild.h $(OBJDIR)/version.inc curl_config.h
278
279 $(OBJDIR)/%.o: %.c
280 #       @echo Compiling $<
281         $(CC) $(CFLAGS) -c $< -o $@
282
283 $(OBJDIR)/version.inc: ../include/curl/curlver.h $(OBJDIR)
284         @echo Creating $@
285         @$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
286
287 install: $(INSTDIR) all $(INSTDEP)
288         @$(CP) $(TARGET).nlm $(INSTDIR)
289         @$(CP) $(TARGET).$(LIBEXT) $(INSTDIR)
290         @$(CP) ../CHANGES $(INSTDIR)
291         @$(CP) ../COPYING $(INSTDIR)
292         @$(CP) ../README $(INSTDIR)
293         @$(CP) ../RELEASE-NOTES $(INSTDIR)
294 ifdef WITH_SSL
295         @-$(CP) ca-bundle.crt $(INSTDIR)/ca-bundle.crt
296 endif
297
298 clean:
299         -$(RM) curl_config.h
300         -$(RM) -r $(OBJDIR)
301
302 distclean vclean: clean
303         -$(RM) $(TARGET).$(LIBEXT) $(TARGET).nlm
304         -$(RM) certdata.txt ca-bundle.crt
305
306 $(OBJDIR) $(INSTDIR):
307         @$(MKDIR) $@
308
309 $(TARGET).$(LIBEXT): $(OBJS)
310         @echo Creating $@
311         @-$(RM) $@
312         @$(AR) $(ARFLAGS) $@ $^
313 ifdef RANLIB
314         @$(RANLIB) $@
315 endif
316
317 $(TARGET).nlm: $(OBJDIR)/$(TARGET).def $(OBJL) $(XDCDATA)
318         @echo Linking $@
319         @-$(RM) $@
320         @$(LD) $(LDFLAGS) $<
321
322 $(OBJDIR)/%.xdc: Makefile.netware
323         @echo Creating $@
324         @$(MPKXDC) $(XDCOPT) $@
325
326 $(OBJDIR)/%.def: Makefile.netware
327         @echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
328         @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
329         @echo $(DL)# All your changes will be lost!!$(DL) >> $@
330         @echo $(DL)#$(DL) >> $@
331         @echo $(DL)copyright "$(COPYR)"$(DL) >> $@
332         @echo $(DL)description "$(DESCR)"$(DL) >> $@
333         @echo $(DL)version $(VERSION)$(DL) >> $@
334 ifdef NLMTYPE
335         @echo $(DL)type $(NLMTYPE)$(DL) >> $@
336 endif
337 ifdef STACK
338         @echo $(DL)stack $(STACK)$(DL) >> $@
339 endif
340 ifdef SCREEN
341         @echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
342 else
343         @echo $(DL)screenname "DEFAULT"$(DL) >> $@
344 endif
345 ifneq ($(DB),NDEBUG)
346         @echo $(DL)debug$(DL) >> $@
347 endif
348         @echo $(DL)threadname "$(TARGET)"$(DL) >> $@
349 ifdef XDCDATA
350         @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
351 endif
352         @echo $(DL)flag_on 64$(DL) >> $@
353 ifeq ($(LIBARCH),CLIB)
354         @echo $(DL)start _Prelude$(DL) >> $@
355         @echo $(DL)exit _Stop$(DL) >> $@
356         @echo $(DL)import @$(NDK_CLIB)/imports/clib.imp$(DL) >> $@
357         @echo $(DL)import @$(NDK_CLIB)/imports/threads.imp$(DL) >> $@
358         @echo $(DL)import @$(NDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
359         @echo $(DL)import @$(NDK_CLIB)/imports/socklib.imp$(DL) >> $@
360         @echo $(DL)module clib$(DL) >> $@
361 ifndef DISABLE_LDAP
362         @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
363         @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
364 #       @echo $(DL)import @$(NDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
365         @echo $(DL)module ldapsdk ldapssl$(DL) >> $@
366 endif
367 else
368 ifeq ($(POSIXFL),1)
369         @echo $(DL)flag_on 4194304$(DL) >> $@
370 endif
371         @echo $(DL)pseudopreemption$(DL) >> $@
372 ifeq ($(findstring posixpre,$(PRELUDE)),posixpre)
373         @echo $(DL)start POSIX_Start$(DL) >> $@
374         @echo $(DL)exit POSIX_Stop$(DL) >> $@
375         @echo $(DL)check POSIX_CheckUnload$(DL) >> $@
376 else
377         @echo $(DL)start _LibCPrelude$(DL) >> $@
378         @echo $(DL)exit _LibCPostlude$(DL) >> $@
379         @echo $(DL)check _LibCCheckUnload$(DL) >> $@
380 endif
381         @echo $(DL)import @$(NDK_LIBC)/imports/libc.imp$(DL) >> $@
382         @echo $(DL)import @$(NDK_LIBC)/imports/netware.imp$(DL) >> $@
383         @echo $(DL)module libc$(DL) >> $@
384 ifndef DISABLE_LDAP
385         @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
386         @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
387 #       @echo $(DL)import @$(NDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
388         @echo $(DL)module lldapsdk lldapssl$(DL) >> $@
389 endif
390 endif
391 ifdef MODULES
392         @echo $(DL)module $(MODULES)$(DL) >> $@
393 endif
394 ifdef EXPORTS
395         @echo $(DL)export $(EXPORTS)$(DL) >> $@
396 endif
397 ifdef IMPORTS
398         @echo $(DL)import $(IMPORTS)$(DL) >> $@
399 endif
400 ifeq ($(findstring nlmconv,$(LD)),nlmconv)
401         @echo $(DL)input $(PRELUDE)$(DL) >> $@
402         @echo $(DL)input $(OBJL)$(DL) >> $@
403 #ifdef LDLIBS
404 #       @echo $(DL)input $(LDLIBS)$(DL) >> $@
405 #endif
406         @echo $(DL)output $(TARGET).nlm$(DL) >> $@
407 endif
408
409 curl_config.h: Makefile.netware
410         @echo Creating $@
411         @echo $(DL)/* $@ for NetWare target.$(DL) > $@
412         @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
413         @echo $(DL)** All your changes will be lost!!$(DL) >> $@
414         @echo $(DL)*/$(DL) >> $@
415         @echo $(DL)#ifndef NETWARE$(DL) >> $@
416         @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
417         @echo $(DL)#endif$(DL) >> $@
418         @echo $(DL)#define VERSION "$(LIBCURL_VERSION_STR)"$(DL) >> $@
419         @echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
420 ifeq ($(LIBARCH),CLIB)
421         @echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
422         @echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
423         @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@
424         @echo $(DL)#define HAVE_STRNICMP 1$(DL) >> $@
425         @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
426         @echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
427         @echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
428         @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
429         @echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
430         @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
431         @echo $(DL)#define RECVFROM_TYPE_ARG2 char$(DL) >> $@
432         @echo $(DL)#define RECVFROM_TYPE_ARG3 int$(DL) >> $@
433         @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
434         @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
435         @echo $(DL)#define RECVFROM_TYPE_ARG6 int$(DL) >> $@
436         @echo $(DL)#define RECVFROM_TYPE_RETV int$(DL) >> $@
437         @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
438         @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
439         @echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
440         @echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
441         @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
442         @echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
443         @echo $(DL)#define SIZEOF_SIZE_T 4$(DL) >> $@
444         @echo $(DL)#define pressanykey PressAnyKeyToContinue$(DL) >> $@
445 else
446         @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
447         @echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
448         @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
449         @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
450         @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
451         @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
452         @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
453         @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
454         @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
455         @echo $(DL)#define HAVE_STRTOLL 1$(DL) >> $@
456         @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
457         @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
458         @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
459         @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
460         @echo $(DL)#define RECV_TYPE_ARG2 void *$(DL) >> $@
461         @echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@
462         @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
463         @echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@
464         @echo $(DL)#define RECVFROM_TYPE_ARG1 int$(DL) >> $@
465         @echo $(DL)#define RECVFROM_TYPE_ARG2 void$(DL) >> $@
466         @echo $(DL)#define RECVFROM_TYPE_ARG3 size_t$(DL) >> $@
467         @echo $(DL)#define RECVFROM_TYPE_ARG4 int$(DL) >> $@
468         @echo $(DL)#define RECVFROM_TYPE_ARG5 struct sockaddr$(DL) >> $@
469         @echo $(DL)#define RECVFROM_TYPE_ARG6 size_t$(DL) >> $@
470         @echo $(DL)#define RECVFROM_TYPE_RETV ssize_t$(DL) >> $@
471         @echo $(DL)#define RECVFROM_TYPE_ARG2_IS_VOID 1$(DL) >> $@
472         @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
473         @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
474         @echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@
475         @echo $(DL)#define SEND_TYPE_ARG3 size_t$(DL) >> $@
476         @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
477         @echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@
478         @echo $(DL)#define SIZEOF_OFF_T 8$(DL) >> $@
479         @echo $(DL)#define SIZEOF_SIZE_T 8$(DL) >> $@
480         @echo $(DL)#define _LARGEFILE 1$(DL) >> $@
481 ifdef ENABLE_IPV6
482         @echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
483         @echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
484         @echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
485         @echo $(DL)#define HAVE_FREEADDRINFO 1$(DL) >> $@
486         @echo $(DL)#define HAVE_GETADDRINFO 1$(DL) >> $@
487         @echo $(DL)#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1$(DL) >> $@
488         @echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
489         @echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
490         @echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
491         @echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
492 endif
493 endif
494         @echo $(DL)#define USE_MANUAL 1$(DL) >> $@
495         @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
496         @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
497         @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
498         @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
499         @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
500         @echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@
501         @echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
502         @echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
503         @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
504         @echo $(DL)#define HAVE_IOCTL 1$(DL) >> $@
505         @echo $(DL)#define HAVE_IOCTL_FIONBIO 1$(DL) >> $@
506         @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
507         @echo $(DL)#define HAVE_LL 1$(DL) >> $@
508         @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@
509         @echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
510         @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
511         @echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
512         @echo $(DL)#define HAVE_RECV 1$(DL) >> $@
513         @echo $(DL)#define HAVE_RECVFROM 1$(DL) >> $@
514         @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
515         @echo $(DL)#define HAVE_SEND 1$(DL) >> $@
516         @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
517         @echo $(DL)#define HAVE_SETLOCALE 1$(DL) >> $@
518         @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
519         @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
520         @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
521         @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
522         @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
523         @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
524         @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
525         @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
526         @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
527         @echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
528         @echo $(DL)#define HAVE_SYS_IOCTL_H 1$(DL) >> $@
529         @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
530         @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
531         @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
532         @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
533         @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
534         @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
535         @echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
536         @echo $(DL)#define HAVE_WRITEV 1$(DL) >> $@
537         @echo $(DL)#define RETSIGTYPE void$(DL) >> $@
538         @echo $(DL)#define SIZEOF_INT 4$(DL) >> $@
539         @echo $(DL)#define SIZEOF_SHORT 2$(DL) >> $@
540         @echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
541         @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
542         @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
543 ifdef DISABLE_LDAP
544         @echo $(DL)#define CURL_DISABLE_LDAP 1$(DL) >> $@
545 else
546         @echo $(DL)#define CURL_HAS_NOVELL_LDAPSDK 1$(DL) >> $@
547 ifndef DISABLE_LDAPS
548         @echo $(DL)#define HAVE_LDAP_SSL 1$(DL) >> $@
549 endif
550         @echo $(DL)#define HAVE_LDAP_SSL_H 1$(DL) >> $@
551         @echo $(DL)#define HAVE_LDAP_URL_PARSE 1$(DL) >> $@
552 endif
553 ifdef NW_WINSOCK
554         @echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
555 else
556         @echo $(DL)#define USE_BSD_SOCKETS 1$(DL) >> $@
557         @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
558         @echo $(DL)#define HAVE_SYS_SOCKET_H 1$(DL) >> $@
559         @echo $(DL)#define HAVE_SYS_SOCKIO_H 1$(DL) >> $@
560         @echo $(DL)#define HAVE_NETDB_H 1$(DL) >> $@
561 endif
562 ifdef WITH_ARES
563         @echo $(DL)#define USE_ARES 1$(DL) >> $@
564 endif
565 ifdef WITH_ZLIB
566         @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
567         @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
568 endif
569 ifdef WITH_SSL
570         @echo $(DL)#define USE_SSLEAY 1$(DL) >> $@
571         @echo $(DL)#define USE_OPENSSL 1$(DL) >> $@
572         @echo $(DL)#define HAVE_OPENSSL_X509_H 1$(DL) >> $@
573         @echo $(DL)#define HAVE_OPENSSL_SSL_H 1$(DL) >> $@
574         @echo $(DL)#define HAVE_OPENSSL_RSA_H 1$(DL) >> $@
575         @echo $(DL)#define HAVE_OPENSSL_PEM_H 1$(DL) >> $@
576         @echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@
577         @echo $(DL)#define HAVE_OPENSSL_CRYPTO_H 1$(DL) >> $@
578         @echo $(DL)#define HAVE_OPENSSL_ENGINE_H 1$(DL) >> $@
579         @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
580         @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
581         @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
582 else
583 ifdef WITH_AXTLS
584         @echo $(DL)#define USE_AXTLS 1$(DL) >> $@
585 endif
586 endif
587 ifdef WITH_SSH2
588         @echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
589         @echo $(DL)#define HAVE_LIBSSH2_H 1$(DL) >> $@
590 endif
591 ifdef WITH_IDN
592         @echo $(DL)#define HAVE_LIBIDN 1$(DL) >> $@
593         @echo $(DL)#define HAVE_TLD_H 1$(DL) >> $@
594 endif
595 ifdef WITH_RTMP
596         @echo $(DL)#define USE_LIBRTMP 1$(DL) >> $@
597 endif
598         @echo $(DL)#ifdef __GNUC__$(DL) >> $@
599         @echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@
600         @echo $(DL)#else$(DL) >> $@
601         @echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@
602         @echo $(DL)#endif$(DL) >> $@
603 ifdef CABUNDLE
604         @echo $(DL)#define CURL_CA_BUNDLE "$(CABUNDLE)"$(DL) >> $@
605 else
606         @echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@
607 endif
608
609 FORCE: ;
610
611 info: $(OBJDIR)/version.inc
612         @echo Configured to build $(TARGET) with these options:
613         @echo libarchitecture: $(LIBARCH)
614         @echo curl version:    $(LIBCURL_VERSION_STR)
615         @echo compiler/linker: $(CC) / $(LD)
616 ifdef CABUNDLE
617         @echo ca-bundle path:  $(CABUNDLE)
618 endif
619 ifdef WITH_SSL
620         @echo SSL support:     enabled (OpenSSL)
621 else
622         @echo SSL support:     no
623 endif
624 ifdef WITH_SSH2
625         @echo SSH2 support:    enabled (libssh2)
626 else
627         @echo SSH2 support:    no
628 endif
629 ifdef WITH_ZLIB
630         @echo zlib support:    enabled
631 else
632         @echo zlib support:    no
633 endif
634 ifdef WITH_ARES
635         @echo c-ares support:  enabled
636 else
637         @echo c-ares support:  no
638 endif
639 ifdef ENABLE_IPV6
640         @echo ipv6 support:    enabled
641 else
642         @echo ipv6 support:    no
643 endif
644
645 $(LIBCARES_PATH)/libcares.$(LIBEXT):
646         $(MAKE) -C $(LIBCARES_PATH) -f Makefile.netware lib
647
648 ca-bundle.crt: mk-ca-bundle.pl
649         @echo Creating $@
650         @-$(PERL) $< -b -n $@
651
652 $(CURL_INC)/curl/curlbuild.h: Makefile.netware FORCE
653         @echo Creating $@
654         @echo $(DL)/* $@ intended for NetWare target.$(DL) > $@
655         @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
656         @echo $(DL)** All your changes will be lost!!$(DL) >> $@
657         @echo $(DL)*/$(DL) >> $@
658         @echo $(DL)#ifndef NETWARE$(DL) >> $@
659         @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
660         @echo $(DL)#endif$(DL) >> $@
661         @echo $(DL)#ifndef __CURL_CURLBUILD_H$(DL) >> $@
662         @echo $(DL)#define __CURL_CURLBUILD_H$(DL) >> $@
663 ifeq ($(LIBARCH),LIBC)
664         @echo $(DL)#define CURL_SIZEOF_LONG 4$(DL) >> $@
665         @echo $(DL)#define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int$(DL) >> $@
666         @echo $(DL)#define CURL_SIZEOF_CURL_SOCKLEN_T 4$(DL) >> $@
667         @echo $(DL)#define CURL_TYPEOF_CURL_OFF_T long long$(DL) >> $@
668         @echo $(DL)#define CURL_FORMAT_CURL_OFF_T "lld"$(DL) >> $@
669         @echo $(DL)#define CURL_FORMAT_CURL_OFF_TU "llu"$(DL) >> $@
670         @echo $(DL)#define CURL_FORMAT_OFF_T "$(PCT)lld"$(DL) >> $@
671         @echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 8$(DL) >> $@
672         @echo $(DL)#define CURL_SUFFIX_CURL_OFF_T LL$(DL) >> $@
673         @echo $(DL)#define CURL_SUFFIX_CURL_OFF_TU ULL$(DL) >> $@
674 else
675         @echo $(DL)#define CURL_SIZEOF_LONG 4$(DL) >> $@
676         @echo $(DL)#define CURL_TYPEOF_CURL_SOCKLEN_T int$(DL) >> $@
677         @echo $(DL)#define CURL_SIZEOF_CURL_SOCKLEN_T 4$(DL) >> $@
678         @echo $(DL)#define CURL_TYPEOF_CURL_OFF_T long$(DL) >> $@
679         @echo $(DL)#define CURL_FORMAT_CURL_OFF_T "ld"$(DL) >> $@
680         @echo $(DL)#define CURL_FORMAT_CURL_OFF_TU "lu"$(DL) >> $@
681         @echo $(DL)#define CURL_FORMAT_OFF_T "$(PCT)ld"$(DL) >> $@
682         @echo $(DL)#define CURL_SIZEOF_CURL_OFF_T 4$(DL) >> $@
683         @echo $(DL)#define CURL_SUFFIX_CURL_OFF_T L$(DL) >> $@
684         @echo $(DL)#define CURL_SUFFIX_CURL_OFF_TU UL$(DL) >> $@
685 endif
686         @echo $(DL)typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;$(DL) >> $@
687         @echo $(DL)typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;$(DL) >> $@
688         @echo $(DL)#endif /* __CURL_CURLBUILD_H */$(DL) >> $@
689