bump product version to 4.1.6.2
[LibreOffice.git] / solenv / gbuild / platform / android.mk
blob8f2685609cf27d1c9191d34666b7f4db8f1147a5
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 ifeq ($(DISABLE_DYNLOADING),TRUE)
11 # Link with -lgnustl_static
12 gb_STDLIBS := \
13 -lgnustl_static \
14 -lm
16 else
17 # Link almost everything with -lgnustl_shared
18 gb_STDLIBS := \
19 -lgnustl_shared \
21 endif
23 # No unit testing can be run
24 gb_CppunitTest_CPPTESTPRECOMMAND := :
26 # Re-define this from unxgcc.mk with some small but important
27 # changes. Just temporarily done this way, shm_get promised to
28 # eventually enable this to be done this in some more elegant and less
29 # redundant fashion.
31 gb_LinkTarget_LDFLAGS += \
32 -Wl,-z,defs \
33 -Wl,--as-needed \
34 -Wl,--no-add-needed
36 define gb_LinkTarget__command_dynamiclink
37 $(call gb_Helper_abbreviate_dirs,\
38 mkdir -p $(dir $(1)) && \
39 $(if $(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS),$(gb_CXX),$(gb_CC)) \
40 -shared \
41 $(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
42 $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
43 $(subst \d,$$,$(RPATH)) \
44 $(T_LDFLAGS) \
45 $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
46 $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
47 $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
48 $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \
49 $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
50 $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),`cat $(extraobjectlist)`) \
51 -Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group \
52 $(LIBS) \
53 $(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))) \
54 -o $(1))
55 endef
57 ifeq ($(DISABLE_DYNLOADING),TRUE)
59 # Library class
61 gb_Library_DEFS :=
62 gb_Library_SYSPRE := lib
63 gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
64 gb_Library_PLAINEXT := .a
65 gb_Library_DLLEXT := .a
66 gb_Library_RTEXT := gcc3$(gb_Library_PLAINEXT)
68 gb_Library_OOOEXT := $(gb_Library_DLLPOSTFIX)$(gb_Library_PLAINEXT)
69 gb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
71 endif
73 # Prefix UNO library filenames with "lib"
74 gb_Library_FILENAMES := \
75 $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
76 $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
77 $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
78 $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
79 $(foreach lib,$(gb_Library_PRIVATELIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
80 $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \
81 $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_UNOEXT)) \
82 $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(gb_Library_UNOVERPRE)$(lib)$(gb_Library_PLAINEXT)) \
85 ifeq ($(DISABLE_DYNLOADING),TRUE)
87 gb_Library_FILENAMES += \
88 $(foreach lib,$(gb_Library_EXTENSIONLIBS),$(lib):$(lib)$(gb_Library_UNOEXT)) \
90 gb_Library_LAYER := \
91 $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
92 $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \
93 $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \
94 $(foreach lib,$(gb_Library_PRIVATELIBS_URE),$(lib):OOO) \
95 $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \
96 $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):OOO) \
97 $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \
98 $(foreach lib,$(gb_Library_EXTENSIONLIBS),$(lib):OXT) \
100 define gb_Library_Library_platform
101 $(call gb_LinkTarget_get_target,$(2)) : LAYER := $(call gb_Library_get_layer,$(1))
103 endef
105 # CppunitTest class
107 gb_CppunitTest_EXT := .a
109 # No use for Cppunit targets now for Android (which would be just
110 # static archives), they are just a waste of disk space.
111 define gb_LinkTarget__command
112 $(call gb_Output_announce,$(2),$(true),LNK,4)
113 $(if $(filter CppunitTest,$(TARGETTYPE)), \
114 mkdir -p $(dir $(1)) && touch $(1), \
115 $(call gb_LinkTarget__command_staticlink,$(1)))
116 endef
118 endif
120 # No DT_RPATH or DT_RUNPATH support in the Bionic dynamic linker so
121 # don't bother generating such.
123 define gb_Library_get_rpath
124 endef
126 define gb_Executable_get_rpath
127 endef
129 gb_LinkTarget_LDFLAGS := $(subst -Wl$(COMMA)-rpath-link$(COMMA)$(SYSBASE)/lib:$(SYSBASE)/usr/lib,,$(gb_LinkTarget_LDFLAGS))
131 gb_Library__set_soversion_script_platform =
134 # vim: set noet sw=4 ts=4: