Bump version to 5.0-14
[LibreOffice.git] / external / curl / ExternalProject_curl.mk
blob4222419c6ad38c59885ebae63e9cc2717eb0a0cf
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,\
13 nss3 \
14 zlib \
17 $(eval $(call gb_ExternalProject_register_targets,curl,\
18 build \
21 ifneq ($(OS),WNT)
23 curl_CPPFLAGS :=
24 curl_LDFLAGS := $(if $(filter LINUX FREEBSD,$(OS)),"-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN)
26 ifneq ($(OS),ANDROID)
27 ifneq ($(SYSBASE),)
28 curl_CPPFLAGS += -I$(SYSBASE)/usr/include
29 curl_LDFLAGS += -L$(SYSBASE)/usr/lib
30 endif
31 endif
33 # there are 2 include paths, the other one is passed to --with-nss below
34 ifeq ($(SYSTEM_NSS),)
35 curl_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss
36 endif
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) \
44 ./configure \
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)),\
48 --with-darwinssl) \
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 \
54 --without-nghttp2 \
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) \
59 && cd lib \
60 && $(MAKE) \
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" \
74 && cd lib \
75 && $(MAKE) \
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) \
85 ,lib)
87 endif
89 # vim: set noet sw=4 ts=4: