1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
32 # --- Settings -----------------------------------------------------
34 .INCLUDE
: settings.mk
36 .IF
"$(SYSTEM_CURL)" == "YES"
38 @echo
"An already available installation of curl should exist on your system."
39 @echo
"Therefore the version provided here does not need to be built in addition."
42 # --- Files --------------------------------------------------------
44 TARFILE_NAME
=curl-7.26
.0
45 TARFILE_MD5
=3fa4d5236f2a36ca5c3af6715e837691
48 curl-7.26
.0_nspr.patch \
52 PATCH_FILES
+=curl-7.26
.0_win.patch
54 PATCH_FILES
+=curl-7.26
.0_mingw.patch
58 .IF
"$(OS)" == "ANDROID"
59 PATCH_FILES
+=curl-android.patch
65 #ADDITIONAL_FILES= lib$/config-os2.h lib$/Makefile.os2
70 curl_CFLAGS
+=-I
$(SYSBASE
)$/usr
$/include
71 curl_LDFLAGS
+=-L
$(SYSBASE
)$/usr
$/lib
72 .ENDIF
# "$(SYSBASE)"!=""
74 .IF
"$(OS)$(CPU)"=="SOLARISU"
75 curl_CFLAGS
+:=$(ARCH_FLAGS
)
76 curl_LDFLAGS
+:=$(ARCH_FLAGS
)
80 curl_LDFLAGS
+:=$(LINKFLAGS
) $(LINKFLAGSRUNPATH_OOO
)
84 #relative to CONFIGURE_DIR
85 CONFIGURE_ACTION
=.
$/configure
86 .IF
"$(DISABLE_DYNLOADING)" == "TRUE"
87 CONFIGURE_FLAGS
=--disable-shared
89 CONFIGURE_FLAGS
=--disable-static
91 CONFIGURE_FLAGS
+= --with-nss
--without-ssl
--without-libidn
--enable-ftp
--enable-ipv6
--enable-http
--disable-gopher
--disable-file
--disable-ldap
--disable-telnet
--disable-dict
--without-libssh2 CPPFLAGS
="$(curl_CFLAGS)" LDFLAGS
="$(curl_LDFLAGS)"
93 CONFIGURE_FLAGS
+=--enable-debug
96 .IF
"$(OS)" == "MACOSX"
98 --prefix=/@.__________________________________________________
$(EXTRPATH
)
101 .IF
"$(CROSS_COMPILING)"=="YES"
102 CONFIGURE_FLAGS
+=--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
105 BUILD_DIR
=$(CONFIGURE_DIR
)$/lib
106 BUILD_ACTION
=$(GNUMAKE
)
107 BUILD_FLAGS
+= -j
$(EXTMAXPROCESS
)
109 .IF
"$(DISABLE_DYNLOADING)" == "TRUE"
110 OUT2LIB
=$(BUILD_DIR
)$/.libs
$/libcurl.a
111 .ELIF
"$(OS)"=="ANDROID"
112 OUT2LIB
=$(BUILD_DIR
)$/.libs
$/libcurl.so
114 OUT2LIB
=$(BUILD_DIR
)$/.libs
$/libcurl
$(DLLPOST
).?
116 .ENDIF
# "$(GUI)"=="UNX"
121 curl_CC
=$(CC
) -mthreads
122 .IF
"$(MINGW_SHARED_GCCLIB)"=="YES"
123 curl_CC
+=-shared-libgcc
125 curl_LIBS
=-lws2_32
-lwinmm
126 .IF
"$(MINGW_SHARED_GXXLIB)"=="YES"
127 curl_LIBS
+=$(MINGW_SHARED_LIBSTDCPP
)
130 #relative to CONFIGURE_DIR
131 CONFIGURE_ACTION
=.
$/configure
132 CONFIGURE_FLAGS
= --with-nss
--without-ssl
--enable-ftp
--enable-ipv6
--disable-http
--disable-gopher
--disable-file
--disable-ldap
--disable-telnet
--disable-dict
--build
=i586-pc-mingw32
--host
=i586-pc-mingw32 CC
="$(curl_CC)" CPPFLAGS
="$(INCLUDE)" OBJDUMP
="objdump" LDFLAGS
="-L$(ILIB:s/;/ -L/)" LIBS
="$(curl_LIBS)"
134 CONFIGURE_FLAGS
+=--enable-debug
136 BUILD_DIR
=$(CONFIGURE_DIR
)$/lib
138 OUT2BIN
=$(BUILD_DIR
)$/.libs
$/libcurl
*.dll
139 OUT2LIB
=$(BUILD_DIR
)$/.libs
$/libcurl
*.a
142 .IF
"$(CCNUMVER)" > "001399999999"
143 EXCFLAGS
="/EHa /Zc:wchar_t- /D "_CRT_SECURE_NO_DEPRECATE
""
150 .IF
"$(CPUNAME)" == "INTEL"
156 # that debug configuration is disabled for now because it needs msvcr90d.dll
157 # (the debug MSVC runtime) and that is not copied into the solver currently,
158 # causing unit tests to fail
160 BUILD_ACTION
=nmake
-f Makefile.vc9 cfg
=release-dll EXCFLAGS
=$(EXCFLAGS
) MACHINE
=$(MACHINE
)
162 #BUILD_ACTION=nmake -f Makefile.vc9 cfg=debug-dll EXCFLAGS=$(EXCFLAGS) MACHINE=$(MACHINE)
165 OUT2BIN
=$(BUILD_DIR
)$/libcurl.dll
166 OUT2LIB
=$(BUILD_DIR
)$/libcurl.lib
169 .ENDIF
# "$(GUI)"=="WNT"
172 include$/curl
$/easy.h \
173 include$/curl
$/multi.h \
174 include$/curl
$/curl.h \
175 include$/curl
$/curlver.h \
176 include$/curl
$/typecheck-gcc.h \
177 include$/curl
$/stdcheaders.h \
178 include$/curl
$/mprintf.h \
179 include$/curl
$/curlbuild.h \
180 include$/curl
$/curlrules.h
182 .IF
"$(GUI)"=="UNX" ||
"$(COM)"=="GCC"
186 # --- Targets ------------------------------------------------------
188 .INCLUDE
: set_ext.mk