diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-08-23 12:26:52 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-08-23 12:28:59 +0300 |
commit | c02e838ec21408cd5ba70e0e7b53309411d49db2 (patch) | |
tree | 78b234861752bd7741e77be3e80d7a4ed2833de8 /android | |
parent | Conversion from 'void*' to pointer to non-'void' requires an explicit cast (diff) | |
download | core-c02e838ec21408cd5ba70e0e7b53309411d49db2.tar.gz core-c02e838ec21408cd5ba70e0e7b53309411d49db2.zip |
Factor out the Android APP_ABI sanely instead of copy-paste galore
Change-Id: I66e97d73c410ac6f2e481ba9b2b22183f57438bd
Diffstat (limited to 'android')
-rw-r--r-- | android/Bootstrap/Makefile.shared | 12 | ||||
-rw-r--r-- | android/experimental/DocumentLoader/Makefile | 17 | ||||
-rw-r--r-- | android/experimental/LibreOffice4Android/Makefile | 8 | ||||
-rw-r--r-- | android/qa/desktop/Makefile | 8 | ||||
-rw-r--r-- | android/qa/sc/Makefile | 12 | ||||
-rw-r--r-- | android/qa/simple/Makefile | 10 |
6 files changed, 28 insertions, 39 deletions
diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared index f18c18739b31..2dd202358af1 100644 --- a/android/Bootstrap/Makefile.shared +++ b/android/Bootstrap/Makefile.shared @@ -11,14 +11,8 @@ # code are very much self-contained pre-packaged thingies. APP_DATA_PATH=/data/data/$(APP_PACKAGE) -# Adapt to both Intel and ARM architectures -ifeq ($(CPU),I) -ABI_PATH=x86 -else -ABI_PATH=armeabi-v7a -endif -SODEST=libs/$(ABI_PATH) -OBJLOCAL=obj/local/$(ABI_PATH) +SODEST=libs/$(ANDROID_APP_ABI) +OBJLOCAL=obj/local/$(ANDROID_APP_ABI) define COPYSO cp $(1) $(SODEST)$(if $(2),/$(2)) && $(STRIP) --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \ @@ -36,7 +30,7 @@ endef properties: echo sdk.dir=$(ANDROID_SDK_HOME) >local.properties echo sdk.dir=$(ANDROID_SDK_HOME) >../../Bootstrap/local.properties - echo "APP_ABI := $(ABI_PATH)" > jni/Application.mk + echo "APP_ABI := $(ANDROID_APP_ABI)" > jni/Application.mk echo "APP_PLATFORM := android-14" >> jni/Application.mk install: build-ant diff --git a/android/experimental/DocumentLoader/Makefile b/android/experimental/DocumentLoader/Makefile index 917004a23a68..804d91562ed7 100644 --- a/android/experimental/DocumentLoader/Makefile +++ b/android/experimental/DocumentLoader/Makefile @@ -16,13 +16,8 @@ APP_PACKAGE=org.libreoffice.android.examples # code are very much self-contained pre-packaged thingies. APP_DATA_PATH=/data/data/$(APP_PACKAGE) -ifeq ($(CPU),I) -ABI_PATH=x86 -else -ABI_PATH=armeabi-v7a -endif -SODEST=libs/$(ABI_PATH) -OBJLOCAL=obj/local/$(ABI_PATH) +SODEST=libs/$(ANDROID_APP_ABI) +OBJLOCAL=obj/local/$(ANDROID_APP_ABI) define COPYSO cp $(1) $(SODEST)$(if $(2),/$(2)) && $(STRIP) --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \ @@ -47,9 +42,9 @@ copy-stuff: mkdir -p $(SODEST) $(OBJLOCAL) # # Copy shared libraries (including UNO components) we need to -# libs/armeabi-v7a so that ant will include them in the .apk. +# libs/$(ANDROID_APP_ABI) so that ant will include them in the .apk. # -# Copy them to obj/local/armeabi-v7a, too, where gdb will look for +# Copy them to obj/local/$(ANDROID_APP_ABI), too, where gdb will look for # them. # for F in $(strip \ @@ -135,7 +130,7 @@ copy-stuff: done # # Then the shared GNU C++ library - $(call COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/$(ABI_PATH)/libgnustl_shared.so) + $(call COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/$(ANDROID_APP_ABI)/libgnustl_shared.so) # # Then other "assets". Let the directory structure under assets mimic # that under solver for now. @@ -235,7 +230,7 @@ copy-stuff: # Then gdbserver and gdb.setup so that we can debug with ndk-gdb. # cp $(ANDROID_NDK_GDBSERVER) $(SODEST) - echo set solib-search-path ./obj/local/$(ABI_PATH) >$(SODEST)/gdb.setup + echo set solib-search-path ./obj/local/$(ANDROID_APP_ABI) >$(SODEST)/gdb.setup build-ant: copy-stuff properties # diff --git a/android/experimental/LibreOffice4Android/Makefile b/android/experimental/LibreOffice4Android/Makefile index bb2c02eb2493..837f930b7cc2 100644 --- a/android/experimental/LibreOffice4Android/Makefile +++ b/android/experimental/LibreOffice4Android/Makefile @@ -14,9 +14,9 @@ copy-stuff: mkdir -p $(SODEST) $(OBJLOCAL) # # Copy shared libraries (including UNO components) we need to -# libs/armeabi-v7a so that ant will include them in the .apk. +# libs/$(ANDROID_APP_ABI) so that ant will include them in the .apk. # -# Copy them to obj/local/armeabi-v7a, too, where gdb will look for +# Copy them to obj/local/$(ANDROID_APP_ABI), too, where gdb will look for # them. # for F in $(strip \ @@ -114,7 +114,7 @@ copy-stuff: done # # Then the shared GNU C++ library - $(call COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/$(ABI_PATH)/libgnustl_shared.so) + $(call COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/$(ANDROID_APP_ABI)/libgnustl_shared.so) # # Then other "assets". Let the directory structure under assets mimic # that under solver for now. @@ -214,7 +214,7 @@ copy-stuff: # Then gdbserver and gdb.setup so that we can debug with ndk-gdb. # cp $(ANDROID_NDK_GDBSERVER) $(SODEST) - echo set solib-search-path ./obj/local/$(ABI_PATH) >$(SODEST)/gdb.setup + echo set solib-search-path ./obj/local/$(ANDROID_APP_ABI) >$(SODEST)/gdb.setup build-ant: copy-stuff properties echo sdk.dir=$(ANDROID_SDK_HOME) >../../abs-lib/local.properties diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile index 3c9efd7fb6be..2fbd815e3ab8 100644 --- a/android/qa/desktop/Makefile +++ b/android/qa/desktop/Makefile @@ -77,10 +77,10 @@ buildrcs: copy-stuff: buildrcs # -# Copy shared libraries we need to libs/armeabi-v7a so that ant will +# Copy shared libraries we need to libs/$(ANDROID_APP_ABI) so that ant will # include them in the .apk. # -# Copy them to obj/local/armeabi-v7a, too, where gdb will look for +# Copy them to obj/local/$(ANDROID_APP_ABI), too, where gdb will look for # them. # mkdir -p $(SODEST) $(OBJLOCAL) @@ -165,7 +165,7 @@ copy-stuff: buildrcs # # Then the shared GNU C++ library - $(call COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/$(ABI_PATH)/libgnustl_shared.so) + $(call COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/$(ANDROID_APP_ABI)/libgnustl_shared.so) # # Then other "assets" that can be left in the .apk. Let the directory # structure under assets mimic the install set - except for the fact @@ -206,7 +206,7 @@ copy-stuff: buildrcs # Then gdbserver and gdb.setup so that we can debug with ndk-gdb. # cp $(ANDROID_NDK_GDBSERVER) $(SODEST) - echo set solib-search-path ./obj/local/$(ABI_PATH) >$(SODEST)/gdb.setup + echo set solib-search-path ./obj/local/$(ANDROID_APP_ABI) >$(SODEST)/gdb.setup build-ant: copy-stuff properties diff --git a/android/qa/sc/Makefile b/android/qa/sc/Makefile index 1c70fd86e11d..91f4c484592e 100644 --- a/android/qa/sc/Makefile +++ b/android/qa/sc/Makefile @@ -11,8 +11,8 @@ BOOTSTRAP=org.libreoffice.android.Bootstrap APP_DATA_PATH=/data/data/$(APP_PACKAGE) -SODEST=libs/armeabi-v7a -OBJLOCAL=obj/local/armeabi-v7a +SODEST=libs/$(ANDROID_APP_ABI) +OBJLOCAL=obj/local/$(ANDROID_APP_ABI) define COPY cp $(1) $(SODEST)$(if $(2),/$(2)) && $(STRIP) --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \ @@ -29,10 +29,10 @@ properties: copy-stuff: # -# Copy shared libraries we need to libs/armeabi-v7a so that ant will +# Copy shared libraries we need to libs/$(ANDROID_APP_ABI) so that ant will # include them in the .apk. # -# Copy them to obj/local/armeabi-v7a, too, where gdb will look for +# Copy them to obj/local/$(ANDROID_APP_ABI), too, where gdb will look for # them. # mkdir -p $(SODEST) $(OBJLOCAL) @@ -114,7 +114,7 @@ copy-stuff: done # # Then the shared GNU C++ library - $(call COPY,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libgnustl_shared.so) + $(call COPY,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/$(ANDROID_APP_ABI)/libgnustl_shared.so) # # Then other "assets" that can be left in the .apk. Let the directory # structure under assets mimic that under solver or workdir for now. @@ -151,7 +151,7 @@ copy-stuff: # # Then gdbserver and gdb.setup so that we can debug with ndk-gdb. cp $(ANDROID_NDK_HOME)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/gdbserver $(SODEST) - echo set solib-search-path ./obj/local/armeabi-v7a >$(SODEST)/gdb.setup + echo set solib-search-path ./obj/local/$(ANDROID_APP_ABI) >$(SODEST)/gdb.setup build-ant: copy-stuff properties diff --git a/android/qa/simple/Makefile b/android/qa/simple/Makefile index fad773092516..fa97425c1104 100644 --- a/android/qa/simple/Makefile +++ b/android/qa/simple/Makefile @@ -14,8 +14,8 @@ BOOTSTRAP=org.libreoffice.android.Bootstrap APP_DATA_PATH=/data/data/$(APP_PACKAGE) -SODEST=libs/armeabi-v7a -OBJLOCAL=obj/local/armeabi-v7a +SODEST=libs/$(ANDROID_APP_ABI) +OBJLOCAL=obj/local/$(ANDROID_APP_ABI) define COPY cp $(1) $(SODEST)$(if $(2),/$(2)) && $(STRIP) --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \ @@ -28,10 +28,10 @@ all: build-ant copy-stuff: # -# Copy shared libraries we need to libs/armeabi-v7a so that ant will +# Copy shared libraries we need to libs/$(ANDROID_APP_ABI) so that ant will # include them in the .apk. # -# Copy them to obj/local/armeabi-v7a, too, where gdb will look for +# Copy them to obj/local/$(ANDROID_APP_ABI), too, where gdb will look for # them. # mkdir -p $(SODEST) $(OBJLOCAL) @@ -87,7 +87,7 @@ copy-stuff: done # # Then the shared GNU C++ library - $(call COPY,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libgnustl_shared.so) + $(call COPY,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/$(ANDROID_APP_ABI)/libgnustl_shared.so) # # bridgetest components, not in solver for F in bridgetest constructors cppobj; do \ |