aboutsummaryrefslogtreecommitdiff
path: root/contrib/depends/packages/android_ndk.mk
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2019-11-01 03:38:13 +0000
committerHoward Chu <hyc@symas.com>2019-11-03 21:14:45 +0000
commit643860776e923428d2d2207ec70ead52adcc9272 (patch)
treec8414b27be7c20b916149a4585e0453a673eae57 /contrib/depends/packages/android_ndk.mk
parentMerge pull request #6079 (diff)
downloadmonero-643860776e923428d2d2207ec70ead52adcc9272.tar.xz
Add Android support
Diffstat (limited to 'contrib/depends/packages/android_ndk.mk')
-rw-r--r--contrib/depends/packages/android_ndk.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/depends/packages/android_ndk.mk b/contrib/depends/packages/android_ndk.mk
new file mode 100644
index 000000000..9b8a5332f
--- /dev/null
+++ b/contrib/depends/packages/android_ndk.mk
@@ -0,0 +1,22 @@
+package=android_ndk
+$(package)_version=17b
+$(package)_download_path=https://dl.google.com/android/repository/
+$(package)_file_name=android-ndk-r$($(package)_version)-linux-x86_64.zip
+$(package)_sha256_hash=5dfbbdc2d3ba859fed90d0e978af87c71a91a5be1f6e1c40ba697503d48ccecd
+
+define $(package)_set_vars
+$(package)_config_opts_arm=--arch arm
+$(package)_config_opts_aarch64=--arch arm64
+endef
+
+define $(package)_extract_cmds
+ echo $($(package)_sha256_hash) $($(1)_source_dir)/$($(package)_file_name) | sha256sum -c &&\
+ unzip -q $($(1)_source_dir)/$($(package)_file_name)
+endef
+
+define $(package)_stage_cmds
+ android-ndk-r$($(package)_version)/build/tools/make_standalone_toolchain.py --api 21 \
+ --install-dir $(build_prefix) --stl=libc++ $($(package)_config_opts) &&\
+ mv $(build_prefix) $($(package)_staging_dir)/$(host_prefix)
+endef
+