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