Android build tweaks.
Add make install target for android builds. Remove standard install targets as they don't apply. Add java compilation dependancy on generated resource class(es?) to prevent weird runtime issues. Update installApk.sh script to use correct tool location in recent sdks. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29131 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9b02ce9e49
commit
a448d8bac7
3 changed files with 13 additions and 1 deletions
|
@ -31,6 +31,7 @@ DX=$(ANDROID_PLATFORM)/tools/dx
|
|||
APKBUILDER=$(ANDROID_SDK_PATH)/tools/apkbuilder
|
||||
ZIPALIGN=$(ANDROID_SDK_PATH)/tools/zipalign
|
||||
KEYSTORE=$(HOME)/.android/debug.keystore
|
||||
ADB=$(ANDROID_SDK_PATH)/platform-tools/adb
|
||||
|
||||
MANIFEST := $(ANDROID_DIR)/AndroidManifest.xml
|
||||
|
||||
|
@ -69,7 +70,7 @@ $(BUILDDIR)/bin/$(PACKAGE_PATH)/R.class: $(R_JAVA)
|
|||
-classpath $(ANDROID_PLATFORM)/android.jar:$(BUILDDIR)/bin \
|
||||
-sourcepath $(ANDROID_DIR)/gen:$(ANDROID_DIR)/src $<
|
||||
|
||||
$(BUILDDIR)/bin/$(PACKAGE_PATH)/%.class: $(ANDROID_DIR)/src/$(PACKAGE_PATH)/%.java
|
||||
$(BUILDDIR)/bin/$(PACKAGE_PATH)/%.class: $(ANDROID_DIR)/src/$(PACKAGE_PATH)/%.java $(BUILDDIR)/bin/$(PACKAGE_PATH)/R.class
|
||||
$(call PRINTS,JAVAC $(subst $(ROOTDIR)/,,$<))javac -d $(BUILDDIR)/bin \
|
||||
-classpath $(ANDROID_PLATFORM)/android.jar:$(BUILDDIR)/bin \
|
||||
-sourcepath $(ANDROID_DIR)/gen:$(ANDROID_DIR)/src $<
|
||||
|
@ -112,3 +113,7 @@ $(DIRS):
|
|||
dirs: $(DIRS)
|
||||
|
||||
apk: $(APK)
|
||||
|
||||
install: apk
|
||||
$(ADB) install -r $(APK)
|
||||
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
#!/bin/sh
|
||||
ADB="$ANDROID_SDK_PATH/tools/adb"
|
||||
if [ ! -e $ADB ]
|
||||
then
|
||||
# Starting with the gingerbread sdk, the adb location changed
|
||||
ADB="$ANDROID_SDK_PATH/platform-tools/adb"
|
||||
fi
|
||||
|
||||
$ADB install -r rockbox.apk
|
||||
echo 'am start -a android.intent.action.MAIN -n org.rockbox/.RockboxActivity; exit' | $ADB shell
|
||||
|
|
|
@ -295,6 +295,7 @@ voice: voicetools $(BUILDDIR)/apps/features
|
|||
|
||||
endif
|
||||
|
||||
ifeq (,$(findstring android, $(APP_TYPE)))
|
||||
bininstall: $(BUILDDIR)/$(BINARY)
|
||||
@echo "Installing your rockbox binary in your '$(RBPREFIX)' dir"
|
||||
$(SILENT)cp $(BINARY) "$(RBPREFIX)/.rockbox/"
|
||||
|
@ -310,6 +311,7 @@ fullinstall:
|
|||
symlinkinstall:
|
||||
@echo "Installing a full setup with links in your '$(RBPREFIX)' dir"
|
||||
$(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -m "$(MODELNAME)" -i "$(TARGET_ID)" $(INSTALL) -z "zip -r0" -r "$(ROOTDIR)" --rbdir="$(RBDIR)" -f 2 $(TARGET) $(BINARY) -l
|
||||
endif
|
||||
|
||||
help:
|
||||
@echo "A few helpful make targets"
|
||||
|
|
Loading…
Reference in a new issue