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
,postgresql
))
12 $(eval
$(call gb_ExternalProject_use_externals
,postgresql
,\
18 $(eval
$(call gb_ExternalProject_register_targets
,postgresql
,\
22 ifeq ($(OS
)$(COM
),WNTMSC
)
24 $(call gb_ExternalProject_get_state_target
,postgresql
,build
) :
25 $(call gb_ExternalProject_run
,build
,\
26 MAKEFLAGS
= && nmake
-f win32.mak USE_SSL
=1 USE_LDAP
=1 \
31 postgresql_CPPFLAGS
:= $(ZLIB_CFLAGS
)
34 ifeq ($(SYSTEM_ZLIB
),)
35 postgresql_LDFLAGS
+= $(ZLIB_LIBS
)
38 ifeq ($(DISABLE_OPENSSL
),)
39 ifeq ($(SYSTEM_OPENSSL
),)
40 postgresql_CPPFLAGS
+= -I
$(call gb_UnpackedTarball_get_dir
,openssl
)/include
41 postgresql_LDFLAGS
+= -L
$(call gb_UnpackedTarball_get_dir
,openssl
)/
45 ifeq ($(SYSTEM_OPENLDAP
),)
46 postgresql_CPPFLAGS
+= -I
$(call gb_UnpackedTarball_get_dir
,openldap
)/include
47 postgresql_LDFLAGS
+= \
48 -L
$(call gb_UnpackedTarball_get_dir
,openldap
)/libraries
/libldap_r
/.libs \
49 -L
$(call gb_UnpackedTarball_get_dir
,openldap
)/libraries
/libldap
/.libs \
50 -L
$(call gb_UnpackedTarball_get_dir
,openldap
)/libraries
/liblber
/.libs \
52 -L
$(call gb_UnpackedTarball_get_dir
,nss
)/dist/out
/lib
) \
57 $(call gb_ExternalProject_get_state_target
,postgresql
,build
) :
58 $(call gb_ExternalProject_run
,build
,\
60 --without-readline
--disable-shared
--with-ldap \
61 $(if
$(CROSS_COMPILING
),--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)) \
62 $(if
$(DISABLE_OPENSSL
),,--with-openssl \
63 $(if
$(WITH_KRB5
), --with-krb5
) \
64 $(if
$(WITH_GSSAPI
),--with-gssapi
)) \
65 CPPFLAGS
="$(postgresql_CPPFLAGS)" \
66 LDFLAGS
="$(postgresql_LDFLAGS)" \
67 EXTRA_LDAP_LIBS
="-llber -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4" \
68 && cd src
/interfaces
/libpq \
69 && MAKEFLAGS
= && $(MAKE
) all-static-lib
)
73 # vim: set noet sw=4 ts=4: