Build separate arm+x86 android APKs.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4559 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
6db1a097aa
commit
43d1f34fa3
62
Makefile
62
Makefile
@ -67,7 +67,7 @@ BUILD_TYPES += \
|
|||||||
androidrelease-x86 \
|
androidrelease-x86 \
|
||||||
androiddebug-x86_64 \
|
androiddebug-x86_64 \
|
||||||
androidrelease-x86_64
|
androidrelease-x86_64
|
||||||
all: out/TildeFriends-debug.apk out/TildeFriends-release.apk
|
all: out/TildeFriends-arm-debug.apk out/TildeFriends-arm-release.apk out/TildeFriends-x86-debug.apk out/TildeFriends-x86-release.apk
|
||||||
endif
|
endif
|
||||||
|
|
||||||
WINDOWS_TARGETS := \
|
WINDOWS_TARGETS := \
|
||||||
@ -649,39 +649,51 @@ PACKAGE_DIRS := \
|
|||||||
|
|
||||||
RAW_FILES := $(filter-out apps/gg% apps/welcome%, $(shell find $(PACKAGE_DIRS) -type f))
|
RAW_FILES := $(filter-out apps/gg% apps/welcome%, $(shell find $(PACKAGE_DIRS) -type f))
|
||||||
|
|
||||||
out/apk/TildeFriends-debug.unsigned.apk: BUILD_TYPE := debug
|
out/apk/TildeFriends-arm-debug.unsigned.apk: BUILD_TYPE := debug
|
||||||
out/apk/TildeFriends-release.unsigned.apk: BUILD_TYPE := release
|
out/apk/TildeFriends-arm-release.unsigned.apk: BUILD_TYPE := release
|
||||||
|
out/apk/TildeFriends-x86-debug.unsigned.apk: BUILD_TYPE := debug
|
||||||
|
out/apk/TildeFriends-x86-release.unsigned.apk: BUILD_TYPE := release
|
||||||
|
|
||||||
out/apk/TildeFriends-debug.unsigned.apk: out/apk/classes.dex out/androiddebug/tildefriends out/androiddebug-x86_64/tildefriends out/androiddebug-x86/tildefriends out/androiddebug-armv7a/tildefriends $(RAW_FILES) out/apk/res.apk
|
out/apk/TildeFriends-arm-debug.unsigned.apk: out/apk/classes.dex out/androiddebug/tildefriends out/androiddebug-armv7a/tildefriends $(RAW_FILES) out/apk/res.apk
|
||||||
out/apk/TildeFriends-release.unsigned.apk: out/apk/classes.dex out/androidrelease/tildefriends out/androidrelease-x86_64/tildefriends out/androidrelease-x86/tildefriends out/androidrelease-armv7a/tildefriends $(RAW_FILES) out/apk/res.apk
|
out/apk/TildeFriends-arm-release.unsigned.apk: out/apk/classes.dex out/androidrelease/tildefriends out/androidrelease-armv7a/tildefriends $(RAW_FILES) out/apk/res.apk
|
||||||
|
out/apk/TildeFriends-x86-debug.unsigned.apk: out/apk/classes.dex out/androiddebug-x86_64/tildefriends out/androiddebug-x86/tildefriends $(RAW_FILES) out/apk/res.apk
|
||||||
|
out/apk/TildeFriends-x86-release.unsigned.apk: out/apk/classes.dex out/androidrelease-x86_64/tildefriends out/androidrelease-x86/tildefriends $(RAW_FILES) out/apk/res.apk
|
||||||
|
|
||||||
out/%.unsigned.apk:
|
out/apk/TildeFriends-arm-%.unsigned.apk:
|
||||||
@mkdir -p $(dir $@) out/apk$(BUILD_TYPE)/bin/arm64-v8a/ out/apk$(BUILD_TYPE)/bin/x86_64/ out/apk$(BUILD_TYPE)/bin/i686/ out/apk$(BUILD_TYPE)/bin/armeabi-v7a/
|
@mkdir -p $(dir $@) out/apk-arm-$(BUILD_TYPE)/bin/arm64-v8a/ out/apk-arm-$(BUILD_TYPE)/bin/armeabi-v7a/
|
||||||
@echo [aapt] $@
|
@echo [aapt] $@
|
||||||
@cp out/android$(BUILD_TYPE)/tildefriends out/apk$(BUILD_TYPE)/bin/arm64-v8a/
|
@cp out/android$(BUILD_TYPE)/tildefriends out/apk-arm-$(BUILD_TYPE)/bin/arm64-v8a/
|
||||||
@cp out/android$(BUILD_TYPE)-x86_64/tildefriends out/apk$(BUILD_TYPE)/bin/x86_64/
|
@cp out/android$(BUILD_TYPE)-armv7a/tildefriends out/apk-arm-$(BUILD_TYPE)/bin/armeabi-v7a/
|
||||||
#@cp out/android$(BUILD_TYPE)-x86/tildefriends out/apk$(BUILD_TYPE)/bin/i686/
|
@$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip out/apk-arm-$(BUILD_TYPE)/bin/arm64-v8a/tildefriends
|
||||||
#@cp out/android$(BUILD_TYPE)-armv7a/tildefriends out/apk$(BUILD_TYPE)/bin/armeabi-v7a/
|
@$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip out/apk-arm-$(BUILD_TYPE)/bin/armeabi-v7a/tildefriends
|
||||||
@$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip out/apk$(BUILD_TYPE)/bin/arm64-v8a/tildefriends
|
|
||||||
@$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip out/apk$(BUILD_TYPE)/bin/x86_64/tildefriends
|
|
||||||
#@$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip out/apk$(BUILD_TYPE)/bin/armeabi-v7a/tildefriends
|
|
||||||
#@$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip out/apk$(BUILD_TYPE)/bin/i686/tildefriends
|
|
||||||
@cp out/apk/res.apk $@
|
@cp out/apk/res.apk $@
|
||||||
@cp out/apk/classes.dex out/apk$(BUILD_TYPE)/
|
@cp out/apk/classes.dex out/apk-arm-$(BUILD_TYPE)/
|
||||||
@cd out/apk$(BUILD_TYPE) && zip -u ../../$@ -q -9 -r . && cd ../../
|
@cd out/apk-arm-$(BUILD_TYPE) && zip -u ../../$@ -q -9 -r . && cd ../../
|
||||||
|
@zip -u $@ -q -9 -x '*.map' --exclude=apps/gg* --exclude=apps/welcome* -r $(PACKAGE_DIRS) $(RAW_FILES)
|
||||||
|
|
||||||
|
out/apk/TildeFriends-x86-%.unsigned.apk:
|
||||||
|
@mkdir -p $(dir $@) out/apk-x86-$(BUILD_TYPE)/bin/x86_64/ out/apk-x86-$(BUILD_TYPE)/bin/x86/
|
||||||
|
@echo [aapt] $@
|
||||||
|
@cp out/android$(BUILD_TYPE)-x86_64/tildefriends out/apk-x86-$(BUILD_TYPE)/bin/x86_64/
|
||||||
|
@cp out/android$(BUILD_TYPE)-x86/tildefriends out/apk-x86-$(BUILD_TYPE)/bin/x86/
|
||||||
|
@$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip out/apk-x86-$(BUILD_TYPE)/bin/x86_64/tildefriends
|
||||||
|
@$(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-strip out/apk-x86-$(BUILD_TYPE)/bin/x86/tildefriends
|
||||||
|
@cp out/apk/res.apk $@
|
||||||
|
@cp out/apk/classes.dex out/apk-x86-$(BUILD_TYPE)/
|
||||||
|
@cd out/apk-x86-$(BUILD_TYPE) && zip -u ../../$@ -q -9 -r . && cd ../../
|
||||||
@zip -u $@ -q -9 -x '*.map' --exclude=apps/gg* --exclude=apps/welcome* -r $(PACKAGE_DIRS) $(RAW_FILES)
|
@zip -u $@ -q -9 -x '*.map' --exclude=apps/gg* --exclude=apps/welcome* -r $(PACKAGE_DIRS) $(RAW_FILES)
|
||||||
|
|
||||||
out/%.apk: out/apk/%.unsigned.apk
|
out/%.apk: out/apk/%.unsigned.apk
|
||||||
@echo [apksigner] $(notdir $@)
|
@echo [apksigner] $(notdir $@)
|
||||||
@$(ANDROID_BUILD_TOOLS)/apksigner sign --ks .keys/android.jks --ks-key-alias androidKey --ks-pass pass:android --key-pass pass:android --out $@ $<
|
@$(ANDROID_BUILD_TOOLS)/apksigner sign --ks .keys/android.jks --ks-key-alias androidKey --ks-pass pass:android --key-pass pass:android --out $@ $<
|
||||||
|
|
||||||
apk: out/TildeFriends-release.apk
|
release-apk: out/TildeFriends-arm-release.apk out/TildeFriends-x86-release.apk
|
||||||
.PHONY: apk
|
.PHONY: release-apk
|
||||||
|
|
||||||
apkgo: out/TildeFriends-release.apk
|
releaseapkgo: out/TildeFriends-arm-release.apk
|
||||||
@adb install $<
|
@adb install $<
|
||||||
@adb shell am start com.unprompted.tildefriends/.MainActivity
|
@adb shell am start com.unprompted.tildefriends/.MainActivity
|
||||||
.PHONY: apkgo
|
.PHONY: releaseapkgo
|
||||||
|
|
||||||
# iOS Support
|
# iOS Support
|
||||||
out/%.app/Info.plist: src/ios/Info.plist
|
out/%.app/Info.plist: src/ios/Info.plist
|
||||||
@ -734,7 +746,7 @@ clean:
|
|||||||
rm -rf $(BUILD_DIR)
|
rm -rf $(BUILD_DIR)
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
dist: apk iosrelease-ipa
|
dist: release-apk iosrelease-ipa
|
||||||
@echo "[export] $$(svn info --show-item url)"
|
@echo "[export] $$(svn info --show-item url)"
|
||||||
@rm -rf tildefriends-$(VERSION_NUMBER)
|
@rm -rf tildefriends-$(VERSION_NUMBER)
|
||||||
@svn export -q . tildefriends-$(VERSION_NUMBER)
|
@svn export -q . tildefriends-$(VERSION_NUMBER)
|
||||||
@ -758,8 +770,10 @@ dist: apk iosrelease-ipa
|
|||||||
--exclude=deps/zlib/doc \
|
--exclude=deps/zlib/doc \
|
||||||
-caf tildefriends-$(VERSION_NUMBER).tar.xz tildefriends-$(VERSION_NUMBER)
|
-caf tildefriends-$(VERSION_NUMBER).tar.xz tildefriends-$(VERSION_NUMBER)
|
||||||
@rm -rf tildefriends-$(VERSION_NUMBER)
|
@rm -rf tildefriends-$(VERSION_NUMBER)
|
||||||
@echo "[cp] TildeFriends-$(VERSION_NUMBER).apk"
|
@echo "[cp] TildeFriends-x86-$(VERSION_NUMBER).apk"
|
||||||
@cp out/TildeFriends-release.apk TildeFriends-$(VERSION_NUMBER).apk
|
@cp out/TildeFriends-x86-release.apk TildeFriends-x86-$(VERSION_NUMBER).apk
|
||||||
|
@echo "[cp] TildeFriends-arm-$(VERSION_NUMBER).apk"
|
||||||
|
@cp out/TildeFriends-arm-release.apk TildeFriends-arm-$(VERSION_NUMBER).apk
|
||||||
@echo "[cp] TildeFriends-$(VERSION_NUMBER).ipa"
|
@echo "[cp] TildeFriends-$(VERSION_NUMBER).ipa"
|
||||||
@cp out/tildefriends-release.ipa TildeFriends-$(VERSION_NUMBER).ipa
|
@cp out/tildefriends-release.ipa TildeFriends-$(VERSION_NUMBER).ipa
|
||||||
.PHONY: dist
|
.PHONY: dist
|
||||||
|
Loading…
Reference in New Issue
Block a user