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!
22 $(call gb_ExternalProject_get_state_target
,icu
,build
) :
23 $(call gb_ExternalProject_run
,build
,\
24 export LIB
="$(ILIB)" \
25 && CFLAGS
="-arch:SSE $(SOLARINC) $(gb_DEBUG_CFLAGS)" CPPFLAGS
="$(SOLARINC)" CXXFLAGS
="-arch:SSE $(SOLARINC) $(gb_DEBUG_CFLAGS)" \
26 INSTALL
=`cygpath -m /usr/bin/install` \
28 $(if
$(MSVC_USE_DEBUG_RUNTIME
),--enable-debug
--disable-release
) \
33 $(call gb_ExternalProject_get_state_target
,icu
,build
) :
34 $(call gb_ExternalProject_run
,build
,\
35 CPPFLAGS
=$(icu_CPPFLAGS
) CFLAGS
="-O -D_MT" CXXFLAGS
="-O -D_MT" \
36 LIBS
="$(if $(MINGW_SHARED_GXXLIB),$(MINGW_SHARED_LIBSTDCPP))" \
37 LDFLAGS
="-L$(COMPATH)/lib -Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 \
38 $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
40 $(if
$(CROSS_COMPILING
),--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
) \
41 --with-cross-build
=$(WORKDIR_FOR_BUILD
)/UnpackedTarball
/icu
/source
) \
42 --disable-layout
--disable-static
--enable-shared
--disable-samples \
44 && for lib in icudata icuin icuuc
; do \
53 $(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
54 $(if $(SYSBASE),-I$(SYSBASE)/usr/include) \
55 $(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
56 $(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
57 $(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
58 $(if $(filter $(true),$(gb_SYMBOL)),-g) \
59 $(if $(filter ANDROID,$(OS)),-fvisibility=hidden -fno-omit-frame-pointer)"
60 icu_CXXFLAGS
:="$(CXXFLAGS_CXX11) \
61 $(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
62 $(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
63 $(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
64 $(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
65 $(if $(filter $(true),$(gb_SYMBOL)),-g) \
66 $(if $(filter ANDROID,$(OS)),-fvisibility=hidden -fno-omit-frame-pointer)"
68 $(if $(ENABLE_LTO),$(gb_LTOFLAGS)) \
69 $(if $(filter TRUE,$(HAVE_LD_HASH_STYLE)),-Wl$(COMMA)--hash-style=$(WITH_LINKER_HASH_STYLE)) \
70 $(if $(SYSBASE),-L../lib -L../../lib -L../stubdata -L../../stubdata -L$(SYSBASE)/usr/lib) \
71 $(if $(filter TRUE,$(HAVE_LD_BSYMBOLIC_FUNCTIONS)),\
72 -Wl$(COMMA)-Bsymbolic-functions -Wl$(COMMA)--dynamic-list-cpp-new -Wl$(COMMA)--dynamic-list-cpp-typeinfo) \
73 $(if $(filter ANDROID,$(OS)),-lgnustl_shared -lm)"
75 $(call gb_ExternalProject_get_state_target
,icu
,build
) :
76 $(call gb_ExternalProject_run
,build
,\
77 CPPFLAGS
=$(icu_CPPFLAGS
) CFLAGS
=$(icu_CFLAGS
) \
78 CXXFLAGS
=$(icu_CXXFLAGS
) LDFLAGS
=$(icu_LDFLAGS
) \
80 --disable-layout
--disable-samples \
81 $(if
$(CROSS_COMPILING
),--disable-tools
--disable-extras
) \
82 $(if
$(filter IOS ANDROID
,$(OS
)),--disable-dyload
) \
83 $(if
$(filter ANDROID
,$(OS
)),--disable-strict ac_cv_c_bigendian
=no
) \
84 $(if
$(filter SOLARIS AIX
,$(OS
)),--disable-64bit-libs
) \
85 $(if
$(filter TRUE
,$(DISABLE_DYNLOADING
)),\
86 --enable-static
--disable-shared
,\
87 --disable-static
--enable-shared
$(if
$(filter ANDROID
,$(OS
)),--with-library-suffix
=lo
)) \
88 $(if
$(CROSS_COMPILING
),--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)\
89 --with-cross-build
=$(WORKDIR_FOR_BUILD
)/UnpackedTarball
/icu
/source
) \
90 $(if
$(filter IOS
,$(OS
)), \
91 --with-data-packaging
=archive
) \
93 $(if
$(filter MACOSX
,$(OS
)),&& $(PERL
) \
94 $(SRCDIR
)/solenv
/bin
/macosx-change-install-names.pl shl OOO \
95 $(gb_Package_SOURCEDIR_icu
)/source
/lib
/libicudata
$(gb_Library_DLLEXT
).
$(icu_VERSION
) \
96 $(gb_Package_SOURCEDIR_icu
)/source
/lib
/libicuuc
$(gb_Library_DLLEXT
).
$(icu_VERSION
) \
97 $(gb_Package_SOURCEDIR_icu
)/source
/lib
/libicui18n
$(gb_Library_DLLEXT
).
$(icu_VERSION
)) \
102 # vim: set noet sw=4 ts=4: