-
Notifications
You must be signed in to change notification settings - Fork 13
/
Application.mk
44 lines (38 loc) · 1.58 KB
/
Application.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
## Application.mk - Android build file for Crypto++.
## Written and placed in public domain by Jeffrey Walton. This
## Android.mk is based on Alex Afanasyev (GitHub @cawka) PR #3,
## https://github.com/weidai11/cryptopp/pull/3.
##
## The Android build system is a wrapper around GNU Make and is
## documented https://developer.android.com/ndk/guides/android_mk.
## The CPU Features library provides caps and is documented at
## https://developer.android.com/ndk/guides/cpu-features.
##
## For a list of Android Platforms and API levels see
## https://developer.android.com/ndk/guides/stable_apis.
## Android 4.3 is android-18, Android 5 is android-21,
## and Android 6.0 is android-23.
##
## Android recommends c++_shared for NDK version 16.0 and
## above. Android will be removing other runtime libraries
## as early as NDK version 18. Also see
## https://developer.android.com/ndk/guides/cpp-support.
APP_ABI := all
APP_PLATFORM := android-21
# APP_STL := gnustl_shared
APP_STL := c++_shared
CRYPTOPP_ROOT := $(call my-dir)
NDK_PROJECT_PATH := $(CRYPTOPP_ROOT)
APP_BUILD_SCRIPT := $(CRYPTOPP_ROOT)/Android.mk
GREP ?= grep
NDK_r16_OR_LATER := $(shell $(GREP) -i -c -E "Pkg.Revision = (1[6-9]|[2-9][0-9]\.)" "$$ANDROID_NDK_ROOT/source.properties")
ifneq ($(NDK_r16_OR_LATER),0)
ifneq ($(APP_STL),c++_shared)
$(info Crypto++: NDK r16 or later. Use c++_shared instead of $(APP_STL))
endif
endif
ifeq ($(NDK_LOG),1)
$(info Crypto++: ANDROID_NDK_ROOT is $(ANDROID_NDK_ROOT))
$(info Crypto++: NDK_PROJECT_PATH is $(NDK_PROJECT_PATH))
$(info Crypto++: APP_BUILD_SCRIPT is $(APP_BUILD_SCRIPT))
endif