Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Make builds less coupled
Browse files Browse the repository at this point in the history
  • Loading branch information
Calum McCall committed Aug 1, 2019
1 parent e7f30be commit b115848
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions android/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ include ../mk/cryptobox-src.mk
.PHONY: cryptobox
cryptobox: jni/armeabi-v7a/libcryptobox.so jni/x86/libcryptobox.so jni/x86_64/libcryptobox.so jni/arm64-v8a/libcryptobox.so jni/include/cbox.h

jni/armeabi-v7a/libcryptobox.so: libsodium | build/src/$(CRYPTOBOX_NAME)
jni/armeabi-v7a/libcryptobox.so: libsodium-armeabi-v7a | build/src/$(CRYPTOBOX_NAME)
cd build/src/$(CRYPTOBOX_NAME) && \
export PATH="${PATH}:${TOOLCHAIN}/bin" && \
cargo rustc --lib --release --target=armv7-linux-androideabi -- \
Expand All @@ -100,7 +100,7 @@ jni/armeabi-v7a/libcryptobox.so: libsodium | build/src/$(CRYPTOBOX_NAME)
mkdir -p jni/armeabi-v7a
cp build/src/$(CRYPTOBOX_NAME)/target/armv7-linux-androideabi/release/libcryptobox.so jni/armeabi-v7a/libcryptobox.so

jni/x86/libcryptobox.so: libsodium | build/src/$(CRYPTOBOX_NAME)
jni/x86/libcryptobox.so: libsodium-x86 | build/src/$(CRYPTOBOX_NAME)
cd build/src/$(CRYPTOBOX_NAME) && \
export PATH="${PATH}:${TOOLCHAIN}/bin" && \
cargo rustc --lib --release --target=i686-linux-android -- \
Expand All @@ -112,7 +112,7 @@ jni/x86/libcryptobox.so: libsodium | build/src/$(CRYPTOBOX_NAME)
mkdir -p jni/x86
cp build/src/$(CRYPTOBOX_NAME)/target/i686-linux-android/release/libcryptobox.so jni/x86/libcryptobox.so

jni/x86_64/libcryptobox.so: libsodium | build/src/$(CRYPTOBOX_NAME)
jni/x86_64/libcryptobox.so: libsodium-x86_64 | build/src/$(CRYPTOBOX_NAME)
cd build/src/$(CRYPTOBOX_NAME) && \
export PATH="${PATH}:${TOOLCHAIN}/bin" && \
cargo rustc -v --lib --release --target=x86_64-linux-android -- \
Expand All @@ -124,7 +124,7 @@ jni/x86_64/libcryptobox.so: libsodium | build/src/$(CRYPTOBOX_NAME)
mkdir -p jni/x86_64
cp build/src/$(CRYPTOBOX_NAME)/target/x86_64-linux-android/release/libcryptobox.so jni/x86_64/libcryptobox.so

jni/arm64-v8a/libcryptobox.so: libsodium | build/src/$(CRYPTOBOX_NAME)
jni/arm64-v8a/libcryptobox.so: libsodium-arm64-v8a | build/src/$(CRYPTOBOX_NAME)
cd build/src/$(CRYPTOBOX_NAME) && \
export PATH="${PATH}:${TOOLCHAIN}/bin" && \
cargo rustc --lib --release --target=aarch64-linux-android -- \
Expand All @@ -145,6 +145,18 @@ jni/include/cbox.h: | build/src/$(CRYPTOBOX_NAME)

include ../mk/libsodium-src.mk

.PHONY: libsodium-armeabi-v7a
libsodium-armeabi-v7a: jni/armeabi-v7a/libsodium.so

.PHONY: libsodium-aarch64
libsodium-aarch64: jni/arm64-v8a/libsodium.so

.PHONY: libsodium-x86
libsodium-x86: jni/x86/libsodium.so

.PHONY: libsodium-x86_64
libsodium-x86_64: jni/x86_64/libsodium.so

.PHONY: libsodium
libsodium: jni/armeabi-v7a/libsodium.so jni/arm64-v8a/libsodium.so jni/x86/libsodium.so jni/x86_64/libsodium.so

Expand Down

0 comments on commit b115848

Please sign in to comment.