diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2013-12-19 15:32:54 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2013-12-20 13:00:24 +0100 |
commit | a17c0950c04693411cc7e46a21c65d45216d8c52 (patch) | |
tree | e2fb876605ea219ef0177126be7fc564821b845e /android/experimental | |
parent | 57a80a49ce3726a096a26f49a8e0b7c4f689da54 (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/experimental')
-rw-r--r-- | android/experimental/DocumentLoader/Makefile | 6 | ||||
-rw-r--r-- | android/experimental/DocumentLoader/native-code.cxx | 45 | ||||
-rw-r--r-- | android/experimental/LibreOffice4Android/Makefile | 5 | ||||
-rw-r--r-- | android/experimental/LibreOffice4Android/native-code.cxx | 51 | ||||
-rw-r--r-- | android/experimental/desktop/Makefile | 6 | ||||
-rw-r--r-- | android/experimental/desktop/native-code.cxx | 64 |
6 files changed, 17 insertions, 160 deletions
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: */ |