bump product version to 4.1.6.2
[LibreOffice.git] / icu / ExternalProject_icu.mk
blob695c0710a07af236fbf09aac303555d4fe82f2b3
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,\
13 build \
16 icu_CPPFLAGS:="-DHAVE_GCC_ATOMICS=$(if $(filter TRUE,$(GCC_HAVE_BUILTIN_ATOMIC)),1,0)"
18 ifeq ($(OS),WNT)
20 # Note: runConfigureICU ignores everything following the platform name!
21 ifeq ($(COM),MSC)
22 $(call gb_ExternalProject_get_state_target,icu,build) :
23 $(call gb_ExternalProject_run,build,\
24 export LIB="$(ILIB)" \
25 && CFLAGS="$(SOLARINC)" CPPFLAGS="$(SOLARINC)" CXXFLAGS="$(SOLARINC)" \
26 ./runConfigureICU \
27 $(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug --disable-release) \
28 Cygwin/MSVC \
29 && $(MAKE) \
30 ,source)
31 else
32 $(call gb_ExternalProject_get_state_target,icu,build) :
33 $(call gb_ExternalProject_run,build,\
34 CPPFLAGS=$(icu_CPPFLAGS) CFLAGS="-O -D_MT" CXXFLAGS="-O -D_MT" \
35 LIBS="$(if $(filter YES,$(MINGW_SHARED_GXXLIB)),$(MINGW_SHARED_LIBSTDCPP))" \
36 LDFLAGS="-L$(COMPATH)/lib -Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 \
37 $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \
38 ./configure \
39 $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
40 --with-cross-build=$(subst $(INPATH),$(INPATH_FOR_BUILD),$(call gb_UnpackedTarball_get_dir,icu))/source) \
41 --enable-layout --disable-static --enable-shared --disable-samples \
42 && $(MAKE) \
43 && for lib in icudata icuin icuuc icule icutu; do \
44 touch $$lib; \
45 done \
46 ,source)
47 endif
49 else # $(OS)
51 icu_CFLAGS:="$(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
52 $(if $(SYSBASE),-I$(SYSBASE)/usr/include) \
53 $(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
54 $(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
55 $(if $(filter $(true),$(gb_SYMBOL)),-g) \
56 $(if $(filter ANDROID,$(OS)),-fvisibility=hidden -fno-omit-frame-pointer)"
57 icu_CXXFLAGS:="$(if $(filter IOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
58 $(if $(debug),$(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS)) \
59 $(if $(filter GCC,$(COM)),-fno-strict-aliasing) \
60 $(if $(filter $(true),$(gb_SYMBOL)),-g) \
61 $(if $(filter ANDROID,$(OS)),-fvisibility=hidden -fno-omit-frame-pointer)"
62 icu_LDFLAGS:="$(if $(filter TRUE,$(HAVE_LD_HASH_STYLE)),-Wl$(COMMA)--hash-style=$(WITH_LINKER_HASH_STYLE)) \
63 $(if $(SYSBASE),-L../lib -L../../lib -L../stubdata -L../../stubdata -L$(SYSBASE)/usr/lib) \
64 $(if $(filter TRUE,$(HAVE_LD_BSYMBOLIC_FUNCTIONS)),\
65 -Wl$(COMMA)-Bsymbolic-functions -Wl$(COMMA)--dynamic-list-cpp-new -Wl$(COMMA)--dynamic-list-cpp-typeinfo) \
66 $(if $(filter ANDROID,$(OS)),-lgnustl_shared -lm)"
68 $(call gb_ExternalProject_get_state_target,icu,build) :
69 $(call gb_ExternalProject_run,build,\
70 CPPFLAGS=$(icu_CPPFLAGS) CFLAGS=$(icu_CFLAGS) \
71 CXXFLAGS=$(icu_CXXFLAGS) LDFLAGS=$(icu_LDFLAGS) \
72 ./configure \
73 --enable-layout --disable-samples \
74 $(if $(filter IOS ANDROID,$(OS)),--disable-dyload) \
75 $(if $(filter ANDROID,$(OS)),--disable-strict) \
76 $(if $(filter SOLARIS AIX,$(OS)),--disable-64bit-libs) \
77 $(if $(filter TRUE,$(DISABLE_DYNLOADING)),\
78 --enable-static --disable-shared,\
79 --disable-static --enable-shared $(if $(filter ANDROID,$(OS)),--with-library-suffix=lo)) \
80 $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)\
81 --with-cross-build=$(subst $(INPATH),$(INPATH_FOR_BUILD),$(call gb_UnpackedTarball_get_dir,icu))/source)\
82 && $(MAKE) \
83 $(if $(filter MACOSX,$(OS)),&& $(PERL) \
84 $(SOLARENV)/bin/macosx-change-install-names.pl shl OOO \
85 $(gb_Package_SOURCEDIR_icu)/source/lib/libicudata$(gb_Library_DLLEXT).$(icu_VERSION) \
86 $(gb_Package_SOURCEDIR_icu)/source/lib/libicuuc$(gb_Library_DLLEXT).$(icu_VERSION) \
87 $(gb_Package_SOURCEDIR_icu)/source/lib/libicui18n$(gb_Library_DLLEXT).$(icu_VERSION) \
88 $(gb_Package_SOURCEDIR_icu)/source/lib/libicule$(gb_Library_DLLEXT).$(icu_VERSION) \
89 $(gb_Package_SOURCEDIR_icu)/source/lib/libicutu$(gb_Library_DLLEXT).$(icu_VERSION)) \
90 ,source)
92 endif
94 # vim: set noet sw=4 ts=4: