summaryrefslogtreecommitdiff
path: root/android/qa
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2012-08-03 16:39:20 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-08-03 16:41:42 +0100
commite61e51ab96263072df21519c50adb38c4996405c (patch)
treec81aa96e3a02a81326c4d23de2b15669b87632c3 /android/qa
parent7b75535e2891ff55f3c51f97f7dcb108f938e122 (diff)
android: share more common Makefile pieces between a couple of users
Try to start consolidating the complexity here. generate Application.mk to specify the required ABI fold common distro-config pieces out of README
Diffstat (limited to 'android/qa')
-rw-r--r--android/qa/desktop/Makefile46
-rw-r--r--android/qa/desktop/jni/Application.mk2
2 files changed, 7 insertions, 41 deletions
diff --git a/android/qa/desktop/Makefile b/android/qa/desktop/Makefile
index 9630445f4a87..ca4ddc6fd68a 100644
--- a/android/qa/desktop/Makefile
+++ b/android/qa/desktop/Makefile
@@ -2,6 +2,7 @@
# 'lo_main' from
include ../../../config_host.mk
+include ../../Bootstrap/Makefile.shared
# The package of this app
APP_PACKAGE=org.libreoffice.android.libo
@@ -9,32 +10,10 @@ APP_PACKAGE=org.libreoffice.android.libo
# The name of the Bootstrap activity class
BOOTSTRAP=org.libreoffice.android.Bootstrap
-# The full path the the app's directory needs to be supplied in a
-# couple of places, unfortunately.
-
-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)
-
-define COPY
-cp $(1) $(SODEST)$(if $(2),/$(2)) && $(STRIP) --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \
-cp $(1) $(OBJLOCAL)$(if $(2),/$(2))
-endef
-
# The default target just builds.
all: build-ant
-properties:
- echo sdk.dir=$(ANDROID_SDK_HOME) >local.properties
- echo sdk.dir=$(ANDROID_SDK_HOME) >../../Bootstrap/local.properties
-
buildrcs:
# main sofficerc ini ...
mkdir -p assets/program/
@@ -53,7 +32,7 @@ buildrcs:
echo "LO_LIB_DIR=file://$(APP_DATA_PATH)/lib/" >> assets/program/fundamentalrc
echo "URE_LIB_DIR=file://$(APP_DATA_PATH)/lib/" >> assets/program/fundamentalrc # checkme - is this used to find configs ?
echo "BRAND_BASE_DIR=file:///assets" >> assets/program/fundamentalrc
- echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry module:$${BRAND_BASE_DIR}/share/registry/modules res:$${BRAND_BASE_DIR}/share/registry user:$${$$BRAND_BASE_DIR/program/bootstraprc:UserInstallation}/user/registrymodifications.xcu' >> assets/program/fundamentalrc
+ echo 'CONFIGURATION_LAYERS=xcsxcu:$${BRAND_BASE_DIR}/share/registry module:$${BRAND_BASE_DIR}/share/registry/modules res:$${BRAND_BASE_DIR}/share/registry' >> assets/program/fundamentalrc
echo 'URE_BIN_DIR=file:///assets/ure/bin/dir/not-here/can-we/exec-anyway' >> assets/program/fundamentalrc
echo 'URE_MORE_TYPES=file:///assets/ure/share/misc/types.rdb file:///assets/program/types/types.rdb' >> assets/program/fundamentalrc
echo 'URE_MORE_SERVICES= <$$BRAND_BASE_DIR/program/services>*' >> assets/program/fundamentalrc
@@ -193,12 +172,12 @@ copy-stuff: buildrcs
chartmodello \
charttoolslo \
); do \
- $(call COPY,$(OUTDIR)/lib/lib$${F}.so); \
+ $(call COPYSO,$(OUTDIR)/lib/lib$${F}.so); \
done
#
# Then the shared GNU C++ library
- $(call COPY,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/$(ABI_PATH)/libgnustl_shared.so)
+ $(call COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/$(ABI_PATH)/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
@@ -238,28 +217,18 @@ copy-stuff: buildrcs
#
# 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)
+ cp $(ANDROID_NDK_GDBSERVER) $(SODEST)
echo set solib-search-path ./obj/local/$(ABI_PATH) >$(SODEST)/gdb.setup
build-ant: copy-stuff properties
unset JAVA_HOME && $(ANT) debug
-install: copy-stuff properties
- $(ANDROID_SDK_HOME)/platform-tools/adb shell rm -r $(APP_DATA_PATH)
- unset JAVA_HOME && $(ANT) debug install
- @echo
- @echo 'Run it with "make run"'
- @echo
-
-uninstall:
- $(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
-
run:
echo "-env:INIFILENAME=file:///assets/program/sofficerc" > cmdline
# echo "file:///assets/demo/writer.odt" > cmdline
$(ANDROID_SDK_HOME)/platform-tools/adb push cmdline $(APP_DATA_PATH)/cmdline
- $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-strace yes -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
+ $(ANDROID_SDK_HOME)/platform-tools/adb shell am start -n $(APP_PACKAGE)/$(BOOTSTRAP) -e lo-main-delay 20 -e lo-main-indirect-cmdline "$(APP_DATA_PATH)/cmdline"
# add -e lo-strace yes # if you want that
# If you reinstall an app several times, even if you uninstall it
@@ -268,7 +237,4 @@ run:
stop-start-cycle:
$(ANDROID_SDK_HOME)/platform-tools/adb shell stop && $(ANDROID_SDK_HOME)/platform-tools/adb shell start && sleep 10
-clean: properties
- $(ANT) clean
- rm -rf assets $(SODEST) $(OBJLOCAL)
diff --git a/android/qa/desktop/jni/Application.mk b/android/qa/desktop/jni/Application.mk
index a11b28debc0c..9b408d093282 100644
--- a/android/qa/desktop/jni/Application.mk
+++ b/android/qa/desktop/jni/Application.mk
@@ -1,2 +1,2 @@
-APP_ABI := armeabi-v7a
+APP_ABI := x86
APP_PLATFORM := android-14