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