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