am 9a68a8fb: Add support for TLS_FALLBACK_SCSV

* commit '9a68a8fb86e7440763286e3ea8578099abd598e7':
  Add support for TLS_FALLBACK_SCSV
diff --git a/Crypto.mk b/Crypto.mk
index c0cef25..49e6a4a 100644
--- a/Crypto.mk
+++ b/Crypto.mk
@@ -2,6 +2,7 @@
 # target static library
 include $(CLEAR_VARS)
 LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
+LOCAL_C_INCLUDES := $(log_c_includes)
 
 # The static library should be used in only unbundled apps
 # and we don't have clang in unbundled build yet.
@@ -22,6 +23,7 @@
 # target shared library
 include $(CLEAR_VARS)
 LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
+LOCAL_C_INCLUDES := $(log_c_includes)
 
 # If we're building an unbundled build, don't try to use clang since it's not
 # in the NDK yet. This can be removed when a clang version that is fast enough
@@ -48,6 +50,7 @@
 # host shared library
 include $(CLEAR_VARS)
 LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
+LOCAL_C_INCLUDES := $(log_c_includes)
 LOCAL_CFLAGS += -DPURIFY
 LOCAL_LDLIBS += -ldl
 LOCAL_MODULE_TAGS := optional
@@ -63,6 +66,7 @@
 
 include $(CLEAR_VARS)
 LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
+LOCAL_C_INCLUDES := $(log_c_includes)
 LOCAL_CFLAGS += -DPURIFY
 LOCAL_LDLIBS += -ldl
 LOCAL_MODULE_TAGS := optional
diff --git a/Ssl.mk b/Ssl.mk
index 22a61e0..c80ed61 100644
--- a/Ssl.mk
+++ b/Ssl.mk
@@ -1,6 +1,8 @@
 #######################################
 # target static library
 include $(CLEAR_VARS)
+LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
+LOCAL_C_INCLUDES := $(log_c_includes)
 
 # The static library should be used in only unbundled apps
 # and we don't have clang in unbundled build yet.
@@ -9,7 +11,6 @@
 LOCAL_SRC_FILES += $(target_src_files)
 LOCAL_CFLAGS += $(target_c_flags)
 LOCAL_C_INCLUDES += $(target_c_includes)
-LOCAL_SHARED_LIBRARIES = $(log_shared_libraries)
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE := libssl_static
 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/android-config.mk $(LOCAL_PATH)/Ssl.mk
@@ -20,6 +21,8 @@
 #######################################
 # target shared library
 include $(CLEAR_VARS)
+LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
+LOCAL_C_INCLUDES := $(log_c_includes)
 
 # If we're building an unbundled build, don't try to use clang since it's not
 # in the NDK yet. This can be removed when a clang version that is fast enough
@@ -30,7 +33,7 @@
 LOCAL_SDK_VERSION := 9
 endif
 
-LOCAL_SHARED_LIBRARIES += libcrypto $(log_shared_libraries)
+LOCAL_SHARED_LIBRARIES += libcrypto
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE := libssl
 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/android-config.mk $(LOCAL_PATH)/Ssl.mk
@@ -41,7 +44,10 @@
 #######################################
 # host shared library
 include $(CLEAR_VARS)
-LOCAL_SHARED_LIBRARIES += libcrypto-host $(log_shared_libraries)
+LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
+LOCAL_C_INCLUDES := $(log_c_includes)
+
+LOCAL_SHARED_LIBRARIES += libcrypto-host
 LOCAL_MODULE_TAGS := optional
 LOCAL_MODULE := libssl-host
 LOCAL_MULTILIB := both
@@ -53,8 +59,11 @@
 #######################################
 # ssltest
 include $(CLEAR_VARS)
+LOCAL_SHARED_LIBRARIES := $(log_shared_libraries)
+LOCAL_C_INCLUDES := $(log_c_includes)
+
 LOCAL_SRC_FILES := ssl/ssltest.c
-LOCAL_SHARED_LIBRARIES := libssl libcrypto $(log_shared_libraries)
+LOCAL_SHARED_LIBRARIES := libssl libcrypto
 LOCAL_MODULE := ssltest
 LOCAL_MULTILIB := both
 LOCAL_MODULE_STEM_32 := ssltest
diff --git a/flavor.mk b/flavor.mk
new file mode 100644
index 0000000..f32fe41
--- /dev/null
+++ b/flavor.mk
@@ -0,0 +1,4 @@
+# This makefile exists to be included by makefiles in other directories so that
+# they can detect whether BoringSSL or OpenSSL is being used.
+
+OPENSSL_FLAVOR=OpenSSL