lok: vcl: fix multiple floatwin removal case more robustly.
[LibreOffice.git] / external / curl / ExternalProject_curl.mk
blob73d5620eaa019f8976e1a62f8b545582464880e4
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 $(if $(ENABLE_NSS),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 ./configure \
43 $(if $(filter iOS MACOSX,$(OS)),\
44 --with-darwinssl,\
45 $(if $(ENABLE_NSS),--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out"),--without-nss)) \
46 --without-ssl --without-gnutls --without-polarssl --without-cyassl --without-axtls --without-mbedtls \
47 --enable-ftp --enable-http --enable-ipv6 \
48 --without-libidn2 --without-libpsl --without-librtmp \
49 --without-libssh2 --without-metalink --without-nghttp2 \
50 --without-libssh --without-brotli \
51 --disable-ares \
52 --disable-dict --disable-file --disable-gopher --disable-imap \
53 --disable-ldap --disable-ldaps --disable-manual --disable-pop3 \
54 --disable-rtsp --disable-smb --disable-smtp --disable-telnet \
55 --disable-tftp \
56 $(if $(filter LINUX,$(OS)),--without-ca-bundle --without-ca-path) \
57 $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
58 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \
59 $(if $(ENABLE_DEBUG),--enable-debug) \
60 $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
61 $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
62 $(if $(filter MACOSX,$(OS)),CFLAGS='$(CFLAGS) \
63 -mmacosx-version-min=$(MAC_OS_X_VERSION_MIN_REQUIRED_DOTS)') \
64 CPPFLAGS='$(curl_CPPFLAGS)' \
65 LDFLAGS='$(curl_LDFLAGS)' \
66 ZLIB_CFLAGS='$(ZLIB_CFLAGS)' ZLIB_LIBS='$(ZLIB_LIBS)' \
67 && cd lib \
68 && $(MAKE) \
71 else ifeq ($(COM),MSC)
73 $(eval $(call gb_ExternalProject_use_nmake,curl,build))
75 $(call gb_ExternalProject_get_state_target,curl,build):
76 $(call gb_ExternalProject_run,build,\
77 nmake -f Makefile.vc \
78 mode=dll \
79 VC=12 \
80 $(if $(filter X86_64,$(CPUNAME)),MACHINE=x64,MACHINE=x86) \
81 GEN_PDB=$(if $(gb_SYMBOL),yes,no) \
82 DEBUG=$(if $(MSVC_USE_DEBUG_RUNTIME),yes,no) \
83 ENABLE_IPV6=yes \
84 ENABLE_SSPI=yes \
85 ENABLE_WINSSL=yes \
86 ,winbuild)
88 endif
90 # vim: set noet sw=4 ts=4: