update credits
[LibreOffice.git] / curl / ExternalProject_curl.mk
blob142a782efcc967ee7e2e97c34da4c65e96c8e867
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:'\'\$$\$$ORIGIN/../ure-link/lib)
26 ifneq ($(SYSBASE),)
27 curl_CPPFLAGS += -I$(SYSBASE)/usr/include
28 curl_LDFLAGS += -L$(SYSBASE)/usr/lib
29 endif
31 # there are 2 include paths, the other one is passed to --with-nss below
32 ifeq ($(SYSTEM_NSS),NO)
33 curl_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/public/nss
34 endif
36 $(call gb_ExternalProject_get_state_target,curl,build):
37 $(call gb_ExternalProject_run,build,\
38 CPPFLAGS="$(curl_CPPFLAGS)" \
39 LDFLAGS=$(curl_LDFLAGS) \
40 ./configure \
41 --with-nss$(if $(filter NO,$(SYSTEM_NSS)),="$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out") \
42 --without-ssl \
43 --without-libidn --enable-ftp --enable-ipv6 --enable-http --disable-gopher \
44 --disable-file --disable-ldap --disable-telnet --disable-dict --without-libssh2 \
45 $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
46 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \
47 $(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug) \
48 && cd lib \
49 && $(MAKE) \
52 else ifeq ($(OS)$(COM),WNTGCC)
54 $(call gb_ExternalProject_get_state_target,curl,build):
55 $(call gb_ExternalProject_run,build,\
56 PATH=$(OUTDIR)/bin:$$PATH ./configure --with-nss --without-ssl --enable-ftp --enable-ipv6 --disable-http --disable-gopher \
57 --disable-file --disable-ldap --disable-telnet --disable-dict --build=i586-pc-mingw32 --host=i586-pc-mingw32 \
58 $(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug) \
59 CC="$(CC) -mthreads $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \
60 LIBS="-lws2_32 -lwinmm $(if $(filter YES,$(MINGW_SHARED_GXXLIB)),$(MINGW_SHARED_LIBSTDCPP))" \
61 LDFLAGS="$(patsubst ;, -L,$(ILIB))" \
62 CPPFLAGS="$(INCLUDE)" OBJDUMP="objdump" \
63 && cd lib \
64 && $(MAKE) \
67 else ifeq ($(COM),MSC)
69 $(call gb_ExternalProject_get_state_target,curl,build):
70 $(call gb_ExternalProject_run,build,\
71 MAKEFLAGS= LIB="$(ILIB)" nmake -f Makefile.vc9 \
72 cfg=$(if $(MSVC_USE_DEBUG_RUNTIME),debug-dll,release-dll) \
73 EXCFLAGS="/EHa /Zc:wchar_t- /D_CRT_SECURE_NO_DEPRECATE /DUSE_WINDOWS_SSPI $(SOLARINC)" $(if $(filter X86_64,$(CPUNAME)),MACHINE=X64) \
74 ,lib)
76 endif
78 # vim: set noet sw=4 ts=4: