Commit 90dbafe4 authored by fro's avatar fro Committed by Alexey
Browse files

fix build native (Rust) library for Android

parent c8c7435c
NDK_STANDALONE = $(shell pwd)/../../NDK
ARCHS_IOS = i386-apple-ios x86_64-apple-ios armv7-apple-ios armv7s-apple-ios aarch64-apple-ios
ARCHS_ANDROID = aarch64-linux-android armv7-linux-androideabi i686-linux-android
LIB=libsigner.a
......@@ -13,9 +14,23 @@ android: $(ARCHS_ANDROID)
$(ARCHS_IOS): %:
cargo build --target $@ --release --no-default-features
.PHONY: $(ARCHS_ANDROID)
$(ARCHS_ANDROID): %:
aarch64-linux-android:
PATH=$(PATH):$(NDK_STANDALONE)/arm64/bin \
CC=$@-gcc \
CXX=$@-g++ \
cargo build --target $@ --release
armv7-linux-androideabi:
PATH=$(PATH):$(NDK_STANDALONE)/arm/bin \
CC=arm-linux-androideabi-gcc \
CXX=arm-linux-androideabi-g++ \
cargo build --target $@ --release
i686-linux-android:
PATH=$(PATH):$(NDK_STANDALONE)/x86/bin \
CC=i686-linux-android-gcc \
CXX=i686-linux-android-g++ \
cargo build --target $@ --release --lib
$(LIB): $(ARCHS_IOS)
lipo -create -output $@ $(foreach arch,$(ARCHS_IOS),$(wildcard target/$(arch)/release/$(LIB)))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment