summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias Nissler <mnissler@chromium.org>2016-02-22 13:14:30 +0100
committerMattias Nissler <mnissler@google.com>2016-03-03 15:03:19 +0100
commitd057f18e4f6637c6c7f22668bde4669821d715ef (patch)
tree54b1259775748bd5f2116083b0593fdaab631243
parenta637c84616777404a4ee2e65682a1dabced69f04 (diff)
downloadlibmincrypt-master.tar.gz
Add build guards for libmincrypt targetHEADmaster
This introduces a build variable that lets us control whether mincrypt will build from system/core or from the new external/libmincrypt repository. Once both locations are prepared, we'll switch the variable to build mincrypt from the new location and afterwards remove the conditionals. BUG: 27287913 Change-Id: I8360b9f296c8404b6352dc447faabaf31d6ffc9a
-rw-r--r--Android.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 09fbbb1..2d3e44c 100644
--- a/Android.mk
+++ b/Android.mk
@@ -2,6 +2,16 @@
#
LOCAL_PATH := $(call my-dir)
+# Determine whether to build mincrypt from system/core or from
+# external/libmincrypt. The mincrypt source is temporarily present in both
+# locations during the process of moving mincrypt to external/libmincrypt.
+# TODO(mnissler): Remove this after the transition is complete.
+ifndef MINCRYPT_STANDALONE
+MINCRYPT_STANDALONE := true
+endif
+
+ifeq ($(MINCRYPT_STANDALONE),true)
+
include $(CLEAR_VARS)
LOCAL_MODULE := libmincrypt
LOCAL_SRC_FILES := dsa_sig.c p256.c p256_ec.c p256_ecdsa.c rsa.c sha.c sha256.c
@@ -15,3 +25,5 @@ LOCAL_CFLAGS := -Wall -Werror
include $(BUILD_HOST_STATIC_LIBRARY)
include $(LOCAL_PATH)/test/Android.mk
+
+endif # MINCRYPT_STANDALONE == true