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