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
,icu
))
12 $(eval
$(call gb_ExternalProject_register_targets
,icu
,\
16 icu_CPPFLAGS
:="-DHAVE_GCC_ATOMICS=$(if $(filter TRUE,$(GCC_HAVE_BUILTIN_ATOMIC)),1,0)"
20 # Note: runConfigureICU ignores everything following the platform name!
21 $(call gb_ExternalProject_get_state_target
,icu
,build
) :
22 $(call gb_ExternalProject_run
,build
,\
23 export LIB
="$(ILIB)" \
24 && CFLAGS
="-FS -arch:SSE $(SOLARINC) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS)" CPPFLAGS
="$(SOLARINC)" CXXFLAGS
="-FS -arch:SSE $(SOLARINC) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS)" \
25 INSTALL
=`cygpath -m /usr/bin/install` \
27 $(if
$(MSVC_USE_DEBUG_RUNTIME
),--enable-debug
--disable-release
) \
35 $(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
36 $(if $(SYSBASE),-I$(SYSBASE)/usr/include) \
37 $(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
38 $(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
39 $(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
40 $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
41 $(if $(filter FUZZERS,$(BUILD_TYPE)),-DU_USE_STRTOD_L=0) \
42 $(if $(filter ANDROID,$(OS)),-fvisibility=hidden -fno-omit-frame-pointer)"
43 icu_CXXFLAGS
:="$(CXXFLAGS) $(CXXFLAGS_CXX11) \
44 $(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
45 $(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
46 $(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
47 $(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
48 $(if $(filter $(true),$(gb_SYMBOL)),$(gb_DEBUGINFO_FLAGS)) \
49 $(if $(filter FUZZERS,$(BUILD_TYPE)),-DU_USE_STRTOD_L=0) \
50 $(if $(filter ANDROID,$(OS)),-fvisibility=hidden -fno-omit-frame-pointer)"
52 $(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
53 $(if $(filter TRUE,$(HAVE_LD_HASH_STYLE)),-Wl$(COMMA)--hash-style=$(WITH_LINKER_HASH_STYLE)) \
54 $(if $(SYSBASE),-L../lib -L../../lib -L../stubdata -L../../stubdata -L$(SYSBASE)/usr/lib) \
55 $(if $(filter TRUE,$(HAVE_LD_BSYMBOLIC_FUNCTIONS)),\
56 -Wl$(COMMA)-Bsymbolic-functions -Wl$(COMMA)--dynamic-list-cpp-new -Wl$(COMMA)--dynamic-list-cpp-typeinfo) \
57 $(if $(filter ANDROID,$(OS)),-lgnustl_shared -lm)"
59 $(call gb_ExternalProject_get_state_target
,icu
,build
) :
60 $(call gb_ExternalProject_run
,build
,\
61 CPPFLAGS
=$(icu_CPPFLAGS
) CFLAGS
=$(icu_CFLAGS
) \
62 CXXFLAGS
=$(icu_CXXFLAGS
) LDFLAGS
=$(icu_LDFLAGS
) \
64 --disable-layout
--disable-samples \
65 $(if
$(CROSS_COMPILING
),--disable-tools
--disable-extras
) \
66 $(if
$(filter IOS ANDROID
,$(OS
)),--disable-dyload
) \
67 $(if
$(filter ANDROID
,$(OS
)),--disable-strict ac_cv_c_bigendian
=no
) \
68 $(if
$(filter SOLARIS AIX
,$(OS
)),--disable-64bit-libs
) \
69 $(if
$(filter TRUE
,$(DISABLE_DYNLOADING
)),\
70 --with-data-packaging
=static
--enable-static
--disable-shared
--disable-dyload
,\
71 --disable-static
--enable-shared
$(if
$(filter ANDROID
,$(OS
)),--with-library-suffix
=lo
)) \
72 $(if
$(CROSS_COMPILING
),--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)\
73 --with-cross-build
=$(WORKDIR_FOR_BUILD
)/UnpackedTarball
/icu
/source
) \
75 $(if
$(filter MACOSX
,$(OS
)), \
76 && $(PERL
) $(SRCDIR
)/solenv
/bin
/macosx-change-install-names.pl shl \
78 $(gb_Package_SOURCEDIR_icu
)/source
/lib
/libicuuc
$(gb_Library_DLLEXT
).
$(icu_VERSION
) \
79 $(gb_Package_SOURCEDIR_icu
)/source
/lib
/libicui18n
$(gb_Library_DLLEXT
).
$(icu_VERSION
) \
80 && $(PERL
) $(SRCDIR
)/solenv
/bin
/macosx-change-install-names.pl shl \
82 $(gb_Package_SOURCEDIR_icu
)/source
/lib
/libicudata
$(gb_Library_DLLEXT
).
$(icu_VERSION
)) \
87 # vim: set noet sw=4 ts=4: