updated copyright for new year.
[platform/upstream/curl.git] / src / Makefile.netware
1 #################################################################
2 # $Id$
3 #
4 ## Makefile for building curl.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  = curl
37 VERSION = $(LIBCURL_VERSION)
38 COPYR   = Copyright (C) 1996 - 2008, Daniel Stenberg, <daniel@haxx.se>
39 DESCR   = cURL $(LIBCURL_VERSION_STR) ($(LIBARCH)) - http://curl.haxx.se
40 MTSAFE  = YES
41 STACK   = 64000
42 SCREEN  = $(TARGET) commandline utility
43 # Comment the line below if you dont want to load protected automatically.
44 #LDRING = 3
45
46 # Edit the var below to point to your lib architecture.
47 ifndef LIBARCH
48 LIBARCH = LIBC
49 endif
50
51 # must be equal to NDEBUG or DEBUG, CURLDEBUG
52 ifndef DB
53 DB      = NDEBUG
54 endif
55 # Optimization: -O<n> or debugging: -g
56 ifeq ($(DB),NDEBUG)
57         OPT     = -O2
58         OBJDIR  = release
59 else
60         OPT     = -g
61         OBJDIR  = debug
62 endif
63
64 # The following lines defines your compiler.
65 ifdef CWFolder
66         METROWERKS = $(CWFolder)
67 endif
68 ifdef METROWERKS
69         # MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support
70         MWCW_PATH = $(subst \,/,$(METROWERKS))/Novell Support/Metrowerks Support
71         CC = mwccnlm
72 else
73         CC = gcc
74 endif
75 # a native win32 awk can be downloaded from here:
76 # http://www.gknw.net/development/prgtools/awk-20050424.zip
77 AWK     = awk
78 CP      = cp -afv
79 # RM    = rm -f
80 # if you want to mark the target as MTSAFE you will need a tool for
81 # generating the xdc data for the linker; here's a minimal tool:
82 # http://www.gknw.net/development/prgtools/mkxdc.zip
83 MPKXDC  = mkxdc
84
85 # LIBARCH_U = $(shell $(AWK) 'BEGIN {print toupper(ARGV[1])}' $(LIBARCH))
86 LIBARCH_L = $(shell $(AWK) 'BEGIN {print tolower(ARGV[1])}' $(LIBARCH))
87
88 # Include the version info retrieved from curlver.h
89 -include $(OBJDIR)/version.inc
90
91 # Global flags for all compilers
92 CFLAGS  = $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
93
94 ifeq ($(CC),mwccnlm)
95 LD      = mwldnlm
96 LDFLAGS = -nostdlib $(OBJS) $(PRELUDE) $(LDLIBS) -o $@ -commandfile
97 LIBEXT  = lib
98 CFLAGS  += -gccinc -inline off -opt nointrinsics -proc 586
99 CFLAGS  += -relax_pointers
100 #CFLAGS += -w on
101 ifeq ($(LIBARCH),LIBC)
102         PRELUDE = $(SDK_LIBC)/imports/libcpre.o
103         CFLAGS += -align 4
104 else
105         # PRELUDE = $(SDK_CLIB)/imports/clibpre.o
106         # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
107         PRELUDE = "$(MWCW_PATH)/libraries/runtime/prelude.obj"
108         # CFLAGS += -include "$(MWCW_PATH)/headers/nlm_clib_prefix.h"
109         CFLAGS += -align 1
110 endif
111 else
112 LD      = nlmconv
113 LDFLAGS = -T
114 LIBEXT  = a
115 CFLAGS  += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
116 CFLAGS  += -Wall # -pedantic
117 ifeq ($(LIBARCH),LIBC)
118         PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
119 else
120         # PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
121         # to avoid the __init_* / __deinit_* whoes dont use prelude from NDK
122         # http://www.gknw.net/development/mk_nlm/gcc_pre.zip
123         PRELUDE = $(NDK_ROOT)/pre/prelude.o
124         CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
125 endif
126 endif
127
128 NDK_ROOT = $(NDKBASE)/ndk
129 SDK_CLIB = $(NDK_ROOT)/nwsdk
130 SDK_LIBC = $(NDK_ROOT)/libc
131 SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
132 CURL_INC = ../include
133 CURL_LIB = ../lib
134 ARES_LIB = ../ares
135
136 INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
137
138 ifdef LINK_STATIC
139         LDLIBS  = $(CURL_LIB)/libcurl.$(LIBEXT)
140 ifdef WITH_ARES
141         LDLIBS += $(ARES_LIB)/libcares.$(LIBEXT)
142 endif
143 else
144         MODULES = libcurl.nlm
145         IMPORTS = @$(CURL_LIB)/libcurl.imp
146 endif
147 ifdef WITH_SSH2
148         INCLUDES += -I$(LIBSSH2_PATH)/include
149 ifdef LINK_STATIC
150         LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT)
151 else
152         MODULES += libssh2.nlm
153         IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp
154 endif
155 endif
156 ifdef WITH_SSL
157         LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/ssl.$(LIBEXT)
158         LDLIBS += $(OPENSSL_PATH)/out_nw_$(LIBARCH_L)/crypto.$(LIBEXT)
159         IMPORTS += GetProcessSwitchCount RunningProcess
160 endif
161 ifdef WITH_ZLIB
162         INCLUDES += -I$(ZLIB_PATH)
163 ifdef LINK_STATIC
164         LDLIBS += $(ZLIB_PATH)/nw/$(LIBARCH)/libz.$(LIBEXT)
165 else
166         MODULES += libz.nlm
167         IMPORTS += @$(ZLIB_PATH)/nw/$(LIBARCH)/libz.imp
168 endif
169 endif
170
171 ifeq ($(LIBARCH),LIBC)
172         INCLUDES += -I$(SDK_LIBC)/include
173         # INCLUDES += -I$(SDK_LIBC)/include/nks
174         # INCLUDES += -I$(SDK_LIBC)/include/winsock
175         CFLAGS += -D_POSIX_SOURCE
176 else
177         INCLUDES += -I$(SDK_CLIB)/include/nlm
178         # INCLUDES += -I$(SDK_CLIB)/include
179 endif
180 ifndef DISABLE_LDAP
181         # INCLUDES += -I$(SDK_LDAP)/$(LIBARCH_L)/inc
182 endif
183 CFLAGS  += $(INCLUDES)
184
185 ifeq ($(MTSAFE),YES)
186         XDCOPT = -n
187 endif
188 ifeq ($(MTSAFE),NO)
189         XDCOPT = -u
190 endif
191 ifdef XDCOPT
192         XDCDATA = $(OBJDIR)/$(TARGET).xdc
193 endif
194
195 ifeq ($(findstring linux,$(OSTYPE)),linux)
196 DL      = '
197 DS      = /
198 #-include $(NDKBASE)/nlmconv/ncpfs.inc
199 else
200 DS      = \\
201 endif
202
203 # Makefile.inc provides the CSOURCES and HHEADERS defines
204 include Makefile.inc
205
206 OBJX    := $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(strip $(CURLX_ONES))))
207 OBJS    := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CURL_SOURCES))) $(OBJX)
208
209 vpath %.c $(CURL_LIB)
210
211 all: prebuild $(TARGET).nlm
212
213 prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h
214
215 $(OBJDIR)/%.o: %.c
216 #       @echo Compiling $<
217         $(CC) $(CFLAGS) -c $< -o $@
218
219 $(OBJDIR)/version.inc: $(CURL_INC)/curl/curlver.h $(OBJDIR)
220         @echo Creating $@
221         @$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
222
223 dist: all
224         -$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(TARGET).map $(OBJDIR)/$(TARGET).ncv
225         -$(RM) $(OBJDIR)/$(TARGET).def $(OBJDIR)/version.inc $(XDCDATA)
226
227 install: $(INSTDIR) all
228         @-$(CP) ../docs/$(TARGET).pdf $(INSTDIR)
229         @$(CP) $(TARGET).nlm $(INSTDIR)
230
231 clean:
232 ifeq "$(wildcard hugehelp.c.cvs)" "hugehelp.c.cvs"
233         -$(RM) hugehelp.c
234 endif
235         -$(RM) config.h
236         -$(RM) -r $(OBJDIR)
237
238 distclean: clean
239         -$(RM) -r $(TARGET).nlm
240
241 $(INSTDIR):
242         @mkdir $(INSTDIR)
243
244 $(OBJDIR):
245         @mkdir $(OBJDIR)
246
247 $(TARGET).nlm: $(OBJS) $(OBJX) $(OBJDIR)/$(TARGET).def $(XDCDATA)
248         @echo Linking $@
249         @-$(RM) $@
250         @$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
251
252 $(OBJDIR)/%.xdc: Makefile.netware
253         @echo Creating $@
254         @$(MPKXDC) $(XDCOPT) $@
255
256 $(OBJDIR)/%.def: Makefile.netware
257         @echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
258         @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
259         @echo $(DL)# All your changes will be lost!!$(DL) >> $@
260         @echo $(DL)#$(DL) >> $@
261         @echo $(DL)copyright "$(COPYR)"$(DL) >> $@
262         @echo $(DL)description "$(DESCR)"$(DL) >> $@
263         @echo $(DL)version $(VERSION)$(DL) >> $@
264 ifdef NLMTYPE
265         @echo $(DL)type $(NLMTYPE)$(DL) >> $@
266 endif
267 ifdef STACK
268         @echo $(DL)stack $(STACK)$(DL) >> $@
269 endif
270 ifdef SCREEN
271         @echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
272 else
273         @echo $(DL)screenname "DEFAULT"$(DL) >> $@
274 endif
275 ifneq ($(DB),NDEBUG)
276         @echo $(DL)debug$(DL) >> $@
277 endif
278         @echo $(DL)threadname "$(TARGET)"$(DL) >> $@
279 ifdef XDCDATA
280         @echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
281 endif
282 ifeq ($(LDRING),0)
283         @echo $(DL)flag_on 16$(DL) >> $@
284 endif
285 ifeq ($(LDRING),3)
286         @echo $(DL)flag_on 512$(DL) >> $@
287 endif
288 ifeq ($(LIBARCH),CLIB)
289         @echo $(DL)start _Prelude$(DL) >> $@
290         @echo $(DL)exit _Stop$(DL) >> $@
291         @echo $(DL)import @$(SDK_CLIB)/imports/clib.imp$(DL) >> $@
292         @echo $(DL)import @$(SDK_CLIB)/imports/threads.imp$(DL) >> $@
293         @echo $(DL)import @$(SDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
294         @echo $(DL)import @$(SDK_CLIB)/imports/socklib.imp$(DL) >> $@
295 ifndef DISABLE_LDAP
296         @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
297         @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
298         @echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
299         @echo $(DL)module ldapsdk ldapssl ldapx$(DL) >> $@
300 endif
301         @echo $(DL)module clib$(DL) >> $@
302 else
303         @echo $(DL)flag_on 64$(DL) >> $@
304         @echo $(DL)pseudopreemption$(DL) >> $@
305         @echo $(DL)start _LibCPrelude$(DL) >> $@
306         @echo $(DL)exit _LibCPostlude$(DL) >> $@
307         @echo $(DL)check _LibCCheckUnload$(DL) >> $@
308         @echo $(DL)import @$(SDK_LIBC)/imports/libc.imp$(DL) >> $@
309         @echo $(DL)import @$(SDK_LIBC)/imports/netware.imp$(DL) >> $@
310 ifndef DISABLE_LDAP
311         @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
312         @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
313         @echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
314         @echo $(DL)module lldapsdk lldapssl lldapx$(DL) >> $@
315 endif
316         @echo $(DL)module libc$(DL) >> $@
317 endif
318 ifdef MODULES
319         @echo $(DL)module $(MODULES)$(DL) >> $@
320 endif
321 ifdef EXPORTS
322         @echo $(DL)export $(EXPORTS)$(DL) >> $@
323 endif
324 ifdef IMPORTS
325         @echo $(DL)import $(IMPORTS)$(DL) >> $@
326 endif
327 ifeq ($(LD),nlmconv)
328         @echo $(DL)input $(OBJS)$(DL) >> $@
329         @echo $(DL)input $(PRELUDE)$(DL) >> $@
330 ifdef LDLIBS
331         @echo $(DL)input $(LDLIBS)$(DL) >> $@
332 endif
333         @echo $(DL)output $(TARGET).nlm$(DL) >> $@
334 endif
335
336 config.h: Makefile.netware
337         @echo Creating $@
338         @echo $(DL)/* $@ for NetWare target.$(DL) > $@
339         @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
340         @echo $(DL)** All your changes will be lost!!$(DL) >> $@
341         @echo $(DL)*/$(DL) >> $@
342         @echo $(DL)#ifndef NETWARE$(DL) >> $@
343         @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
344         @echo $(DL)#endif$(DL) >> $@
345         @echo $(DL)#define VERSION "$(LIBCURL_VERSION_STR)"$(DL) >> $@
346         @echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
347 ifeq ($(LIBARCH),CLIB)
348         @echo $(DL)#define OS "i586-pc-clib-NetWare"$(DL) >> $@
349         @echo $(DL)#define NETDB_USE_INTERNET 1$(DL) >> $@
350         @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@
351         @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
352         @echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
353         @echo $(DL)#define RECV_TYPE_ARG3 int$(DL) >> $@
354         @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
355         @echo $(DL)#define RECV_TYPE_RETV int$(DL) >> $@
356         @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
357         @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
358         @echo $(DL)#define SEND_TYPE_ARG2 char *$(DL) >> $@
359         @echo $(DL)#define SEND_TYPE_ARG3 int$(DL) >> $@
360         @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
361         @echo $(DL)#define SEND_TYPE_RETV int$(DL) >> $@
362         @echo $(DL)#define socklen_t int$(DL) >> $@
363         @echo $(DL)#define pressanykey PressAnyKeyToContinue$(DL) >> $@
364 else
365         @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
366         @echo $(DL)#define HAVE_FTRUNCATE 1$(DL) >> $@
367         @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
368         @echo $(DL)#define HAVE_INET_PTON 1$(DL) >> $@
369         @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
370         @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
371         @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
372         @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
373         @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
374         @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
375         @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
376         @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
377         @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
378         @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
379         @echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
380         @echo $(DL)#define RECV_TYPE_ARG2 void *$(DL) >> $@
381         @echo $(DL)#define RECV_TYPE_ARG3 size_t$(DL) >> $@
382         @echo $(DL)#define RECV_TYPE_ARG4 int$(DL) >> $@
383         @echo $(DL)#define RECV_TYPE_RETV ssize_t$(DL) >> $@
384         @echo $(DL)#define SEND_QUAL_ARG2$(DL) >> $@
385         @echo $(DL)#define SEND_TYPE_ARG1 int$(DL) >> $@
386         @echo $(DL)#define SEND_TYPE_ARG2 void *$(DL) >> $@
387         @echo $(DL)#define SEND_TYPE_ARG3 size_t$(DL) >> $@
388         @echo $(DL)#define SEND_TYPE_ARG4 int$(DL) >> $@
389         @echo $(DL)#define SEND_TYPE_RETV ssize_t$(DL) >> $@
390 ifdef ENABLE_IPV6
391         @echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
392 endif
393 endif
394         @echo $(DL)#define USE_MANUAL 1$(DL) >> $@
395         @echo $(DL)#define HAVE_ARPA_INET_H 1$(DL) >> $@
396         @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
397         @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
398         @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
399         @echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
400         @echo $(DL)#define HAVE_GETHOSTBYADDR 1$(DL) >> $@
401         @echo $(DL)#define HAVE_INET_ADDR 1$(DL) >> $@
402         @echo $(DL)#define HAVE_INET_NTOA 1$(DL) >> $@
403         @echo $(DL)#define HAVE_LL 1$(DL) >> $@
404         @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@
405         @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
406         @echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
407         @echo $(DL)#define HAVE_RECV 1$(DL) >> $@
408         @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
409         @echo $(DL)#define HAVE_SEND 1$(DL) >> $@
410         @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
411         @echo $(DL)#define HAVE_SETLOCALE 1$(DL) >> $@
412         @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
413         @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
414         @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
415         @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
416         @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
417         @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
418         @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
419         @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
420         @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
421         @echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
422         @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
423         @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
424         @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
425         @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
426         @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
427         @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
428         @echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
429         @echo $(DL)#define RETSIGTYPE void$(DL) >> $@
430         @echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@
431         @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
432         @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
433 ifdef DISABLE_LDAP
434         @echo $(DL)#define CURL_DISABLE_LDAP 1$(DL) >> $@
435 else
436         @echo $(DL)#define CURL_HAS_NOVELL_LDAPSDK 1$(DL) >> $@
437 ifndef DISABLE_LDAPS
438         @echo $(DL)#define HAVE_LDAP_SSL 1$(DL) >> $@
439 endif
440         @echo $(DL)#define HAVE_LDAP_SSL_H 1$(DL) >> $@
441         @echo $(DL)#define HAVE_LDAP_URL_PARSE 1$(DL) >> $@
442 endif
443 ifdef NW_WINSOCK
444         @echo $(DL)#define HAVE_CLOSESOCKET 1$(DL) >> $@
445 else
446         @echo $(DL)#define USE_BSD_SOCKETS 1$(DL) >> $@
447         @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
448         @echo $(DL)#define HAVE_SYS_SOCKET_H 1$(DL) >> $@
449         @echo $(DL)#define HAVE_SYS_SOCKIO_H 1$(DL) >> $@
450         @echo $(DL)#define HAVE_NETDB_H 1$(DL) >> $@
451 endif
452 ifdef WITH_ARES
453         @echo $(DL)#define USE_ARES 1$(DL) >> $@
454 endif
455 ifdef WITH_ZLIB
456         @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
457         @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
458 endif
459 ifdef WITH_SSL
460         @echo $(DL)#define USE_SSLEAY 1$(DL) >> $@
461         @echo $(DL)#define HAVE_OPENSSL_X509_H 1$(DL) >> $@
462         @echo $(DL)#define HAVE_OPENSSL_SSL_H 1$(DL) >> $@
463         @echo $(DL)#define HAVE_OPENSSL_RSA_H 1$(DL) >> $@
464         @echo $(DL)#define HAVE_OPENSSL_PEM_H 1$(DL) >> $@
465         @echo $(DL)#define HAVE_OPENSSL_ERR_H 1$(DL) >> $@
466         @echo $(DL)#define HAVE_OPENSSL_CRYPTO_H 1$(DL) >> $@
467         @echo $(DL)#define HAVE_OPENSSL_ENGINE_H 1$(DL) >> $@
468         @echo $(DL)#define HAVE_LIBSSL 1$(DL) >> $@
469         @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
470         @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
471 endif
472 ifdef WITH_SSH2
473         @echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
474         @echo $(DL)#define HAVE_LIBSSH2_H 1$(DL) >> $@
475 endif
476         @echo $(DL)#ifdef __GNUC__$(DL) >> $@
477         @echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@
478         @echo $(DL)#else$(DL) >> $@
479         @echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@
480         @echo $(DL)#endif$(DL) >> $@
481 ifdef OLD_NOVELLSDK
482         @echo $(DL)#define socklen_t int$(DL) >> $@
483 endif
484
485 hugehelp.c:
486         @echo Creating $@
487         @$(CP) hugehelp.c.cvs $@
488
489 $(ARES_LIB)/libcares.$(LIBEXT):
490         $(MAKE) -C $(ARES_LIB) -f Makefile.netware lib
491
492