fixed install target to create a ca-bundle.crt since we have no longer one in the...
[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.8g
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 # RM    = rm -f
84 # if you want to mark the target as MTSAFE you will need a tool for
85 # generating the xdc data for the linker; here's a minimal tool:
86 # http://www.gknw.net/development/prgtools/mkxdc.zip
87 MPKXDC  = mkxdc
88
89 # LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH))
90 LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH))
91
92 # Include the version info retrieved from curlver.h
93 -include $(OBJDIR)/version.inc
94
95 # Global flags for all compilers
96 CFLAGS  = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
97
98 ifeq ($(CC),mwccnlm)
99 LD      = mwldnlm
100 LDFLAGS = -nostdlib $(PRELUDE) $(OBJL) -o $@ -commandfile
101 AR      = mwldnlm
102 ARFLAGS = -nostdlib -type library -o
103 LIBEXT  = lib
104 #RANLIB =
105 CFLAGS  += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586
106 CFLAGS  += -relax_pointers
107 #CFLAGS += -w on
108 ifeq ($(LIBARCH),LIBC)
109 ifeq ($(POSIXFL),1)
110         PRELUDE = $(SDK_LIBC)/imports/posixpre.o
111 else
112         PRELUDE = $(SDK_LIBC)/imports/libcpre.o
113 endif
114         CFLAGS += -align 4
115 else
116         # PRELUDE = $(SDK_CLIB)/imports/clibpre.o
117         # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
118         PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
119         # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
120         CFLAGS += -align 1
121 endif
122 else
123 LD      = nlmconv
124 LDFLAGS = -T
125 AR      = ar
126 ARFLAGS = -cq
127 LIBEXT  = a
128 RANLIB  = ranlib
129 CFLAGS  += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
130 CFLAGS  += -Wall # -pedantic
131 ifeq ($(LIBARCH),LIBC)
132 ifeq ($(POSIXFL),1)
133         PRELUDE = $(SDK_LIBC)/imports/posixpre.gcc.o
134 else
135         PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
136 endif
137 else
138         PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
139         # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
140         # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
141         # PRELUDE = $(NDK_ROOT)/pre/prelude.o
142         CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
143 endif
144 endif
145
146 NDK_ROOT = $(NDKBASE)/ndk
147 SDK_CLIB = $(NDK_ROOT)/nwsdk
148 SDK_LIBC = $(NDK_ROOT)/libc
149 SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
150 CURL_INC = ../include
151 CURL_LIB = ../lib
152 ARES_LIB = ../ares
153
154 INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
155
156 ifdef WITH_ARES
157         INCLUDES += -I$(ARES_LIB)
158         LDLIBS += $(ARES_LIB)/libcares.$(LIBEXT)
159 endif
160 ifdef WITH_SSH2
161         INCLUDES += -I$(LIBSSH2_PATH)/include
162 ifdef LINK_STATIC
163         LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT)
164 else
165         MODULES += libssh2.nlm
166         IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp
167 endif
168 endif
169 ifdef WITH_SSL
170         INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L) -I$(OPENSSL_PATH)/outinc_nw_$(LIBARCH_L)/openssl
171         LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
172         LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
173         IMPORTS += GetProcessSwitchCount RunningProcess
174         INSTDEP += ca-bundle.crt
175 endif
176 ifdef WITH_ZLIB
177         INCLUDES += -I$(ZLIB_PATH)
178 ifdef LINK_STATIC
179         LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
180 else
181         MODULES += libz.nlm
182         IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
183 endif
184 endif
185
186 ifeq ($(LIBARCH),LIBC)
187         INCLUDES += -I$(SDK_LIBC)/include
188         # INCLUDES += -I$(SDK_LIBC)/include/nks
189         # INCLUDES += -I$(SDK_LIBC)/include/winsock
190         CFLAGS += -D_POSIX_SOURCE
191 else
192         INCLUDES += -I$(SDK_CLIB)/include/nlm
193         # INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
194         # INCLUDES += -I$(SDK_CLIB)/include
195 endif
196 ifndef DISABLE_LDAP
197         INCLUDES += -I$(SDK_LDAP)/$(LIBARCH_L)/inc
198 endif
199 CFLAGS  += $(INCLUDES)
200
201 ifeq ($(MTSAFE),YES)
202         XDCOPT = -n
203 endif
204 ifeq ($(MTSAFE),NO)
205         XDCOPT = -u
206 endif
207 ifdef XDCOPT
208         XDCDATA = $(OBJDIR)/$(TARGET).xdc
209 endif
210
211 ifeq ($(findstring linux,$(OSTYPE)),linux)
212 DL      = '
213 DS      = /
214 #-include $(NDKBASE)/nlmconv/ncpfs.inc
215 else
216 DS      = \\
217 endif
218
219 # Makefile.inc provides the CSOURCES and HHEADERS defines
220 include Makefile.inc
221
222 OBJS    := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CSOURCES))) $(OBJDIR)/nwos.o
223
224 OBJL    = $(OBJS) $(OBJDIR)/nwlib.o $(LDLIBS)
225
226 all: lib nlm
227
228 nlm: prebuild $(TARGET).nlm
229
230 lib: prebuild $(TARGET).$(LIBEXT)
231
232 prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h ca-bundle.h
233
234 $(OBJDIR)/%.o: %.c
235 #       @echo Compiling $<
236         $(CC) $(CFLAGS) -c $< -o $@
237
238 $(OBJDIR)/version.inc: ../include/curl/curlver.h $(OBJDIR)
239         @echo Creating $@
240         @$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
241
242 dist: all
243         -$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(TARGET).map $(OBJDIR)/$(TARGET).ncv
244         -$(RM) $(OBJDIR)/$(TARGET).def $(OBJDIR)/version.inc $(XDCDATA)
245
246 install: $(INSTDIR) all $(INSTDEP)
247         @$(CP) $(TARGET).nlm $(INSTDIR)
248         @$(CP) $(TARGET).$(LIBEXT) $(INSTDIR)
249         @$(CP) ../CHANGES $(INSTDIR)
250         @$(CP) ../COPYING $(INSTDIR)
251         @$(CP) ../README $(INSTDIR)
252         @$(CP) ../RELEASE-NOTES $(INSTDIR)
253 ifdef WITH_SSL
254         @-$(CP) ca-bundle.crt $(INSTDIR)/ca-bundle.crt
255 endif
256
257 clean:
258         -$(RM) config.h ca-bundle.h
259         -$(RM) -r $(OBJDIR)
260
261 distclean: clean
262         -$(RM) -r $(TARGET).$(LIBEXT) $(TARGET).nlm
263
264 $(INSTDIR):
265         @mkdir $@
266
267 $(OBJDIR):
268         @mkdir $@
269
270 $(TARGET).$(LIBEXT): $(OBJS)
271         @echo Creating $@
272         @-$(RM) $@
273         @$(AR) $(ARFLAGS) $@ $^
274 ifdef RANLIB
275         @$(RANLIB) $@
276 endif
277
278 $(TARGET).nlm: $(OBJDIR)/$(TARGET).def $(OBJL) $(XDCDATA)
279         @echo Linking $@
280         @-$(RM) $@
281         @$(LD) $(LDFLAGS) $<
282
283 $(OBJDIR)/%.xdc: Makefile.netware
284         @echo Creating $@
285         @$(MPKXDC) $(XDCOPT) $@
286
287 $(OBJDIR)/%.def: Makefile.netware
288         @echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
289         @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
290         @echo $(DL)# All your changes will be lost!!$(DL) >> $@
291         @echo $(DL)#$(DL) >> $@
292         @echo $(DL)copyright "$(COPYR)"$(DL) >> $@
293         @echo $(DL)description "$(DESCR)"$(DL) >> $@
294         @echo $(DL)version $(VERSION)$(DL) >> $@
295 ifdef NLMTYPE
296         @echo $(DL)type $(NLMTYPE)$(DL) >> $@
297 endif
298 ifdef STACK
299         @echo $(DL)stack $(STACK)$(DL) >> $@
300 endif
301 ifdef SCREEN
302         @echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
303 else
304         @echo $(DL)screenname "DEFAULT"$(DL) >> $@
305 endif
306 ifneq ($(DB),NDEBUG)
307         @echo $(DL)debug$(DL) >> $@
308 endif
309         @echo $(DL)threadname "$(TARGET)"$(DL) >> $@
310 ifdef XDCDATA
311         @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
312 endif
313         @echo $(DL)flag_on 64$(DL) >> $@
314 ifeq ($(LIBARCH),CLIB)
315         @echo $(DL)start _Prelude$(DL) >> $@
316         @echo $(DL)exit _Stop$(DL) >> $@
317         @echo $(DL)import @$(SDK_CLIB)/imports/clib.imp$(DL) >> $@
318         @echo $(DL)import @$(SDK_CLIB)/imports/threads.imp$(DL) >> $@
319         @echo $(DL)import @$(SDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
320         @echo $(DL)import @$(SDK_CLIB)/imports/socklib.imp$(DL) >> $@
321         @echo $(DL)module clib$(DL) >> $@
322 ifndef DISABLE_LDAP
323         @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
324         @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
325 #       @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
326         @echo $(DL)module ldapsdk ldapssl$(DL) >> $@
327 endif
328 else
329 ifeq ($(POSIXFL),1)
330         @echo $(DL)flag_on 4194304$(DL) >> $@
331 endif
332         @echo $(DL)pseudopreemption$(DL) >> $@
333 ifeq ($(findstring posixpre,$(PRELUDE)),posixpre)
334         @echo $(DL)start POSIX_Start$(DL) >> $@
335         @echo $(DL)exit POSIX_Stop$(DL) >> $@
336         @echo $(DL)check POSIX_CheckUnload$(DL) >> $@
337 else
338         @echo $(DL)start _LibCPrelude$(DL) >> $@
339         @echo $(DL)exit _LibCPostlude$(DL) >> $@
340         @echo $(DL)check _LibCCheckUnload$(DL) >> $@
341 endif
342         @echo $(DL)import @$(SDK_LIBC)/imports/libc.imp$(DL) >> $@
343         @echo $(DL)import @$(SDK_LIBC)/imports/netware.imp$(DL) >> $@
344         @echo $(DL)module libc$(DL) >> $@
345 ifndef DISABLE_LDAP
346         @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
347         @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
348 #       @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
349         @echo $(DL)module lldapsdk lldapssl$(DL) >> $@
350 endif
351 endif
352 ifdef MODULES
353         @echo $(DL)module $(MODULES)$(DL) >> $@
354 endif
355 ifdef EXPORTS
356         @echo $(DL)export $(EXPORTS)$(DL) >> $@
357 endif
358 ifdef IMPORTS
359         @echo $(DL)import $(IMPORTS)$(DL) >> $@
360 endif
361 ifeq ($(findstring nlmconv,$(LD)),nlmconv)
362         @echo $(DL)input $(PRELUDE)$(DL) >> $@
363         @echo $(DL)input $(OBJL)$(DL) >> $@
364 #ifdef LDLIBS
365 #       @echo $(DL)input $(LDLIBS)$(DL) >> $@
366 #endif
367         @echo $(DL)output $(TARGET).nlm$(DL) >> $@
368 endif
369
370 config.h: Makefile.netware
371         @echo Creating $@
372         @echo $(DL)/* $@ for NetWare target.$(DL) > $@
373         @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
374         @echo $(DL)** All your changes will be lost!!$(DL) >> $@
375         @echo $(DL)*/$(DL) >> $@
376         @echo $(DL)#ifndef NETWARE$(DL) >> $@
377         @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
378         @echo $(DL)#endif$(DL) >> $@
379         @echo $(DL)#define VERSION "$(LIBCURL_VERSION_STR)"$(DL) >> $@
380         @echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
381 ifeq ($(LIBARCH),CLIB)
382         @echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
383         @echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
384         @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@
385         @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
386         @echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
387         @echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
388         @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
389         @echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
390         @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
391         @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
392         @echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
393         @echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
394         @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
395         @echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
396         @echo $(DL)#define socklen_t int$(DL) >> $@
397 else
398         @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
399         @echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
400         @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
401         @echo $(DL)#define HAVE_INET_PTON 1$(DL) >> $@
402         @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
403         @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
404         @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
405         @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
406         @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
407         @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
408         @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
409         @echo $(DL)#define HAVE_STRTOLL 1$(DL) >> $@
410         @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
411         @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
412         @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
413         @echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
414         @echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
415         @echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
416         @echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
417         @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
418         @echo $(DL)#define RECV_TYPE_ARG2 void *$(DL) >> $@
419         @echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@
420         @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
421         @echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@
422         @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
423         @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
424         @echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@
425         @echo $(DL)#define SEND_TYPE_ARG3 size_t$(DL) >> $@
426         @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
427         @echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@
428         @echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
429 ifdef ENABLE_IPV6
430         @echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
431 endif
432 endif
433         @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
434         @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
435         @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
436         @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
437         @echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
438         @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
439         @echo $(DL)#define HAVE_GETHOSTBYNAME 1$(DL) >> $@
440         @echo $(DL)#define HAVE_GETPROTOBYNAME 1$(DL) >> $@
441         @echo $(DL)#define HAVE_GMTIME_R 1$(DL) >> $@
442         @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
443         @echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@
444         @echo $(DL)#define HAVE_LL 1$(DL) >> $@
445         @echo $(DL)#define HAVE_LOCALTIME_R 1$(DL) >> $@
446         @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
447         @echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
448         @echo $(DL)#define HAVE_RECV 1$(DL) >> $@
449         @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
450         @echo $(DL)#define HAVE_SEND 1$(DL) >> $@
451         @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
452         @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
453         @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
454         @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
455         @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
456         @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
457         @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
458         @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
459         @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
460         @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
461         @echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
462         @echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
463         @echo $(DL)#define HAVE_SYS_IOCTL_H 1$(DL) >> $@
464         @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
465         @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
466         @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
467         @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
468         @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
469         @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
470         @echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
471         @echo $(DL)#define RETSIGTYPE void$(DL) >> $@
472         @echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@
473         @echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
474         @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
475         @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
476 ifdef DISABLE_LDAP
477         @echo $(DL)#define CURL_DISABLE_LDAP 1$(DL) >> $@
478 else
479         @echo $(DL)#define CURL_HAS_NOVELL_LDAPSDK 1$(DL) >> $@
480 ifndef DISABLE_LDAPS
481         @echo $(DL)#define HAVE_LDAP_SSL 1$(DL) >> $@
482 endif
483         @echo $(DL)#define HAVE_LDAP_SSL_H 1$(DL) >> $@
484         @echo $(DL)#define HAVE_LDAP_URL_PARSE 1$(DL) >> $@
485 endif
486 ifdef NW_WINSOCK
487         @echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
488 else
489         @echo $(DL)#define USE_BSD_SOCKETS 1$(DL) >> $@
490         @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
491         @echo $(DL)#define HAVE_SYS_SOCKET_H 1$(DL) >> $@
492         @echo $(DL)#define HAVE_SYS_SOCKIO_H 1$(DL) >> $@
493         @echo $(DL)#define HAVE_NETDB_H 1$(DL) >> $@
494 endif
495 ifdef WITH_ARES
496         @echo $(DL)#define USE_ARES 1$(DL) >> $@
497 endif
498 ifdef WITH_ZLIB
499         @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
500         @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
501 endif
502 ifdef WITH_SSL
503         @echo $(DL)#define USE_SSLEAY 1$(DL) >> $@
504         @echo $(DL)#define USE_OPENSSL 1$(DL) >> $@
505         @echo $(DL)#define HAVE_OPENSSL_X509_H 1$(DL) >> $@
506         @echo $(DL)#define HAVE_OPENSSL_SSL_H 1$(DL) >> $@
507         @echo $(DL)#define HAVE_OPENSSL_RSA_H 1$(DL) >> $@
508         @echo $(DL)#define HAVE_OPENSSL_PEM_H 1$(DL) >> $@
509         @echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@
510         @echo $(DL)#define HAVE_OPENSSL_CRYPTO_H 1$(DL) >> $@
511         @echo $(DL)#define HAVE_OPENSSL_ENGINE_H 1$(DL) >> $@
512         @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
513         @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
514         @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
515 endif
516 ifdef WITH_SSH2
517         @echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
518         @echo $(DL)#define HAVE_LIBSSH2_H 1$(DL) >> $@
519 endif
520         @echo $(DL)#ifdef __GNUC__$(DL) >> $@
521         @echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@
522         @echo $(DL)#else$(DL) >> $@
523         @echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@
524         @echo $(DL)#endif$(DL) >> $@
525 ifdef OLD_NOVELLSDK
526         @echo $(DL)#define socklen_t int$(DL) >> $@
527 endif
528
529 FORCE: ;
530
531 ca-bundle.h: FORCE Makefile.netware
532         @echo Creating $@
533         @echo $(DL)/* Do not edit this file - it is created by make!$(DL) > $@
534         @echo $(DL)** All your changes will be lost!!$(DL) >> $@
535         @echo $(DL)*/$(DL) >> $@
536 ifdef CABUNDLE
537         @echo $(DL)#define CURL_CA_BUNDLE "$(CABUNDLE)"$(DL) >> $@
538 else
539         @echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@
540 endif
541
542 info: $(OBJDIR)/version.inc
543         @echo Configured to build $(TARGET) with these options:
544         @echo libarchitecture: $(LIBARCH)
545         @echo curl version:    $(LIBCURL_VERSION_STR)
546         @echo compiler/linker: $(CC) / $(LD)
547 ifdef CABUNDLE
548         @echo ca-bundle path:  $(CABUNDLE)
549 endif
550 ifdef WITH_SSL
551         @echo SSL support:     enabled (OpenSSL)
552 else
553         @echo SSL support:     no
554 endif
555 ifdef WITH_SSH2
556         @echo SSH2 support:    enabled (libssh2)
557 else
558         @echo SSH2 support:    no
559 endif
560 ifdef WITH_ZLIB
561         @echo zlib support:    enabled
562 else
563         @echo zlib support:    no
564 endif
565 ifdef WITH_ARES
566         @echo c-ares support:  enabled
567 else
568         @echo c-ares support:  no
569 endif
570 ifdef ENABLE_IPV6
571         @echo ipv6 support:    enabled
572 else
573         @echo ipv6 support:    no
574 endif
575
576 $(ARES_LIB)/libcares.$(LIBEXT):
577         $(MAKE) -C $(ARES_LIB) -f Makefile.netware lib
578
579 ca-bundle.crt: mk-ca-bundle.pl
580         @echo Creating $@
581         @-$(PERL) $< -b -n $@
582
583