Fix overbuild in android deps.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4202 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
992b123853
commit
1c10768aa4
22
Makefile
22
Makefile
@ -27,9 +27,15 @@ ANDROID_NDK ?= /usr/lib/android-sdk/ndk-bundle
|
|||||||
ANDROID_NDK_API_VERSION := 30
|
ANDROID_NDK_API_VERSION := 30
|
||||||
ANDROID_NDK_TARGET_TRIPLE := aarch64-linux-android
|
ANDROID_NDK_TARGET_TRIPLE := aarch64-linux-android
|
||||||
|
|
||||||
debug windebug androiddebug: CFLAGS += -Og
|
ANDROID_TARGETS := \
|
||||||
|
out/androiddebug/tildefriends \
|
||||||
|
out/androiddebug/libtildefriends.so \
|
||||||
|
out/androidrelease/tildefriends \
|
||||||
|
out/androidrelease/libtildefriends.so
|
||||||
|
|
||||||
|
debug windebug $(ANDROID_TARGETS): CFLAGS += -Og
|
||||||
debug release androidrelease: LDFLAGS += -rdynamic
|
debug release androidrelease: LDFLAGS += -rdynamic
|
||||||
androiddebug androidrelease: CFLAGS += --sysroot $(ANDROID_SDK)/ndk-bundle/sysroot -fPIC
|
$(ANDROID_TARGETS): CFLAGS += --sysroot $(ANDROID_SDK)/ndk-bundle/sysroot -fPIC
|
||||||
release winrelease: CFLAGS += -DNDEBUG -O3
|
release winrelease: CFLAGS += -DNDEBUG -O3
|
||||||
windebug winrelease: CC = x86_64-w64-mingw32-gcc-win32
|
windebug winrelease: CC = x86_64-w64-mingw32-gcc-win32
|
||||||
windebug winrelease: AS = $(CC)
|
windebug winrelease: AS = $(CC)
|
||||||
@ -42,13 +48,13 @@ windebug winrelease: LDFLAGS += \
|
|||||||
-static \
|
-static \
|
||||||
-lm \
|
-lm \
|
||||||
-Ldeps/openssl/mingw64/lib
|
-Ldeps/openssl/mingw64/lib
|
||||||
androiddebug androidrelease: CC = $(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
|
$(ANDROID_TARGETS): CC = $(ANDROID_NDK)/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
|
||||||
androiddebug androidrelease: AS = $(CC)
|
$(ANDROID_TARGETS): AS = $(CC)
|
||||||
androiddebug androidrelease: CFLAGS += \
|
$(ANDROID_TARGETS): CFLAGS += \
|
||||||
-target $(ANDROID_NDK_TARGET_TRIPLE)$(ANDROID_NDK_API_VERSION) \
|
-target $(ANDROID_NDK_TARGET_TRIPLE)$(ANDROID_NDK_API_VERSION) \
|
||||||
-Ideps/openssl/android/arm64-v8a/usr/local/include \
|
-Ideps/openssl/android/arm64-v8a/usr/local/include \
|
||||||
-Wno-unknown-warning-option
|
-Wno-unknown-warning-option
|
||||||
androiddebug androidrelease: LDFLAGS += \
|
$(ANDROID_TARGETS): LDFLAGS += \
|
||||||
-target $(ANDROID_NDK_TARGET_TRIPLE)$(ANDROID_NDK_API_VERSION) \
|
-target $(ANDROID_NDK_TARGET_TRIPLE)$(ANDROID_NDK_API_VERSION) \
|
||||||
-Ldeps/openssl/android/arm64-v8a/usr/local/lib
|
-Ldeps/openssl/android/arm64-v8a/usr/local/lib
|
||||||
|
|
||||||
@ -319,7 +325,7 @@ windebug winrelease: LDFLAGS += \
|
|||||||
-lcrypto \
|
-lcrypto \
|
||||||
-lws2_32 \
|
-lws2_32 \
|
||||||
-lcrypt32
|
-lcrypt32
|
||||||
androiddebug androidrelease: LDFLAGS += \
|
$(ANDROID_TARGETS): LDFLAGS += \
|
||||||
-ldl \
|
-ldl \
|
||||||
-lssl \
|
-lssl \
|
||||||
-lcrypto \
|
-lcrypto \
|
||||||
@ -384,7 +390,7 @@ out/apk/classes.dex: $(CLASS_FILES)
|
|||||||
@echo [dx] $@
|
@echo [dx] $@
|
||||||
@$(ANDROID_BUILD_TOOLS)/dx --dex --output=$@ out/classes/
|
@$(ANDROID_BUILD_TOOLS)/dx --dex --output=$@ out/classes/
|
||||||
|
|
||||||
out/TildeFriends.unsigned.apk: out/apk/classes.dex androiddebug
|
out/TildeFriends.unsigned.apk: out/apk/classes.dex out/androiddebug/libtildefriends.so
|
||||||
@mkdir -p $(dir $@) out/apk/lib/arm64-v8a/
|
@mkdir -p $(dir $@) out/apk/lib/arm64-v8a/
|
||||||
@echo [aapt] $@
|
@echo [aapt] $@
|
||||||
@cp out/androiddebug/libtildefriends.so out/apk/lib/arm64-v8a/
|
@cp out/androiddebug/libtildefriends.so out/apk/lib/arm64-v8a/
|
||||||
|
Loading…
Reference in New Issue
Block a user