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
,firebird
))
12 $(eval
$(call gb_ExternalProject_use_autoconf
,firebird
,build
))
14 $(eval
$(call gb_ExternalProject_use_externals
,firebird
,\
21 $(eval
$(call gb_ExternalProject_register_targets
,firebird
,\
26 INVOKE_FPA
:="CPU=\$$(EMPTY) $${FB_CPU_ARG}"
29 ifeq ($(COM_IS_CLANG
),TRUE
)
30 firebird_NO_CXX11_NARROWING
:= -Wno-c
++11-narrowing
35 MAKE_POST
=$(if
$(filter MACOSX
,$(OS
)),&& $(PERL
) \
36 $(SRCDIR
)/solenv
/bin
/macosx-change-install-names.pl shl OOO \
37 $(EXTERNAL_WORKDIR
)/gen
/$(if
$(ENABLE_DEBUG
),Debug
,Release
)/firebird
/plugins
/libEngine12.dylib \
38 $(EXTERNAL_WORKDIR
)/gen
/$(if
$(ENABLE_DEBUG
),Debug
,Release
)/firebird
/lib
/libfbclient.dylib
.3.0.0)
40 $(call gb_ExternalProject_get_state_target
,firebird
,build
):
41 $(call gb_ExternalProject_run
,build
,\
43 && FB_CPU_ARG
='$(filter --jobserver-fds=%,$(MAKEFLAGS))' \
44 && export PKG_CONFIG
="" \
45 && export CPPFLAGS
=" \
46 $(if $(SYSTEM_LIBATOMIC_OPS),$(LIBATOMIC_OPS_CFLAGS), \
47 -I$(call gb_UnpackedTarball_get_dir,libatomic_ops)/src \
49 $(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_CFLAGS), \
50 -I$(call gb_UnpackedTarball_get_dir,libtommath) \
51 -L$(call gb_UnpackedTarball_get_dir,libtommath) \
53 $(if $(SYSTEM_ICU),$(ICU_CPPFLAGS), \
54 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
55 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
56 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
59 && export CXXFLAGS
=" \
60 $(if $(filter MSC,$(COM)),$(if $(MSVC_USE_DEBUG_RUNTIME),-DMSVC_USE_DEBUG_RUNTIME)) \
61 $(if $(HAVE_GCC_FNO_SIZED_DEALLOCATION),-fno-sized-deallocation -fno-delete-null-pointer-checks) \
62 $(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS), \
64 -L$(call gb_UnpackedTarball_get_dir,boost)/source/lib \
66 $(if $(SYSTEM_ICU),$(ICU_CPPFLAGS), \
67 -I$(call gb_UnpackedTarball_get_dir,icu)/source \
68 -I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
69 -I$(call gb_UnpackedTarball_get_dir,icu)/source/common \
71 $(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_CFLAGS), \
72 -L$(call gb_UnpackedTarball_get_dir,libtommath) \
75 $(firebird_NO_CXX11_NARROWING) \
76 $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
79 $(if $(SYSTEM_ICU),$(ICU_LIBS), \
80 -L$(call gb_UnpackedTarball_get_dir,icu)/source/lib \
83 && export LIBREOFFICE_ICU_LIB
="$(call gb_UnpackedTarball_get_dir,icu)/source/lib" \
84 && MAKE
=$(MAKE
) .
/configure \
86 --with-wire-compress
=no \
87 $(if
$(CROSS_COMPILING
),--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)) \
88 $(if
$(DISABLE_DYNLOADING
), \
89 --enable-static
--disable-shared \
91 --enable-shared
--disable-static \
93 $(if
$(filter MACOSX
,$(OS
)), \
95 $(shell expr
'$(MAC_OS_X_VERSION_MIN_REQUIRED)' \
97 ac_cv_func_clock_gettime
=no
)) \
98 && if
[ -n
"$${FB_CPU_ARG}" ]; then \
99 $(MAKE_PRE
) $(MAKE
) $(if
$(ENABLE_DEBUG
),Debug
) $(INVOKE_FPA
) SHELL
='$(SHELL)' LIBO_TUNNEL_LIBRARY_PATH
='$(subst ','\'',$(subst $$,$$$$,$(call gb_Helper_extend_ld_path
,$(call gb_UnpackedTarball_get_dir
,icu
)/source
/lib
)))' $(MAKE_POST); \
101 $(MAKE_PRE) $(MAKE) $(if $(ENABLE_DEBUG),Debug) SHELL='$(SHELL
)' LIBO_TUNNEL_LIBRARY_PATH='$(subst ','\'',$(subst $$,$$$$,$(call gb_Helper_extend_ld_path,$(call gb_UnpackedTarball_get_dir,icu)/source/lib)))' $(MAKE_POST
); \
104 # vim: set noet sw=4 ts=4: