~ubuntu-branches/ubuntu/saucy/curl/saucy-security

« back to all changes in this revision

Viewing changes to src/Makefile.m32

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2012-05-22 14:53:29 UTC
  • mfrom: (3.4.28 sid)
  • Revision ID: package-import@ubuntu.com-20120522145329-hbf1n3zr7qh08qab
Tags: 7.25.0-1ubuntu1
* Merge from Debian testing (LP: #1003049).  Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.
  - Also closes (LP: #855291)
* debian/patches/CVE-2012-0036.patch: Dropped. CVE resolved upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#########################################################################
 
1
###########################################################################
2
2
#
3
 
## Makefile for building curl.exe with MingW32 (GCC-3.2 or later)
4
 
## and optionally OpenSSL (0.9.8), libssh2 (1.2), zlib (1.2.5), librtmp (2.3)
 
3
## Makefile for building curl.exe with MingW (GCC-3.2 or later)
 
4
## and optionally OpenSSL (0.9.8), libssh2 (1.3), zlib (1.2.5), librtmp (2.3)
5
5
##
6
6
## Usage:   mingw32-make -f Makefile.m32 CFG=-feature1[-feature2][-feature3][...]
7
7
## Example: mingw32-make -f Makefile.m32 CFG=-zlib-ssl-spi-winidn
9
9
## Hint: you can also set environment vars to control the build, f.e.:
10
10
## set ZLIB_PATH=c:/zlib-1.2.5
11
11
## set ZLIB=1
12
 
##
13
 
## Comments to: Troy Engel <tengel@sonic.net> or
14
 
##              Joern Hartroth <hartroth@acm.org>
15
 
#########################################################################
 
12
#
 
13
###########################################################################
16
14
 
17
15
# Edit the path below to point to the base of your Zlib sources.
18
16
ifndef ZLIB_PATH
22
20
ifndef OPENSSL_PATH
23
21
OPENSSL_PATH = ../../openssl-0.9.8r
24
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
25
29
# Edit the path below to point to the base of your LibSSH2 package.
26
30
ifndef LIBSSH2_PATH
27
31
LIBSSH2_PATH = ../../libssh2-1.3.0
34
38
ifndef LIBIDN_PATH
35
39
LIBIDN_PATH = ../../libidn-1.18
36
40
endif
37
 
# Edit the path below to point to the base of your MS idndlpackage. 
 
41
# Edit the path below to point to the base of your MS IDN package.
38
42
# Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1
39
43
# http://www.microsoft.com/downloads/en/details.aspx?FamilyID=ad6158d7-ddba-416a-9109-07607425a815
40
44
ifndef WINIDN_PATH
45
49
LDAP_SDK = c:/novell/ndk/cldapsdk/win32
46
50
endif
47
51
 
 
52
PROOT = ..
 
53
 
48
54
# Edit the path below to point to the base of your c-ares package.
49
55
ifndef LIBCARES_PATH
50
 
LIBCARES_PATH = ../ares
 
56
LIBCARES_PATH = $(PROOT)/ares
51
57
endif
52
58
 
53
59
# Edit the var below to set to your architecture or set environment var.
57
63
 
58
64
CC = gcc
59
65
CFLAGS = -g -O2 -Wall
 
66
CFLAGS += -fno-strict-aliasing
60
67
ifeq ($(ARCH),w64)
61
68
CFLAGS += -D_AMD64_
62
69
endif
63
70
# comment LDFLAGS below to keep debug info
64
71
LDFLAGS = -s
65
72
RC = windres
66
 
RCFLAGS = --include-dir=../include -O COFF -i
 
73
RCFLAGS = --include-dir=$(PROOT)/include -O COFF -i
 
74
 
67
75
RM = del /q /f 2>NUL
68
76
CP = copy
69
77
 
116
124
endif
117
125
 
118
126
INCLUDES = -I. -I.. -I../include -I../lib
119
 
LINK = $(CC) $(LDFLAGS) -o $@
120
127
 
121
 
curl_PROGRAMS = curl.exe
122
128
ifdef DYN
123
 
  curl_DEPENDENCIES = ../lib/libcurldll.a ../lib/libcurl.dll
124
 
  curl_LDADD = -L../lib -lcurldll
 
129
  curl_DEPENDENCIES = $(PROOT)/lib/libcurldll.a $(PROOT)/lib/libcurl.dll
 
130
  curl_LDADD = -L$(PROOT)/lib -lcurldll
125
131
else
126
 
  curl_DEPENDENCIES = ../lib/libcurl.a
127
 
  curl_LDADD = -L../lib -lcurl
 
132
  curl_DEPENDENCIES = $(PROOT)/lib/libcurl.a
 
133
  curl_LDADD = -L$(PROOT)/lib -lcurl
128
134
  CFLAGS += -DCURL_STATICLIB
129
135
endif
130
136
ifdef ARES
132
138
    curl_DEPENDENCIES += $(LIBCARES_PATH)/libcares.a
133
139
  endif
134
140
  CFLAGS += -DUSE_ARES
135
 
  curl_LDADD += -L$(LIBCARES_PATH) -lcares
 
141
  curl_LDADD += -L"$(LIBCARES_PATH)" -lcares
136
142
endif
137
143
ifdef RTMP
138
144
  CFLAGS += -DUSE_LIBRTMP
140
146
endif
141
147
ifdef SSH2
142
148
  CFLAGS += -DUSE_LIBSSH2 -DHAVE_LIBSSH2_H
143
 
  curl_LDADD += -L$(LIBSSH2_PATH)/win32 -lssh2
 
149
  curl_LDADD += -L"$(LIBSSH2_PATH)/win32" -lssh2
144
150
endif
145
151
ifdef SSL
146
152
  CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
147
 
  curl_LDADD += -L$(OPENSSL_PATH)/out -leay32 -lssl32
 
153
  curl_LDADD += -L"$(OPENSSL_LIBPATH)" $(OPENSSL_LIBS)
148
154
endif
149
155
ifdef ZLIB
150
156
  INCLUDES += -I"$(ZLIB_PATH)"
151
157
  CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H
152
 
  curl_LDADD += -L$(ZLIB_PATH) -lz
 
158
  curl_LDADD += -L"$(ZLIB_PATH)" -lz
153
159
endif
154
160
ifdef IDN
155
 
  INCLUDES += -I"$(LIBIDN_PATH)/include"
156
161
  CFLAGS += -DUSE_LIBIDN
157
 
  curl_LDADD += -L$(LIBIDN_PATH)/lib -lidn
 
162
  curl_LDADD += -L"$(LIBIDN_PATH)/lib" -lidn
158
163
else
159
164
ifdef WINIDN
160
165
  CFLAGS += -DUSE_WIN32_IDN
161
 
  DLL_LIBS += -L"$(WINIDN_PATH)" -lnormaliz
 
166
  curl_LDADD += -L"$(WINIDN_PATH)" -lnormaliz
162
167
endif
163
168
endif
164
169
ifdef SSPI
168
173
  CFLAGS += -DHAVE_SPNEGO
169
174
endif
170
175
ifdef IPV6
171
 
  CFLAGS += -DENABLE_IPV6
 
176
  CFLAGS += -DENABLE_IPV6 -D_WIN32_WINNT=0x0501
172
177
endif
173
178
ifdef LDAPS
174
179
  CFLAGS += -DHAVE_LDAP_SSL
187
192
endif
188
193
endif
189
194
curl_LDADD += -lws2_32
190
 
COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
191
195
 
192
196
# Makefile.inc provides the CSOURCES and HHEADERS defines
193
197
include Makefile.inc
194
198
 
 
199
curl_PROGRAMS = curl.exe
195
200
curl_OBJECTS := $(patsubst %.c,%.o,$(strip $(CURL_CFILES)))
196
 
ifdef DYN
197
201
curlx_OBJECTS := $(patsubst %.c,%.o,$(notdir $(strip $(CURLX_ONES))))
 
202
ifdef DYN
198
203
curl_OBJECTS += $(curlx_OBJECTS)
199
 
vpath %.c ../lib
 
204
vpath %.c $(PROOT)/lib
200
205
endif
201
206
 
202
207
RESOURCE = curl.res
203
208
 
204
 
.SUFFIXES: .rc .res
205
209
 
206
 
all: curl.exe
 
210
all: $(curl_PROGRAMS)
207
211
 
208
212
curl.exe: $(RESOURCE) $(curl_OBJECTS) $(curl_DEPENDENCIES)
209
213
        -$(RM) $@
210
 
        $(LINK) $< $(curl_OBJECTS) $(curl_LDADD)
 
214
        $(CC) $(LDFLAGS) -o $@ $< $(curl_OBJECTS) $(curl_LDADD)
211
215
 
212
216
# We don't have nroff normally under win32
213
 
# hugehelp.c: ../README.curl ../curl.1 mkhelp.pl
 
217
# hugehelp.c: $(PROOT)/README.curl $(PROOT)/curl.1 mkhelp.pl
214
218
#       -$(RM) hugehelp.c
215
 
#       $(NROFF) -man ../curl.1 | $(PERL) mkhelp.pl ../README.curl > hugehelp.c
 
219
#       $(NROFF) -man $(PROOT)/curl.1 | $(PERL) mkhelp.pl $(PROOT)/README.curl > hugehelp.c
216
220
 
217
221
hugehelp.c:
218
222
        @echo Creating $@
219
223
        @$(CP) hugehelp.c.cvs $@
220
224
 
221
 
.c.o:
222
 
        $(COMPILE) -c $<
 
225
%.o: %.c
 
226
        $(CC) $(INCLUDES) $(CFLAGS) -c $<
223
227
 
224
 
.rc.res:
 
228
%.res: %.rc
225
229
        $(RC) $(RCFLAGS) $< -o $@
226
230
 
227
231
clean:
228
232
ifeq "$(wildcard hugehelp.c.cvs)" "hugehelp.c.cvs"
229
233
        -$(RM) hugehelp.c
230
234
endif
231
 
        -$(RM) $(curl_OBJECTS) $(RESOURCE)
 
235
        -$(RM) $(curl_OBJECTS) $(curlx_OBJECTS) $(RESOURCE)
232
236
 
233
237
distclean vclean: clean
234
238
        -$(RM) $(curl_PROGRAMS)