summaryrefslogtreecommitdiffstats
path: root/solenv/gbuild/platform/android.mk
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--solenv/gbuild/platform/android.mk129
1 files changed, 129 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/android.mk b/solenv/gbuild/platform/android.mk
new file mode 100644
index 000000000..fde207ecc
--- /dev/null
+++ b/solenv/gbuild/platform/android.mk
@@ -0,0 +1,129 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+ifeq ($(DISABLE_DYNLOADING),TRUE)
+
+gb_STDLIBS := -static-libstdc++
+
+endif
+
+# No unit testing can be run
+gb_CppunitTest_CPPTESTPRECOMMAND := :
+
+# Re-define this from unxgcc.mk with some small but important
+# changes. Just temporarily done this way, shm_get promised to
+# eventually enable this to be done this in some more elegant and less
+# redundant fashion.
+
+gb_LinkTarget_LDFLAGS += \
+ -Wl,-z,defs \
+ -Wl,--as-needed \
+ -Wl,--no-add-needed
+
+define gb_LinkTarget__command_dynamiclink
+$(call gb_Helper_abbreviate_dirs,\
+ $(if $(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS),$(gb_CXX),$(gb_CC)) \
+ -shared \
+ $(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
+ $(subst \d,$$,$(RPATH)) \
+ $(T_USE_LD) $(T_LDFLAGS) \
+ $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
+ $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
+ $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
+ $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \
+ $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
+ $(foreach object,$(GENNASMOBJECTS),$(call gb_GenNasmObject_get_target,$(object))) \
+ $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),`cat $(extraobjectlist)`) \
+ -Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group \
+ $(T_LIBS) \
+ $(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))) \
+ -o $(1))
+endef
+
+ifeq ($(DISABLE_DYNLOADING),TRUE)
+
+# Library class
+
+gb_Library_DEFS :=
+gb_Library_SYSPRE := lib
+gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
+gb_Library_PLAINEXT := .a
+gb_Library_DLLEXT := .a
+gb_Library_RTEXT := gcc3$(gb_Library_PLAINEXT)
+
+gb_Library_OOOEXT := $(gb_Library_DLLPOSTFIX)$(gb_Library_PLAINEXT)
+gb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
+
+endif
+
+# Prefix UNO library filenames with "lib"
+gb_Library_FILENAMES := \
+ $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
+ $(foreach lib,$(gb_Library_PRIVATELIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
+ $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \
+ $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(gb_Library_UNOVERPRE)$(lib)$(gb_Library_PLAINEXT)) \
+
+
+ifeq ($(DISABLE_DYNLOADING),TRUE)
+
+gb_Library_FILENAMES += \
+ $(foreach lib,$(gb_Library_PLAINLIBS_OXT),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
+ $(foreach lib,$(gb_Library_EXTENSIONLIBS),$(lib):$(lib)$(gb_Library_UNOEXT)) \
+
+gb_Library_LAYER := \
+ $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):OOO) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_OXT),$(lib):OXT) \
+ $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):NONE) \
+ $(foreach lib,$(gb_Library_PRIVATELIBS_URE),$(lib):OOO) \
+ $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):OOO) \
+ $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):OOO) \
+ $(foreach lib,$(gb_Library_EXTENSIONLIBS),$(lib):OXT) \
+
+define gb_Library_Library_platform
+$(call gb_LinkTarget_get_target,$(2)) : LAYER := $(call gb_Library_get_layer,$(1))
+
+endef
+
+# CppunitTest class
+
+gb_CppunitTest_get_filename = libtest_$(1).a
+
+# No use for Cppunit targets now for Android (which would be just
+# static archives), they are just a waste of disk space.
+define gb_LinkTarget__command
+$(call gb_Output_announce,$(2),$(true),LNK,4)
+ $(call gb_Trace_StartRange,$(2),LNK)
+$(if $(filter CppunitTest,$(TARGETTYPE)), \
+ touch $(1), \
+ $(call gb_LinkTarget__command_staticlink,$(1)))
+ $(call gb_Trace_EndRange,$(2),LNK)
+endef
+
+endif
+
+# No DT_RPATH or DT_RUNPATH support in the Bionic dynamic linker so
+# don't bother generating such.
+
+define gb_Library_get_rpath
+endef
+
+define gb_Executable_get_rpath
+endef
+
+gb_LinkTarget_LDFLAGS := $(subst -Wl$(COMMA)-rpath-link$(COMMA)$(SYSBASE)/lib:$(SYSBASE)/usr/lib,,$(gb_LinkTarget_LDFLAGS))
+
+gb_Library__set_soversion_script_platform =
+
+
+# vim: set noet sw=4 ts=4: