2012-10-21 09:15:12 -04:00
|
|
|
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
|
|
#
|
|
|
|
# This file is part of the LibreOffice project.
|
|
|
|
#
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
#
|
|
|
|
|
2013-05-06 23:46:30 +02:00
|
|
|
$(eval $(call gb_ExternalProject_ExternalProject,postgresql))
|
2012-10-21 09:15:12 -04:00
|
|
|
|
2013-05-08 15:47:24 +02:00
|
|
|
$(eval $(call gb_ExternalProject_use_externals,postgresql,\
|
2013-09-19 19:28:36 +02:00
|
|
|
openldap \
|
2013-05-08 15:47:24 +02:00
|
|
|
openssl \
|
|
|
|
zlib \
|
|
|
|
))
|
2012-12-28 11:19:06 -05:00
|
|
|
|
2012-10-21 09:15:12 -04:00
|
|
|
$(eval $(call gb_ExternalProject_register_targets,postgresql,\
|
|
|
|
build \
|
|
|
|
))
|
|
|
|
|
|
|
|
ifeq ($(OS)$(COM),WNTMSC)
|
|
|
|
|
|
|
|
$(call gb_ExternalProject_get_state_target,postgresql,build) :
|
2013-02-21 08:15:39 -06:00
|
|
|
$(call gb_ExternalProject_run,build,\
|
|
|
|
MAKEFLAGS= && nmake -f win32.mak USE_SSL=1 USE_LDAP=1 \
|
|
|
|
,src)
|
2012-10-27 19:05:33 +02:00
|
|
|
|
2012-10-21 09:15:12 -04:00
|
|
|
else
|
|
|
|
|
2013-10-27 00:47:10 +02:00
|
|
|
postgresql_CPPFLAGS := $(ZLIB_CFLAGS)
|
|
|
|
postgresql_LDFLAGS :=
|
|
|
|
|
|
|
|
ifeq ($(DISABLE_OPENSSL),)
|
2014-02-11 15:57:18 +01:00
|
|
|
ifeq ($(SYSTEM_OPENSSL),)
|
2013-10-27 00:47:10 +02:00
|
|
|
postgresql_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,openssl)/include
|
|
|
|
postgresql_LDFLAGS += -L$(call gb_UnpackedTarball_get_dir,openssl)/
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-02-11 19:11:47 +01:00
|
|
|
ifeq ($(SYSTEM_OPENLDAP),)
|
2013-10-27 00:47:10 +02:00
|
|
|
postgresql_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,openldap)/include
|
|
|
|
postgresql_LDFLAGS += \
|
|
|
|
-L$(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap_r/.libs \
|
|
|
|
-L$(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs \
|
|
|
|
-L$(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs \
|
2014-02-11 15:57:18 +01:00
|
|
|
$(if $(SYSTEM_NSS),,\
|
2013-11-13 17:08:03 +01:00
|
|
|
-L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib) \
|
2013-10-27 00:47:10 +02:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2012-10-21 09:15:12 -04:00
|
|
|
$(call gb_ExternalProject_get_state_target,postgresql,build) :
|
2013-02-21 08:15:39 -06:00
|
|
|
$(call gb_ExternalProject_run,build,\
|
|
|
|
./configure \
|
2013-04-10 11:22:05 +03:00
|
|
|
--without-readline --disable-shared --with-ldap \
|
2014-02-27 16:19:43 +01:00
|
|
|
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
|
2013-08-31 18:55:53 -05:00
|
|
|
$(if $(DISABLE_OPENSSL),,--with-openssl \
|
|
|
|
$(if $(filter YES,$(WITH_KRB5)), --with-krb5) \
|
|
|
|
$(if $(filter YES,$(WITH_GSSAPI)),--with-gssapi)) \
|
2013-10-27 00:47:10 +02:00
|
|
|
CPPFLAGS="$(postgresql_CPPFLAGS)" \
|
|
|
|
LDFLAGS="$(postgresql_LDFLAGS)" \
|
2012-10-30 22:01:39 +01:00
|
|
|
EXTRA_LDAP_LIBS="-llber -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4" \
|
2013-02-21 08:15:39 -06:00
|
|
|
&& cd src/interfaces/libpq \
|
2013-03-25 21:27:10 -04:00
|
|
|
&& MAKEFLAGS= && $(MAKE) all-static-lib)
|
2012-10-21 09:15:12 -04:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
# vim: set noet sw=4 ts=4:
|