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
,\
25 firebird_BUILDDIR
= $(EXTERNAL_WORKDIR
)/gen
/$(if
$(ENABLE_DEBUG
),Debug
,Release
)/firebird
26 firebird_VERSION
:= 3.0.7
28 $(call gb_ExternalProject_get_state_target
,firebird
,build
):
29 $(call gb_Trace_StartRange
,firebird
,EXTERNAL
)
30 $(call gb_ExternalProject_run
,build
,\
31 export PKG_CONFIG
="" \
32 && export CPPFLAGS
=" \
34 $(if $(SYSTEM_LIBATOMIC_OPS),$(LIBATOMIC_OPS_CFLAGS), \
35 -I$(gb_UnpackedTarball_workdir)/libatomic_ops/src \
37 $(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_CFLAGS), \
38 -I$(gb_UnpackedTarball_workdir)/libtommath \
40 $(if $(SYSTEM_ICU),$(ICU_CPPFLAGS), \
41 -I$(gb_UnpackedTarball_workdir)/icu/source \
42 -I$(gb_UnpackedTarball_workdir)/icu/source/i18n \
43 -I$(gb_UnpackedTarball_workdir)/icu/source/common \
45 $(if $(filter GCC-INTEL,$(COM)-$(CPUNAME)),-Di386=1) \
48 $(if $(filter MSC,$(COM)),$(if $(MSVC_USE_DEBUG_RUNTIME),-DMSVC_USE_DEBUG_RUNTIME)) \
49 $(if $(filter MSC-TRUE-X86_64,$(COM)-$(COM_IS_CLANG)-$(CPUNAME)),-march=x86-64-v2) \
50 $(if $(HAVE_GCC_FNO_SIZED_DEALLOCATION),-fno-sized-deallocation -fno-delete-null-pointer-checks) \
51 $(call gb_ExternalProject_get_build_flags,firebird) \
52 $(if $(ENABLE_DEBUG),$(if $(filter MSC,$(COM)),-Od -Z7)) \
54 && export CXXFLAGS
=" \
56 $(if $(filter MSC,$(COM)),$(if $(MSVC_USE_DEBUG_RUNTIME),-DMSVC_USE_DEBUG_RUNTIME)) \
57 $(if $(filter MSC-TRUE-X86_64,$(COM)-$(COM_IS_CLANG)-$(CPUNAME)),-march=x86-64-v2) \
58 $(if $(HAVE_GCC_FNO_SIZED_DEALLOCATION),-fno-sized-deallocation -fno-delete-null-pointer-checks) \
60 $(if $(filter TRUE,$(COM_IS_CLANG)), -Wno-c++11-narrowing) \
61 $(call gb_ExternalProject_get_build_flags,firebird) \
62 $(if $(ENABLE_DEBUG),$(if $(filter MSC,$(COM)),-Od -Z7)) \
65 $(call gb_ExternalProject_get_link_flags,firebird) \
66 $(if $(SYSTEM_LIBATOMIC_OPS),$(LIBATOMIC_OPS_LIBS), \
67 -L$(gb_UnpackedTarball_workdir)/libatomic_ops/src \
69 $(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_LIBS), \
70 -L$(gb_UnpackedTarball_workdir)/libtommath \
72 $(if $(SYSTEM_ICU),$(ICU_LIBS), \
73 -L$(gb_UnpackedTarball_workdir)/icu/source/lib \
76 && export LIBREOFFICE_ICU_LIB
="$(gb_UnpackedTarball_workdir)/icu/source/lib" \
77 && export MSVC_USE_INDIVIDUAL_PDBS
=TRUE \
78 && MAKE
=$(MAKE
) $(gb_RUN_CONFIGURE
) .
/configure \
80 --with-wire-compress
=no \
81 $(gb_CONFIGURE_PLATFORMS
) \
82 $(if
$(DISABLE_DYNLOADING
), \
83 --enable-static
--disable-shared \
85 --enable-shared
--disable-static \
87 $(if
$(HAVE_LIBCPP
),CXX
='$(CXX) -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR') \
89 $(if
$(ENABLE_DEBUG
),Debug
) SHELL
='$(SHELL)' $(if
$(filter LINUX
,$(OS
)),CXXFLAGS
="$$CXXFLAGS") \
90 MATHLIB
="$(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_LIBS),-L$(gb_UnpackedTarball_workdir)/libtommath -ltommath)" \
91 LIBO_TUNNEL_LIBRARY_PATH
='$(subst ','\'',$(subst $$,$$$$,$(call gb_Helper_extend_ld_path
,$(gb_UnpackedTarball_workdir
)/icu
/source
/lib
)))' \
92 $(if $(filter MACOSX,$(OS)), \
93 && install_name_tool -id @__________________________________________________OOO/libfbclient.dylib.$(firebird_VERSION) \
94 -delete_rpath @loader_path/.. \
95 $(firebird_BUILDDIR)/lib/libfbclient.dylib.$(firebird_VERSION) \
96 && install_name_tool -id @__________________________________________________OOO/libEngine12.dylib \
97 -delete_rpath @loader_path/.. \
98 $(firebird_BUILDDIR)/plugins/libEngine12.dylib \
99 && install_name_tool -change @rpath/lib/libfbclient.dylib \
100 @loader_path/libfbclient.dylib.$(firebird_VERSION) $(firebird_BUILDDIR)/plugins/libEngine12.dylib \
101 && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
102 $(firebird_BUILDDIR)/lib/libfbclient.dylib.$(firebird_VERSION) \
103 $(firebird_BUILDDIR)/plugins/libEngine12.dylib \
106 $(call gb_Trace_EndRange,firebird,EXTERNAL)
108 # vim: set noet sw=4 ts=4: