~ubuntu-branches/ubuntu/gutsy/curl/gutsy

« back to all changes in this revision

Viewing changes to src/Makefile.netware

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-05-16 15:16:54 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20070516151654-jo48r81zempo1qav
Tags: 7.16.2-3ubuntu1
* Merge with Debian; remaining changes:
  - Drop the stunnel build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#################################################################
 
2
# $Id: Makefile.netware,v 1.39 2007-03-27 19:27:43 gknauf Exp $
2
3
#
3
4
## Makefile for building curl.nlm (NetWare version - gnu make)
4
5
## Use: make -f Makefile.netware
5
6
##
6
 
## Comments to: Guenter Knauf <eflash@gmx.net>
 
7
## Comments to: Guenter Knauf http://www.gknw.de/phpbb
7
8
#
8
9
#################################################################
9
10
 
19
20
 
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
 
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.14
23
29
endif
24
30
 
25
31
ifndef INSTDIR
29
35
# Edit the vars below to change NLM target settings.
30
36
TARGET  = curl
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_VERSION_STR) - http://curl.haxx.se
34
40
MTSAFE  = YES
35
41
STACK   = 64000
63
69
else
64
70
        CC = gcc
65
71
endif
 
72
AWK     = awk
66
73
CP      = cp -afv
67
74
# RM    = rm -f
68
75
# if you want to mark the target as MTSAFE you will need a tool for
69
76
# generating the xdc data for the linker; here's a minimal tool:
70
 
# http://www.gknw.com/development/prgtools/mkxdc.zip
 
77
# http://www.gknw.net/development/prgtools/mkxdc.zip
71
78
MPKXDC  = mkxdc
72
79
 
73
80
# Global flags for all compilers
75
82
 
76
83
ifeq ($(CC),mwccnlm)
77
84
LD      = mwldnlm
78
 
LDFLAGS = -nostdlib $(PRELUDE) $(LDLIBS) $(OBJS) $(OBJX) -o $(TARGET).nlm -commandfile
 
85
LDFLAGS = -nostdlib $(OBJS) $(PRELUDE) $(LDLIBS) -o $@ -commandfile
 
86
LIBEXT  = lib
79
87
CFLAGS  += -gccinc -inline off -opt nointrinsics -proc 586
80
88
CFLAGS  += -relax_pointers
81
89
#CFLAGS += -w on
90
98
else
91
99
LD      = nlmconv
92
100
LDFLAGS = -T
 
101
LIBEXT  = a
93
102
CFLAGS  += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
94
103
CFLAGS  += -Wall # -pedantic
95
104
ifeq ($(LIBARCH),LIBC)
106
115
SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
107
116
CURL_INC = ../include
108
117
CURL_LIB = ../lib
 
118
ARES_LIB = ../ares
109
119
 
110
120
INCLUDES = -I$(CURL_INC) -I$(CURL_LIB)
111
121
 
112
122
ifdef LINK_STATIC
113
 
        LDLIBS  = ../lib/libcurl.lib
114
 
        IMPORTS = GetProcessSwitchCount RunningProcess
 
123
        LDLIBS  = $(CURL_LIB)/libcurl.$(LIBEXT)
115
124
else
116
125
        MODULES = libcurl.nlm
117
 
        IMPORTS = @../lib/libcurl.imp
 
126
        IMPORTS = @$(CURL_LIB)/libcurl.imp
118
127
endif
119
128
ifdef WITH_ZLIB
120
129
        INCLUDES += -I$(ZLIB_PATH)
121
130
ifdef LINK_STATIC
122
 
        LDLIBS += $(ZLIB_PATH)/nw/libz.lib
 
131
        LDLIBS += $(ZLIB_PATH)/nw/libz.$(LIBEXT)
123
132
else
 
133
        MODULES += libz.nlm
124
134
        IMPORTS += @$(ZLIB_PATH)/nw/libz.imp
125
 
        MODULES += libz.nlm
126
 
endif
 
135
endif
 
136
endif
 
137
ifdef WITH_SSH2
 
138
        INCLUDES += -I$(LIBSSH2_PATH)/include
 
139
ifdef LINK_STATIC
 
140
        LDLIBS += $(LIBSSH2_PATH)/nw/libssh2.$(LIBEXT)
 
141
else
 
142
        MODULES += libssh2.nlm
 
143
        IMPORTS += @$(LIBSSH2_PATH)/nw/libssh2.imp
 
144
endif
 
145
endif
 
146
ifdef WITH_SSL
 
147
        LDLIBS += $(OPENSSL_PATH)/out_nw_libc/ssl.$(LIBEXT)
 
148
        LDLIBS += $(OPENSSL_PATH)/out_nw_libc/crypto.$(LIBEXT)
 
149
        IMPORTS += GetProcessSwitchCount RunningProcess
127
150
endif
128
151
 
129
152
ifeq ($(LIBARCH),LIBC)
160
183
# Makefile.inc provides the CSOURCES and HHEADERS defines
161
184
include Makefile.inc
162
185
 
163
 
OBJS    := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CURL_SOURCES)))
164
186
OBJX    := $(patsubst %.c,$(OBJDIR)/%.o,$(notdir $(strip $(CURLX_ONES))))
 
187
OBJS    := $(patsubst %.c,$(OBJDIR)/%.o,$(strip $(CURL_SOURCES))) $(OBJX)
165
188
 
166
 
vpath %.c ../lib
 
189
vpath %.c $(CURL_LIB)
167
190
 
168
191
all: prebuild $(TARGET).nlm 
169
192
 
175
198
 
176
199
$(OBJDIR)/version.inc: $(CURL_INC)/curl/curlver.h $(OBJDIR)
177
200
        @echo Creating $@
178
 
        @awk -f ../packages/NetWare/get_ver.awk $< > $@
 
201
        @$(AWK) -f ../packages/NetWare/get_ver.awk $< > $@
179
202
 
180
203
dist: all
181
204
        -$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(TARGET).map $(OBJDIR)/$(TARGET).ncv
192
215
        -$(RM) config.h
193
216
        -$(RM) -r $(OBJDIR)
194
217
 
 
218
distclean: clean
 
219
        -$(RM) -r $(TARGET).nlm
 
220
 
195
221
$(INSTDIR):
196
222
        @mkdir $(INSTDIR)
197
223
 
274
300
endif
275
301
ifeq ($(LD),nlmconv)
276
302
        @echo $(DL)input $(OBJS)$(DL) >> $@
277
 
        @echo $(DL)input $(OBJX)$(DL) >> $@
278
303
        @echo $(DL)input $(PRELUDE)$(DL) >> $@
 
304
ifdef LDLIBS
 
305
        @echo $(DL)input $(LDLIBS)$(DL) >> $@
 
306
endif
279
307
        @echo $(DL)output $(TARGET).nlm$(DL) >> $@
280
308
endif
281
309
 
285
313
        @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
286
314
        @echo $(DL)** All your changes will be lost!!$(DL) >> $@
287
315
        @echo $(DL)*/$(DL) >> $@
 
316
        @echo $(DL)#ifndef NETWARE$(DL) >> $@
 
317
        @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
 
318
        @echo $(DL)#endif$(DL) >> $@
288
319
        @echo $(DL)#define OS "i586-pc-NetWare"$(DL) >> $@
289
320
        @echo $(DL)#define VERSION "$(LIBCURL_VERSION_STR)"$(DL) >> $@
290
321
        @echo $(DL)#define PACKAGE_BUGREPORT "a suitable curl mailing list => http://curl.haxx.se/mail/"$(DL) >> $@
312
343
        @echo $(DL)#define HAVE_SEND 1$(DL) >> $@
313
344
        @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
314
345
        @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
 
346
        @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
 
347
        @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
315
348
        @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
316
349
        @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
317
350
        @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
345
378
        @echo $(DL)#define SIZEOF_CURL_OFF_T 4$(DL) >> $@
346
379
        @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
347
380
        @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
 
381
        @echo $(DL)#define HAVE_STRUCT_TIMEVAL 1$(DL) >> $@
348
382
ifdef ENABLE_IPV6
349
383
        @echo $(DL)#define ENABLE_IPV6 1$(DL) >> $@
350
384
endif
376
410
        @echo $(DL)#define HAVE_LIBCRYPTO 1$(DL) >> $@
377
411
        @echo $(DL)#define OPENSSL_NO_KRB5 1$(DL) >> $@
378
412
endif
 
413
ifdef WITH_SSH2
 
414
        @echo $(DL)#define USE_LIBSSH2 1$(DL) >> $@
 
415
        @echo $(DL)#define HAVE_LIBSSH2_H 1$(DL) >> $@
 
416
endif
 
417
        @echo $(DL)#ifdef __GNUC__$(DL) >> $@
 
418
        @echo $(DL)#define HAVE_VARIADIC_MACROS_GCC 1$(DL) >> $@
 
419
        @echo $(DL)#else$(DL) >> $@
 
420
        @echo $(DL)#define HAVE_VARIADIC_MACROS_C99 1$(DL) >> $@
 
421
        @echo $(DL)#endif$(DL) >> $@
379
422
ifdef OLD_NOVELLSDK
380
423
        @echo $(DL)#define socklen_t int$(DL) >> $@
381
424
endif