cid#1607171 Data race condition
[LibreOffice.git] / external / firebird / ExternalProject_firebird.mk
blob16fe160a3af6a02edafa2474530d2c6559c0f9b1
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,\
15 boost_headers \
16 icu \
17 libatomic_ops \
18 libtommath \
21 $(eval $(call gb_ExternalProject_register_targets,firebird,\
22 build \
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=" \
33 $(BOOST_CPPFLAGS) \
34 $(if $(SYSTEM_LIBATOMIC_OPS),$(LIBATOMIC_OPS_CFLAGS), \
35 -I$(gb_UnpackedTarball_workdir)/libatomic_ops/src \
36 ) \
37 $(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_CFLAGS), \
38 -I$(gb_UnpackedTarball_workdir)/libtommath \
39 ) \
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 \
44 ) \
45 $(if $(filter GCC-INTEL,$(COM)-$(CPUNAME)),-Di386=1) \
46 " \
47 && export CFLAGS=" \
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)) \
53 " \
54 && export CXXFLAGS=" \
55 $(BOOST_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) \
59 $(CXXFLAGS_CXX11) \
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)) \
63 " \
64 && export LDFLAGS=" \
65 $(call gb_ExternalProject_get_link_flags,firebird) \
66 $(if $(SYSTEM_LIBATOMIC_OPS),$(LIBATOMIC_OPS_LIBS), \
67 -L$(gb_UnpackedTarball_workdir)/libatomic_ops/src \
68 ) \
69 $(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_LIBS), \
70 -L$(gb_UnpackedTarball_workdir)/libtommath \
71 ) \
72 $(if $(SYSTEM_ICU),$(ICU_LIBS), \
73 -L$(gb_UnpackedTarball_workdir)/icu/source/lib \
74 ) \
75 " \
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 \
79 --without-editline \
80 --with-wire-compress=no \
81 $(gb_CONFIGURE_PLATFORMS) \
82 $(if $(DISABLE_DYNLOADING), \
83 --enable-static --disable-shared \
84 , \
85 --enable-shared --disable-static \
86 ) \
87 $(if $(HAVE_LIBCPP),CXX='$(CXX) -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR') \
88 && LC_ALL=C $(MAKE) \
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: