summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2013-12-19 15:32:54 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2013-12-20 13:00:24 +0100
commita17c0950c04693411cc7e46a21c65d45216d8c52 (patch)
treee2fb876605ea219ef0177126be7fc564821b845e /android
parent57a80a49ce3726a096a26f49a8e0b7c4f689da54 (diff)
Add tool to generate native-code.cxx for Android.
Should be extended to be helpfull for iOS too. Change-Id: I862731b6386d5f9cbb508e0c138f45fbe1cb3f46
Diffstat (limited to 'android')
-rw-r--r--android/.gitignore3
-rw-r--r--android/experimental/DocumentLoader/Makefile6
-rw-r--r--android/experimental/DocumentLoader/native-code.cxx45
-rw-r--r--android/experimental/LibreOffice4Android/Makefile5
-rw-r--r--android/experimental/LibreOffice4Android/native-code.cxx51
-rw-r--r--android/experimental/desktop/Makefile6
-rw-r--r--android/experimental/desktop/native-code.cxx64
7 files changed, 19 insertions, 161 deletions
diff --git a/android/.gitignore b/android/.gitignore
index 9034b9895557..dca2c57fff27 100644
--- a/android/.gitignore
+++ b/android/.gitignore
@@ -3,4 +3,5 @@ bin
gen
libs
obj
-local.properties \ No newline at end of file
+local.properties
+native-code.cxx
diff --git a/android/experimental/DocumentLoader/Makefile b/android/experimental/DocumentLoader/Makefile
index 49b28959fa7d..5295c8086bcd 100644
--- a/android/experimental/DocumentLoader/Makefile
+++ b/android/experimental/DocumentLoader/Makefile
@@ -11,6 +11,12 @@ APP_PACKAGE=org.libreoffice.android.examples
BOOTSTRAPDIR=../../Bootstrap
include $(BOOTSTRAPDIR)/Makefile.shared
+native-code.cxx: $(SRCDIR)/solenv/bin/native-code.py
+ $< \
+ -f EXTENDED_CORE -f BASE_CORE -f CALC_CORE -f DRAW_CORE -f MATH -f WRITER \
+ -s protocolhandler -s sb \
+ > $@
+
copy-stuff:
# Then "assets". Let the directory structure under assets mimic
# that under solver for now.
diff --git a/android/experimental/DocumentLoader/native-code.cxx b/android/experimental/DocumentLoader/native-code.cxx
deleted file mode 100644
index 7cba3773f5e8..000000000000
--- a/android/experimental/DocumentLoader/native-code.cxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/.
- */
-
-#include "osl/detail/android-bootstrap.h"
-
-extern "C"
-__attribute__ ((visibility("default")))
-const lib_to_factory_mapping *
-lo_get_factory_map(void)
-{
- static lib_to_factory_mapping map[] = {
- LO_EXTENDED_CORE_FACTORY_MAP
- LO_BASE_CORE_FACTORY_MAP
- LO_CALC_CORE_FACTORY_MAP
- LO_DRAW_CORE_FACTORY_MAP
- LO_MATH_FACTORY_MAP
- LO_WRITER_FACTORY_MAP
- { "libprotocolhandlerlo.a", protocolhandler_component_getFactory },
- { "libsblo.a", sb_component_getFactory },
- { NULL, NULL }
- };
-
- return map;
-}
-
-extern "C"
-__attribute__ ((visibility("default")))
-const lib_to_constructor_mapping *
-lo_get_constructor_map(void)
-{
- static lib_to_constructor_mapping map[] = {
- NON_APP_SPECIFIC_CONSTRUCTOR_MAP
- { NULL, NULL }
- };
-
- return map;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/experimental/LibreOffice4Android/Makefile b/android/experimental/LibreOffice4Android/Makefile
index 9f8dccea0857..92f0668b906e 100644
--- a/android/experimental/LibreOffice4Android/Makefile
+++ b/android/experimental/LibreOffice4Android/Makefile
@@ -12,6 +12,11 @@ APP_PACKAGE=org.libreoffice
BOOTSTRAPDIR=../../Bootstrap
include $(BOOTSTRAPDIR)/Makefile.shared
+native-code.cxx: $(SRCDIR)/solenv/bin/native-code.py
+ $< -f EXTENDED_CORE -f BASE_CORE -f CALC_CORE -f DRAW_CORE -f MATH -f WRITER \
+ -s dlgprov -s protocolhandler -s scriptframe -s sb -s stringresource -s vbaswobj -s vbaevents \
+ > $@
+
copy-stuff:
# Then "assets". Let the directory structure under assets mimic
# that under solver for now.
diff --git a/android/experimental/LibreOffice4Android/native-code.cxx b/android/experimental/LibreOffice4Android/native-code.cxx
deleted file mode 100644
index 44cb862da480..000000000000
--- a/android/experimental/LibreOffice4Android/native-code.cxx
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/.
- */
-
-#include "osl/detail/android-bootstrap.h"
-
-extern "C"
-__attribute__ ((visibility("default")))
-const lib_to_factory_mapping *
-lo_get_factory_map(void)
-{
- static lib_to_factory_mapping map[] = {
- LO_EXTENDED_CORE_FACTORY_MAP
- LO_BASE_CORE_FACTORY_MAP
- LO_CALC_CORE_FACTORY_MAP
- LO_DRAW_CORE_FACTORY_MAP
- LO_MATH_FACTORY_MAP
- LO_WRITER_FACTORY_MAP
- { "libdlgprovlo.a", dlgprov_component_getFactory },
- { "libprotocolhandlerlo.a", protocolhandler_component_getFactory },
- { "libscriptframe.a", scriptframe_component_getFactory },
- { "libsblo.a", sb_component_getFactory },
- { "libscriptframe.a", scriptframe_component_getFactory },
- { "libstringresource.uno.a", stringresource_component_getFactory },
- { "libvbaswobj.uno.a", vbaswobj_component_getFactory },
- { "libvbaevents.uno.a", vbaevents_component_getFactory },
- { NULL, NULL }
- };
-
- return map;
-}
-
-extern "C"
-__attribute__ ((visibility("default")))
-const lib_to_constructor_mapping *
-lo_get_constructor_map(void)
-{
- static lib_to_constructor_mapping map[] = {
- NON_APP_SPECIFIC_CONSTRUCTOR_MAP
- { NULL, NULL }
- };
-
- return map;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/android/experimental/desktop/Makefile b/android/experimental/desktop/Makefile
index 145a9fbebe2f..610bf874e1f8 100644
--- a/android/experimental/desktop/Makefile
+++ b/android/experimental/desktop/Makefile
@@ -11,6 +11,12 @@ APP_PACKAGE=org.libreoffice.experimental.desktop
BOOTSTRAPDIR=../../Bootstrap
include $(BOOTSTRAPDIR)/Makefile.shared
+native-code.cxx: $(SRCDIR)/solenv/bin/native-code.py
+ $< -j \
+ -f EXTENDED_CORE -f BASE_CORE -f CALC_CORE -f DRAW_CORE -f MATH -f WRITER \
+ -s basprov -s dlgprov -s cui -s protocolhandler -s scriptframe -s sb -s spl -s stringresource -s uui -s vbaswobj -s vbaevents \
+ > $@
+
# The name of the Bootstrap activity class
BOOTSTRAP=org.libreoffice.android.Bootstrap
diff --git a/android/experimental/desktop/native-code.cxx b/android/experimental/desktop/native-code.cxx
deleted file mode 100644
index 6b8deab7d4c6..000000000000
--- a/android/experimental/desktop/native-code.cxx
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * 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/.
- */
-
-#include "osl/detail/android-bootstrap.h"
-
-extern "C"
-__attribute__ ((visibility("default")))
-const lib_to_factory_mapping *
-lo_get_factory_map(void)
-{
- static lib_to_factory_mapping map[] = {
- LO_EXTENDED_CORE_FACTORY_MAP
- LO_BASE_CORE_FACTORY_MAP
- LO_CALC_CORE_FACTORY_MAP
- LO_DRAW_CORE_FACTORY_MAP
- LO_MATH_FACTORY_MAP
- LO_WRITER_FACTORY_MAP
- { "libbasprovlo.a", basprov_component_getFactory },
- { "libdlgprovlo.a", dlgprov_component_getFactory },
- { "libcuilo.a", cui_component_getFactory },
- { "libprotocolhandlerlo.a", protocolhandler_component_getFactory },
- { "libscriptframe.a", scriptframe_component_getFactory },
- { "libsblo.a", sb_component_getFactory },
- { "libspllo.a", spl_component_getFactory },
- { "libscriptframe.a", scriptframe_component_getFactory },
- { "libstringresourcelo.a", stringresource_component_getFactory },
- { "libuuilo.a", uui_component_getFactory },
- { "libvbaswobjlo.a", vbaswobj_component_getFactory },
- { "libvbaeventslo.a", vbaevents_component_getFactory },
- { NULL, NULL }
- };
-
- // Guard against possible function-level link-time pruning of
- // "unused" code. We need to pull these in, too, as they aren't in
- // any of the libs we link with -Wl,--whole-archive. Is this necessary?
- extern void Java_org_libreoffice_android_AppSupport_runMain();
- volatile void *p = (void *) Java_org_libreoffice_android_AppSupport_runMain;
-
- extern void Java_org_libreoffice_android_AppSupport_renderVCL();
- p = (void *) Java_org_libreoffice_android_AppSupport_renderVCL;
-
- return map;
-}
-
-extern "C"
-__attribute__ ((visibility("default")))
-const lib_to_constructor_mapping *
-lo_get_constructor_map(void)
-{
- static lib_to_constructor_mapping map[] = {
- NON_APP_SPECIFIC_CONSTRUCTOR_MAP
- { NULL, NULL }
- };
-
- return map;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */