1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval
$(call gb_ExternalProject_ExternalProject
,curl
))
12 $(eval
$(call gb_ExternalProject_use_externals
,curl
,\
17 $(eval
$(call gb_ExternalProject_register_targets
,curl
,\
24 curl_LDFLAGS
:= $(if
$(filter LINUX FREEBSD
,$(OS
)),"-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\
$$\
$$ORIGIN)
28 curl_CPPFLAGS
+= -I
$(SYSBASE
)/usr
/include
29 curl_LDFLAGS
+= -L
$(SYSBASE
)/usr
/lib
33 # there are 2 include paths, the other one is passed to --with-nss below
35 curl_CPPFLAGS
+= -I
$(call gb_UnpackedTarball_get_dir
,nss
)/dist/public
/nss
38 # use --with-darwinssl on Mac OS X >10.5 and iOS to get a native UI for SSL certs for CMIS usage
39 # use --with-nss only on platforms other than Mac OS X and iOS
40 $(call gb_ExternalProject_get_state_target
,curl
,build
):
41 $(call gb_ExternalProject_run
,build
,\
42 CPPFLAGS
="$(curl_CPPFLAGS)" \
43 LDFLAGS
=$(curl_LDFLAGS
) \
45 $(if
$(filter IOS MACOSX
,$(OS
)),,--with-nss
$(if
$(SYSTEM_NSS
),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out")) \
46 $(if
$(filter IOS
,$(OS
)),--with-darwinssl
) \
47 $(if
$(filter MACOSX
,$(OS
)),\
49 --without-ssl
--without-gnutls
--without-polarssl
--without-cyassl
--without-axtls \
50 --without-libidn
--enable-ftp
--enable-ipv6
--enable-http
--disable-gopher \
51 --disable-file
--disable-ldap
--disable-telnet
--disable-dict
--without-libssh2 \
52 --without-librtmp
--disable-ldaps
--disable-tftp
--disable-pop3 \
53 --disable-imap
--disable-smtp
--disable-manual
--without-metalink \
55 $(if
$(CROSS_COMPILING
),--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)) \
56 $(if
$(filter TRUE
,$(DISABLE_DYNLOADING
)),--disable-shared
,--disable-static
) \
57 $(if
$(ENABLE_DEBUG
),--enable-debug
) \
58 $(if
$(filter MACOSX
,$(OS
)),--prefix=/@.__________________________________________________OOO
) \
63 else ifeq ($(OS
)$(COM
),WNTGCC
)
65 $(call gb_ExternalProject_get_state_target
,curl
,build
):
66 $(call gb_ExternalProject_run
,build
,\
67 .
/configure
--with-nss
--without-ssl
--enable-ftp
--enable-ipv6
--disable-http
--disable-gopher \
68 --disable-file
--disable-ldap
--disable-telnet
--disable-dict
--build
=i586-pc-mingw32
--host
=i586-pc-mingw32 \
69 $(if
$(ENABLE_DEBUG
),--enable-debug
) \
70 CC
="$(CC) -mthreads $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
71 LIBS
="-lws2_32 -lwinmm $(if $(MINGW_SHARED_GXXLIB),$(MINGW_SHARED_LIBSTDCPP))" \
72 LDFLAGS
="$(patsubst ;, -L,$(ILIB))" \
73 CPPFLAGS
="$(INCLUDE)" OBJDUMP
="objdump" \
78 else ifeq ($(COM
),MSC
)
80 $(call gb_ExternalProject_get_state_target
,curl
,build
):
81 $(call gb_ExternalProject_run
,build
,\
82 MAKEFLAGS
= LIB
="$(ILIB)" nmake
-f Makefile.vc10 \
83 cfg
=$(if
$(MSVC_USE_DEBUG_RUNTIME
),debug-dll
,release-dll
) \
84 EXCFLAGS
="/EHa /Zc:wchar_t- /D_CRT_SECURE_NO_DEPRECATE /DUSE_WINDOWS_SSPI $(SOLARINC)" $(if
$(filter X86_64
,$(CPUNAME
)),MACHINE
=X64
) \
89 # vim: set noet sw=4 ts=4: