~ubuntu-branches/ubuntu/quantal/curl/quantal-proposed

« back to all changes in this revision

Viewing changes to src/Makefile.m32

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-08-20 13:54:01 UTC
  • mfrom: (3.4.30 sid)
  • Revision ID: package-import@ubuntu.com-20120820135401-5845kg6puoh2jcnh
Tags: 7.27.0-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from binary package Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
ifndef OPENSSL_PATH
21
21
OPENSSL_PATH = ../../openssl-0.9.8x
22
22
endif
23
 
ifndef OPENSSL_LIBPATH
24
 
OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
25
 
endif
26
 
ifndef OPENSSL_LIBS
27
 
OPENSSL_LIBS = -leay32 -lssl32
28
 
endif
29
23
# Edit the path below to point to the base of your LibSSH2 package.
30
24
ifndef LIBSSH2_PATH
31
25
LIBSSH2_PATH = ../../libssh2-1.4.2
34
28
ifndef LIBRTMP_PATH
35
29
LIBRTMP_PATH = ../../librtmp-2.3
36
30
endif
 
31
# Edit the path below to point to the base of your libmetalink package.
 
32
ifndef LIBMETALINK_PATH
 
33
LIBMETALINK_PATH = ../../libmetalink-0.0.3
 
34
endif
37
35
# Edit the path below to point to the base of your libidn package.
38
36
ifndef LIBIDN_PATH
39
37
LIBIDN_PATH = ../../libidn-1.18
61
59
ARCH = w32
62
60
endif
63
61
 
64
 
CC = gcc
65
 
CFLAGS = -g -O2 -Wall
66
 
CFLAGS += -fno-strict-aliasing
 
62
CC      = $(CROSSPREFIX)gcc
 
63
CFLAGS  = -g -O2 -Wall
 
64
CFLAGS  += -fno-strict-aliasing
67
65
ifeq ($(ARCH),w64)
68
 
CFLAGS += -D_AMD64_
 
66
CFLAGS  += -D_AMD64_
69
67
endif
70
68
# comment LDFLAGS below to keep debug info
71
 
LDFLAGS = -s
72
 
RC = windres
73
 
RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
74
 
 
75
 
RM = del /q /f 2>NUL
76
 
CP = copy
 
69
LDFLAGS = -s
 
70
RC      = $(CROSSPREFIX)windres
 
71
RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
77
72
 
78
73
# We may need these someday
79
74
# PERL = perl
80
75
# NROFF = nroff
81
76
 
 
77
# Platform-dependent helper tool macros
 
78
ifeq ($(findstring /sh,$(SHELL)),/sh)
 
79
DEL     = rm -f $1
 
80
RMDIR   = rm -fr $1
 
81
MKDIR   = mkdir -p $1
 
82
COPY    = -cp -afv $1 $2
 
83
#COPYR  = -cp -afr $1/* $2
 
84
COPYR   = -rsync -aC $1/* $2
 
85
TOUCH   = touch $1
 
86
CAT     = cat
 
87
ECHONL  = echo ""
 
88
DL      = '
 
89
else
 
90
ifeq "$(OS)" "Windows_NT"
 
91
DEL     = -del 2>NUL /q /f $(subst /,\,$1)
 
92
RMDIR   = -rd 2>NUL /q /s $(subst /,\,$1)
 
93
else
 
94
DEL     = -del 2>NUL $(subst /,\,$1)
 
95
RMDIR   = -deltree 2>NUL /y $(subst /,\,$1)
 
96
endif
 
97
MKDIR   = -md 2>NUL $(subst /,\,$1)
 
98
COPY    = -copy 2>NUL /y $(subst /,\,$1) $(subst /,\,$2)
 
99
COPYR   = -xcopy 2>NUL /q /y /e $(subst /,\,$1) $(subst /,\,$2)
 
100
TOUCH   = copy 2>&1>NUL /b $(subst /,\,$1) +,,
 
101
CAT     = type
 
102
ECHONL  = $(ComSpec) /c echo.
 
103
endif
 
104
 
82
105
########################################################
83
106
## Nothing more to do below this line!
84
107
 
122
145
ifeq ($(findstring -ipv6,$(CFG)),-ipv6)
123
146
IPV6 = 1
124
147
endif
 
148
ifeq ($(findstring -metalink,$(CFG)),-metalink)
 
149
METALINK = 1
 
150
endif
 
151
ifeq ($(findstring -winssl,$(CFG)),-winssl)
 
152
WINSSL = 1
 
153
SSPI = 1
 
154
endif
125
155
 
126
 
INCLUDES = -I. -I.. -I../include -I../lib
 
156
INCLUDES = -I. -I../include -I../lib
127
157
 
128
158
ifdef DYN
129
159
  curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll
132
162
  curl_DEPENDENCIES = $(PROOT)/lib/libcurl.a
133
163
  curl_LDADD = -L$(PROOT)/lib -lcurl
134
164
  CFLAGS += -DCURL_STATICLIB
 
165
  LDFLAGS += -static
135
166
endif
136
167
ifdef ARES
137
168
  ifndef DYN
149
180
  curl_LDADD += -L"$(LIBSSH2_PATH)/win32" -lssh2
150
181
endif
151
182
ifdef SSL
152
 
  CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
 
183
  ifndef OPENSSL_LIBPATH
 
184
    OPENSSL_LIBS = -lssl -lcrypto
 
185
    ifeq "$(wildcard $(OPENSSL_PATH)/out)" "$(OPENSSL_PATH)/out"
 
186
      OPENSSL_LIBPATH = $(OPENSSL_PATH)/out
 
187
      ifdef DYN
 
188
        OPENSSL_LIBS = -lssl32 -leay32
 
189
      endif
 
190
    endif
 
191
    ifeq "$(wildcard $(OPENSSL_PATH)/lib)" "$(OPENSSL_PATH)/lib"
 
192
      OPENSSL_LIBPATH = $(OPENSSL_PATH)/lib
 
193
    endif
 
194
  endif
 
195
  ifndef DYN
 
196
    OPENSSL_LIBS += -lgdi32 -lcrypt32
 
197
  endif
 
198
  CFLAGS += -DUSE_SSLEAY
153
199
  curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
154
200
endif
155
201
ifdef ZLIB
166
212
  curl_LDADD += -L"$(WINIDN_PATH)" -lnormaliz
167
213
endif
168
214
endif
 
215
ifdef METALINK
 
216
  INCLUDES += -I"$(LIBMETALINK_PATH)/include"
 
217
  CFLAGS += -DUSE_METALINK
 
218
  curl_LDADD += -L"$(LIBMETALINK_PATH)/lib" -lmetalink
 
219
endif
169
220
ifdef SSPI
170
221
  CFLAGS += -DUSE_WINDOWS_SSPI
 
222
  ifdef WINSSL
 
223
    CFLAGS += -DUSE_SCHANNEL
 
224
  endif
171
225
endif
172
226
ifdef SPNEGO
173
227
  CFLAGS += -DHAVE_SPNEGO
210
264
all: $(curl_PROGRAMS)
211
265
 
212
266
curl.exe: $(RESOURCE) $(curl_OBJECTS) $(curl_DEPENDENCIES)
213
 
        -$(RM) $@
 
267
        $(call DEL, $@)
214
268
        $(CC) $(LDFLAGS) -o $@ $< $(curl_OBJECTS) $(curl_LDADD)
215
269
 
216
270
# We don't have nroff normally under win32
217
 
# hugehelp.c: $(PROOT)/README.curl $(PROOT)/curl.1 mkhelp.pl
218
 
#       -$(RM) hugehelp.c
219
 
#       $(NROFF) -man $(PROOT)/curl.1 | $(PERL) mkhelp.pl $(PROOT)/README.curl > hugehelp.c
 
271
# hugehelp.c: $(PROOT)/docs/MANUAL $(PROOT)/docs/curl.1 mkhelp.pl
 
272
#       @$(call DEL, hugehelp.c)
 
273
#       $(NROFF) -man $(PROOT)/docs/curl.1 | $(PERL) mkhelp.pl $(PROOT)/docs/MANUAL > hugehelp.c
220
274
 
221
275
hugehelp.c:
222
276
        @echo Creating $@
223
 
        @$(CP) hugehelp.c.cvs $@
 
277
        @$(call COPY, $@.cvs, $@)
224
278
 
225
279
%.o: %.c
226
280
        $(CC) $(INCLUDES) $(CFLAGS) -c $<
230
284
 
231
285
clean:
232
286
ifeq "$(wildcard hugehelp.c.cvs)" "hugehelp.c.cvs"
233
 
        -$(RM) hugehelp.c
 
287
        @$(call DEL, hugehelp.c)
234
288
endif
235
 
        -$(RM) $(curl_OBJECTS) $(curlx_OBJECTS) $(RESOURCE)
 
289
        @$(call DEL, $(curl_OBJECTS) $(curlx_OBJECTS) $(RESOURCE))
236
290
 
237
291
distclean vclean: clean
238
 
        -$(RM) $(curl_PROGRAMS)
 
292
        @$(call DEL, $(curl_PROGRAMS))
239
293