1
1
#################################################################
2
# $Id: Makefile.netware,v 1.45 2007-03-27 19:27:43 gknauf Exp $
3
4
## Makefile for building libcurl.nlm (NetWare version - gnu make)
4
5
## Use: make -f Makefile.netware
6
## Comments to: Guenter Knauf <eflash@gmx.net>
7
## Comments to: Guenter Knauf http://www.gknw.de/phpbb
8
9
#################################################################
20
21
# Edit the path below to point to the base of your OpenSSL package.
21
22
ifndef OPENSSL_PATH
22
OPENSSL_PATH = ../../openssl-0.9.8a
23
OPENSSL_PATH = ../../openssl-0.9.8e
26
# Edit the path below to point to the base of your LibSSH2 package.
28
LIBSSH2_PATH = ../../libssh2-0.14
29
35
# Edit the vars below to change NLM target settings.
31
37
VERSION = $(LIBCURL_VERSION)
32
COPYR = Copyright (C) 1996 - 2006, Daniel Stenberg, <daniel@haxx.se>
38
COPYR = Copyright (C) 1996 - 2007, Daniel Stenberg, <daniel@haxx.se>
33
39
DESCR = cURL libcurl $(LIBCURL_VERSION_STR) - http://curl.haxx.se
69
76
# if you want to mark the target as MTSAFE you will need a tool for
70
77
# generating the xdc data for the linker; here's a minimal tool:
71
# http://www.gknw.com/development/prgtools/mkxdc.zip
78
# http://www.gknw.net/development/prgtools/mkxdc.zip
74
81
# Global flags for all compilers
77
84
ifeq ($(CC),mwccnlm)
79
LDFLAGS = -nostdlib $(PRELUDE) $(OBJL) -o $(TARGET).nlm -commandfile
86
LDFLAGS = -nostdlib $(PRELUDE) $(OBJL) -o $@ -commandfile
81
88
ARFLAGS = -type library -w nocmdline $(OBJS) -o
82
90
CFLAGS += -msgstyle gcc -gccinc -inline off -opt nointrinsics -proc 586
83
91
CFLAGS += -relax_pointers
109
118
SDK_CLIB = $(NDK_ROOT)/nwsdk
110
119
SDK_LIBC = $(NDK_ROOT)/libc
111
120
SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
121
CURL_INC = ../include
113
INCLUDES = -I. -I../include
125
INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
116
INCLUDES += -I../ares
117
LDLIBS = ../ares/libcares.lib
128
INCLUDES += -I$(ARES_LIB)
129
LDLIBS = $(ARES_LIB)/libcares.$(LIBEXT)
132
INCLUDES += -I$(ZLIB_PATH)
134
LDLIBS += $(ZLIB_PATH)/nw/libz.$(LIBEXT)
137
IMPORTS += @$(ZLIB_PATH)/nw/libz.imp
141
INCLUDES += -I$(LIBSSH2_PATH)/include
143
LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT)
145
MODULES += libssh2.nlm
146
IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp
120
150
INCLUDES += -I$(OPENSSL_PATH)/outinc_nw_libc -I$(OPENSSL_PATH)/outinc_nw_libc/openssl
121
LDLIBS += $(OPENSSL_PATH)/out_nw_libc/crypto.lib $(OPENSSL_PATH)/out_nw_libc/ssl.lib
151
LDLIBS += $(OPENSSL_PATH)/out_nw_libc/ssl.$(LIBEXT)
152
LDLIBS += $(OPENSSL_PATH)/out_nw_libc/crypto.$(LIBEXT)
122
153
IMPORTS += GetProcessSwitchCount RunningProcess
125
INCLUDES += -I$(ZLIB_PATH)
127
LDLIBS += $(ZLIB_PATH)/nw/libz.lib
129
IMPORTS += @$(ZLIB_PATH)/nw/libz.imp
134
156
ifeq ($(LIBARCH),LIBC)
135
157
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
166
188
# Makefile.inc provides the CSOURCES and HHEADERS defines
167
189
include Makefile.inc
169
OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CSOURCES))) $(LDLIBS)
191
OBJS := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CSOURCES)))
171
OBJL = $(OBJS) $(OBJDIR)/nwlib.o
193
OBJL = $(OBJS) $(OBJDIR)/nwlib.o $(LDLIBS)
175
197
nlm: prebuild $(TARGET).nlm
177
lib: prebuild $(TARGET).lib
199
lib: prebuild $(TARGET).$(LIBEXT)
179
201
prebuild: $(OBJDIR) $(OBJDIR)/version.inc config.h ca-bundle.h
185
207
$(OBJDIR)/version.inc: ../include/curl/curlver.h $(OBJDIR)
186
208
@echo Creating $@
187
@awk -f ../packages/NetWare/get_ver.awk $< > $@
209
@$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
190
212
-$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(TARGET).map $(OBJDIR)/$(TARGET).ncv
193
215
install: $(INSTDIR) all
194
216
@$(CP) $(TARGET).nlm $(INSTDIR)
195
@$(CP) $(TARGET).lib $(INSTDIR)
217
@$(CP) $(TARGET).$(LIBEXT) $(INSTDIR)
196
218
@$(CP) ../CHANGES $(INSTDIR)
197
219
@$(CP) ../COPYING $(INSTDIR)
198
220
@$(CP) ../README $(INSTDIR)
285
310
@echo $(DL)import $(IMPORTS)$(DL) >> $@
287
312
ifeq ($(LD),nlmconv)
289
@echo $(DL)input $(LDLIBS)$(DL) >> $@
291
313
@echo $(DL)input $(OBJL)$(DL) >> $@
292
314
@echo $(DL)input $(PRELUDE)$(DL) >> $@
316
# @echo $(DL)input $(LDLIBS)$(DL) >> $@
293
318
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
299
324
@echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
300
325
@echo $(DL)** All your changes will be lost!!$(DL) >> $@
301
326
@echo $(DL)*/$(DL) >> $@
327
@echo $(DL)#ifndef NETWARE$(DL) >> $@
328
@echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
329
@echo $(DL)#endif$(DL) >> $@
302
330
@echo $(DL)#define OS "i586-pc-NetWare"$(DL) >> $@
303
331
@echo $(DL)#define VERSION "$(LIBCURL_VERSION_STR)"$(DL) >> $@
304
332
@echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
317
345
@echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
318
346
@echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
319
347
@echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
320
@echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
321
348
@echo $(DL)#define HAVE_NETINET_IN_H 1$(DL) >> $@
322
349
@echo $(DL)#define HAVE_RECV 1$(DL) >> $@
323
350
@echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
324
351
@echo $(DL)#define HAVE_SEND 1$(DL) >> $@
325
352
@echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
326
353
@echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
354
@echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
355
@echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
327
356
@echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
328
357
@echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
329
358
@echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
340
369
@echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
341
370
@echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
342
371
@echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
343
@echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
344
372
@echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
345
373
@echo $(DL)#define RECV_TYPE_ARG1 int$(DL) >> $@
346
374
@echo $(DL)#define RECV_TYPE_ARG2 char *$(DL) >> $@
359
387
@echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
360
388
@echo $(DL)#define HAVE_AF_INET6 1$(DL) >> $@
361
389
@echo $(DL)#define HAVE_PF_INET6 1$(DL) >> $@
390
@echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
362
391
@echo $(DL)#define HAVE_STRUCT_IN6_ADDR 1$(DL) >> $@
363
392
@echo $(DL)#define HAVE_STRUCT_SOCKADDR_IN6 1$(DL) >> $@
364
@echo $(DL)#define HAVE_STRUCT_ADDRINFO 1$(DL) >> $@
393
@echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
365
394
@echo $(DL)#define SIZEOF_STRUCT_IN6_ADDR 16$(DL) >> $@
366
395
@echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
367
396
ifdef DISABLE_LDAP
401
430
@echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
402
431
@echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
434
@echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
435
@echo $(DL)#define HAVE_LIBSSH2_H 1$(DL) >> $@
437
@echo $(DL)#ifdef __GNUC__$(DL) >> $@
438
@echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@
439
@echo $(DL)#else$(DL) >> $@
440
@echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@
441
@echo $(DL)#endif$(DL) >> $@
404
442
ifdef OLD_NOVELLSDK
405
443
@echo $(DL)#define socklen_t int$(DL) >> $@
408
ca-bundle.h: Makefile.netware
448
ca-bundle.h: FORCE Makefile.netware
409
449
@echo Creating $@
410
450
@echo $(DL)/* Do not edit this file - it is created by make!$(DL) > $@
411
451
@echo $(DL)** All your changes will be lost!!$(DL) >> $@
412
452
@echo $(DL)*/$(DL) >> $@
454
@echo $(DL)#define CURL_CA_BUNDLE "$(CABUNDLE)"$(DL) >> $@
413
456
@echo $(DL)#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")$(DL) >> $@
459
info: $(OBJDIR)/version.inc
460
@echo Configured to build $(TARGET) with these options:
461
@echo curl version: $(LIBCURL_VERSION_STR)
462
@echo compiler/linker: $(CC) / $(LD)
464
@echo ca-bundle path: $(CABUNDLE)
467
@echo SSL support: enabled (OpenSSL)
469
@echo SSL support: no
472
@echo SSH2 support: enabled (libssh2)
474
@echo SSH2 support: no
477
@echo zlib support: enabled
479
@echo zlib support: no
482
@echo c-ares support: enabled
484
@echo c-ares support: no
487
@echo ipv6 support: enabled
489
@echo ipv6 support: no
418
$(MAKE) -C ../ares -f Makefile.netware lib
493
$(MAKE) -C $(ARES_LIB) -f Makefile.netware lib