Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 1 | # -*- mode: makefile -*- |
| 2 | # Copyright (C) 2013 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | # |
| 17 | # Definitions for building the Conscrypt Java library, native code, |
| 18 | # and associated tests. |
| 19 | # |
| 20 | |
| 21 | # |
| 22 | # Common definitions for host and target. |
| 23 | # |
| 24 | |
| 25 | # Conscrypt is divided into modules. |
| 26 | # |
| 27 | # The structure is: |
| 28 | # |
| 29 | # src/ |
| 30 | # main/ # To be shipped on every device. |
| 31 | # java/ # Java source for library code. |
| 32 | # native/ # C++ source for library code. |
| 33 | # resources/ # Support files. |
| 34 | # test/ # Built only on demand, for testing. |
| 35 | # java/ # Java source for tests. |
| 36 | # native/ # C++ source for tests (rare). |
| 37 | # resources/ # Support files. |
| 38 | # |
| 39 | # All subdirectories are optional (hence the "2> /dev/null"s below). |
| 40 | |
| 41 | LOCAL_PATH := $(call my-dir) |
| 42 | |
Colin Cross | b77aef4 | 2015-03-30 17:23:41 -0700 | [diff] [blame] | 43 | local_javac_flags:=-Xmaxwarns 9999999 |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 44 | #local_javac_flags+=-Xlint:all -Xlint:-serial,-deprecation,-unchecked |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 45 | |
Kenny Root | 18ed3be | 2014-11-24 10:57:37 -0800 | [diff] [blame] | 46 | core_cflags := -Wall -Wextra -Werror -Wunused |
| 47 | core_cppflags := -std=gnu++11 -Wall -Wextra -Werror -Wunused |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 48 | |
| 49 | # |
| 50 | # Build for the target (device). |
| 51 | # |
| 52 | |
Adam Langley | f79c90d | 2015-04-24 11:11:36 -0700 | [diff] [blame] | 53 | include $(CLEAR_VARS) |
| 54 | LOCAL_CPP_EXTENSION := cc |
| 55 | LOCAL_SRC_FILES := src/gen/native/generate_constants.cc |
| 56 | LOCAL_MODULE := conscrypt_generate_constants |
| 57 | LOCAL_SHARED_LIBRARIES := libcrypto-host libssl-host |
| 58 | include $(BUILD_HOST_EXECUTABLE) |
| 59 | |
| 60 | conscrypt_generate_constants_exe := $(LOCAL_INSTALLED_MODULE) |
| 61 | conscrypt_gen_java_files := $(TARGET_OUT_COMMON_GEN)/conscrypt/NativeConstants.java |
| 62 | |
| 63 | $(conscrypt_gen_java_files): $(conscrypt_generate_constants_exe) |
| 64 | mkdir -p $(dir $@) |
| 65 | $< > $@ |
| 66 | |
Kenny Root | 1cfba2b | 2014-05-27 18:44:53 +0000 | [diff] [blame] | 67 | # Create the conscrypt library |
| 68 | include $(CLEAR_VARS) |
| 69 | LOCAL_SRC_FILES := $(call all-java-files-under,src/main/java) |
Kenny Root | 39deada | 2014-05-30 13:15:27 -0700 | [diff] [blame] | 70 | LOCAL_SRC_FILES += $(call all-java-files-under,src/platform/java) |
Adam Langley | f79c90d | 2015-04-24 11:11:36 -0700 | [diff] [blame] | 71 | LOCAL_GENERATED_SOURCES := $(conscrypt_gen_java_files) |
Brian Carlstrom | ecd29ab | 2014-06-18 15:11:01 -0700 | [diff] [blame] | 72 | LOCAL_JAVA_LIBRARIES := core-libart |
Kenny Root | 1cfba2b | 2014-05-27 18:44:53 +0000 | [diff] [blame] | 73 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 74 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 75 | LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt |
| 76 | LOCAL_MODULE_TAGS := optional |
| 77 | LOCAL_MODULE := conscrypt |
| 78 | LOCAL_REQUIRED_MODULES := libjavacrypto |
| 79 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 80 | include $(BUILD_JAVA_LIBRARY) |
| 81 | |
| 82 | # Create the conscrypt library without jarjar for tests |
| 83 | include $(CLEAR_VARS) |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 84 | LOCAL_SRC_FILES := $(call all-java-files-under,src/main/java) |
Kenny Root | 39deada | 2014-05-30 13:15:27 -0700 | [diff] [blame] | 85 | LOCAL_SRC_FILES += $(call all-java-files-under,src/platform/java) |
Adam Langley | f79c90d | 2015-04-24 11:11:36 -0700 | [diff] [blame] | 86 | LOCAL_GENERATED_SOURCES := $(conscrypt_gen_java_files) |
Brian Carlstrom | ecd29ab | 2014-06-18 15:11:01 -0700 | [diff] [blame] | 87 | LOCAL_JAVA_LIBRARIES := core-libart |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 88 | LOCAL_NO_STANDARD_LIBRARIES := true |
| 89 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 90 | LOCAL_MODULE_TAGS := optional |
Kenny Root | 92b12a8 | 2013-10-02 16:44:41 -0700 | [diff] [blame] | 91 | LOCAL_MODULE := conscrypt-nojarjar |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 92 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 93 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 94 | |
| 95 | ifeq ($(LIBCORE_SKIP_TESTS),) |
| 96 | # Make the conscrypt-tests library. |
| 97 | include $(CLEAR_VARS) |
| 98 | LOCAL_SRC_FILES := $(call all-java-files-under,src/test/java) |
| 99 | LOCAL_NO_STANDARD_LIBRARIES := true |
Brian Carlstrom | ecd29ab | 2014-06-18 15:11:01 -0700 | [diff] [blame] | 100 | LOCAL_JAVA_LIBRARIES := core-libart core-junit bouncycastle |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 101 | LOCAL_STATIC_JAVA_LIBRARIES := core-tests-support conscrypt-nojarjar |
| 102 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 103 | LOCAL_MODULE_TAGS := optional |
Kenny Root | 92b12a8 | 2013-10-02 16:44:41 -0700 | [diff] [blame] | 104 | LOCAL_MODULE := conscrypt-tests |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 105 | LOCAL_REQUIRED_MODULES := libjavacrypto |
| 106 | LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt |
| 107 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 108 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 109 | endif |
| 110 | |
| 111 | # Platform conscrypt crypto JNI library |
| 112 | include $(CLEAR_VARS) |
Adam Langley | 24144a8 | 2015-01-26 14:54:30 -0800 | [diff] [blame] | 113 | ifneq (,$(wildcard $(TOP)/external/boringssl/flavor.mk)) |
| 114 | include $(TOP)/external/boringssl/flavor.mk |
| 115 | else |
| 116 | include $(TOP)/external/openssl/flavor.mk |
| 117 | endif |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 118 | LOCAL_CFLAGS += $(core_cflags) |
| 119 | LOCAL_CFLAGS += -DJNI_JARJAR_PREFIX="com/android/" |
| 120 | LOCAL_CPPFLAGS += $(core_cppflags) |
| 121 | LOCAL_SRC_FILES := \ |
| 122 | src/main/native/org_conscrypt_NativeCrypto.cpp |
Kenny Root | 0a84a21 | 2013-10-01 17:48:03 -0700 | [diff] [blame] | 123 | LOCAL_C_INCLUDES += \ |
| 124 | external/openssl/include \ |
Kenny Root | f24ba06 | 2014-06-09 10:37:46 -0700 | [diff] [blame] | 125 | external/openssl \ |
Kenny Root | 0a84a21 | 2013-10-01 17:48:03 -0700 | [diff] [blame] | 126 | libcore/include \ |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 127 | libcore/luni/src/main/native |
Kenny Root | 0a84a21 | 2013-10-01 17:48:03 -0700 | [diff] [blame] | 128 | LOCAL_SHARED_LIBRARIES := libcrypto libjavacore liblog libnativehelper libssl libz |
Adam Langley | de5225d | 2014-10-06 15:55:30 -0700 | [diff] [blame] | 129 | ifeq ($(OPENSSL_FLAVOR),BoringSSL) |
| 130 | LOCAL_SHARED_LIBRARIES += libkeystore-engine |
Adam Langley | de5225d | 2014-10-06 15:55:30 -0700 | [diff] [blame] | 131 | endif |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 132 | LOCAL_MODULE_TAGS := optional |
Kenny Root | 92b12a8 | 2013-10-02 16:44:41 -0700 | [diff] [blame] | 133 | LOCAL_MODULE := libjavacrypto |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 134 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 135 | include $(BUILD_SHARED_LIBRARY) |
| 136 | |
Kenny Root | 3e46e4e | 2014-05-23 13:35:10 -0700 | [diff] [blame] | 137 | # Unbundled Conscrypt jar |
| 138 | include $(CLEAR_VARS) |
Kenny Root | 39deada | 2014-05-30 13:15:27 -0700 | [diff] [blame] | 139 | LOCAL_SRC_FILES := $(call all-java-files-under,src/main/java) |
| 140 | LOCAL_SRC_FILES += $(call all-java-files-under,src/compat/java) |
Adam Langley | f79c90d | 2015-04-24 11:11:36 -0700 | [diff] [blame] | 141 | LOCAL_GENERATED_SOURCES := $(conscrypt_gen_java_files) |
Kenny Root | 3e46e4e | 2014-05-23 13:35:10 -0700 | [diff] [blame] | 142 | LOCAL_SDK_VERSION := 9 |
| 143 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 144 | LOCAL_MODULE_TAGS := optional |
Kenny Root | 031510f | 2014-05-29 13:53:05 -0700 | [diff] [blame] | 145 | LOCAL_MODULE := conscrypt_unbundled |
Chad Brubaker | 62190cd | 2015-04-03 12:17:33 -0700 | [diff] [blame] | 146 | LOCAL_JAVA_LIBRARIES := conscrypt-stubs |
Kenny Root | 3e46e4e | 2014-05-23 13:35:10 -0700 | [diff] [blame] | 147 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Yohann Roussel | eaa2876 | 2015-04-10 00:57:26 +0200 | [diff] [blame] | 148 | LOCAL_JACK_FLAGS := -D jack.classpath.default-libraries=false |
Kenny Root | 3e46e4e | 2014-05-23 13:35:10 -0700 | [diff] [blame] | 149 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 150 | |
Chad Brubaker | 62190cd | 2015-04-03 12:17:33 -0700 | [diff] [blame] | 151 | # Stub library for unbundled builds |
| 152 | include $(CLEAR_VARS) |
| 153 | LOCAL_SRC_FILES := $(call all-java-files-under,src/stub/java) |
Kenny Root | 7cb0a4a | 2015-04-22 16:36:16 -0700 | [diff] [blame] | 154 | LOCAL_SDK_VERSION := 9 |
| 155 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
Chad Brubaker | 62190cd | 2015-04-03 12:17:33 -0700 | [diff] [blame] | 156 | LOCAL_MODULE := conscrypt-stubs |
Kenny Root | 7cb0a4a | 2015-04-22 16:36:16 -0700 | [diff] [blame] | 157 | LOCAL_JACK_FLAGS := -D jack.classpath.default-libraries=false |
Chad Brubaker | 62190cd | 2015-04-03 12:17:33 -0700 | [diff] [blame] | 158 | include $(BUILD_STATIC_JAVA_LIBRARY) |
| 159 | |
Kenny Root | 3e46e4e | 2014-05-23 13:35:10 -0700 | [diff] [blame] | 160 | # Unbundled Conscrypt crypto JNI library |
| 161 | include $(CLEAR_VARS) |
| 162 | LOCAL_CFLAGS += $(core_cflags) |
| 163 | LOCAL_CPPFLAGS += $(core_cppflags) |
| 164 | LOCAL_SRC_FILES := \ |
| 165 | src/main/native/org_conscrypt_NativeCrypto.cpp \ |
Kenny Root | f24ba06 | 2014-06-09 10:37:46 -0700 | [diff] [blame] | 166 | src/compat/native/JNIHelp.cpp |
Kenny Root | 3e46e4e | 2014-05-23 13:35:10 -0700 | [diff] [blame] | 167 | LOCAL_C_INCLUDES += \ |
| 168 | external/openssl/include \ |
Kenny Root | f24ba06 | 2014-06-09 10:37:46 -0700 | [diff] [blame] | 169 | external/openssl \ |
| 170 | external/conscrypt/src/compat/native |
Adam Langley | de5225d | 2014-10-06 15:55:30 -0700 | [diff] [blame] | 171 | # NO_KEYSTORE_ENGINE instructs the BoringSSL build of Conscrypt not to support |
| 172 | # the keystore ENGINE. It is not available in this build configuration. |
| 173 | LOCAL_CFLAGS += -DNO_KEYSTORE_ENGINE |
Kenny Root | 031510f | 2014-05-29 13:53:05 -0700 | [diff] [blame] | 174 | LOCAL_LDFLAGS := -llog -lz -ldl |
Kenny Root | 3e46e4e | 2014-05-23 13:35:10 -0700 | [diff] [blame] | 175 | LOCAL_STATIC_LIBRARIES := libssl_static libcrypto_static |
| 176 | LOCAL_MODULE_TAGS := optional |
| 177 | LOCAL_MODULE := libconscrypt_jni |
| 178 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 179 | LOCAL_SDK_VERSION := 9 |
| 180 | include $(BUILD_SHARED_LIBRARY) |
| 181 | |
Justin Morey | e66dbe5 | 2014-06-10 14:35:13 -0500 | [diff] [blame] | 182 | # Static unbundled Conscrypt crypto JNI library |
| 183 | include $(CLEAR_VARS) |
| 184 | LOCAL_CFLAGS += $(core_cflags) |
| 185 | LOCAL_CPPFLAGS += $(core_cppflags) -DJNI_JARJAR_PREFIX="com/google/android/gms/" -DCONSCRYPT_UNBUNDLED -DSTATIC_LIB |
| 186 | LOCAL_SRC_FILES := \ |
| 187 | src/main/native/org_conscrypt_NativeCrypto.cpp \ |
| 188 | src/compat/native/JNIHelp.cpp |
| 189 | LOCAL_C_INCLUDES += \ |
| 190 | external/openssl/include \ |
| 191 | external/openssl \ |
| 192 | external/conscrypt/src/compat/native |
| 193 | LOCAL_MODULE_TAGS := optional |
| 194 | LOCAL_MODULE := libconscrypt_static |
| 195 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Adam Langley | 0ccc17a | 2015-02-25 11:37:23 -0800 | [diff] [blame] | 196 | LOCAL_STATIC_LIBRARIES := libssl_static libcrypto_static |
Justin Morey | e66dbe5 | 2014-06-10 14:35:13 -0500 | [diff] [blame] | 197 | LOCAL_SDK_VERSION := 9 |
| 198 | include $(BUILD_STATIC_LIBRARY) |
| 199 | |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 200 | # |
| 201 | # Build for the host. |
| 202 | # |
| 203 | |
Elliott Hughes | d9b323c | 2014-12-17 13:29:43 -0800 | [diff] [blame] | 204 | ifeq ($(HOST_OS),linux) |
| 205 | |
Ian Rogers | 3a03c73 | 2014-05-23 11:53:18 -0700 | [diff] [blame] | 206 | # Make the conscrypt-hostdex library |
| 207 | include $(CLEAR_VARS) |
| 208 | LOCAL_SRC_FILES := $(call all-java-files-under,src/main/java) |
| 209 | LOCAL_SRC_FILES += $(call all-java-files-under,src/platform/java) |
Adam Langley | f79c90d | 2015-04-24 11:11:36 -0700 | [diff] [blame] | 210 | LOCAL_GENERATED_SOURCES := $(conscrypt_gen_java_files) |
Ian Rogers | 3a03c73 | 2014-05-23 11:53:18 -0700 | [diff] [blame] | 211 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 212 | LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt |
| 213 | LOCAL_MODULE_TAGS := optional |
| 214 | LOCAL_MODULE := conscrypt-hostdex |
| 215 | LOCAL_REQUIRED_MODULES := libjavacrypto |
| 216 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 217 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
Kenny Root | 1cfba2b | 2014-05-27 18:44:53 +0000 | [diff] [blame] | 218 | |
Ian Rogers | 3a03c73 | 2014-05-23 11:53:18 -0700 | [diff] [blame] | 219 | # Make the conscrypt-hostdex-nojarjar for tests |
| 220 | include $(CLEAR_VARS) |
| 221 | LOCAL_SRC_FILES := $(call all-java-files-under,src/main/java) |
| 222 | LOCAL_SRC_FILES += $(call all-java-files-under,src/platform/java) |
Adam Langley | f79c90d | 2015-04-24 11:11:36 -0700 | [diff] [blame] | 223 | LOCAL_GENERATED_SOURCES := $(conscrypt_gen_java_files) |
Ian Rogers | 3a03c73 | 2014-05-23 11:53:18 -0700 | [diff] [blame] | 224 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 225 | LOCAL_BUILD_HOST_DEX := true |
| 226 | LOCAL_MODULE_TAGS := optional |
| 227 | LOCAL_MODULE := conscrypt-hostdex-nojarjar |
| 228 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 229 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 230 | |
Ian Rogers | 3a03c73 | 2014-05-23 11:53:18 -0700 | [diff] [blame] | 231 | # Make the conscrypt-tests library. |
| 232 | ifeq ($(LIBCORE_SKIP_TESTS),) |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 233 | include $(CLEAR_VARS) |
| 234 | LOCAL_SRC_FILES := $(call all-java-files-under,src/test/java) |
Narayan Kamath | b32d679 | 2013-10-28 14:22:43 +0000 | [diff] [blame] | 235 | LOCAL_JAVA_LIBRARIES := bouncycastle-hostdex core-junit-hostdex core-tests-support-hostdex conscrypt-hostdex-nojarjar |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 236 | LOCAL_JAVACFLAGS := $(local_javac_flags) |
| 237 | LOCAL_MODULE_TAGS := optional |
Kenny Root | 92b12a8 | 2013-10-02 16:44:41 -0700 | [diff] [blame] | 238 | LOCAL_MODULE := conscrypt-tests-hostdex |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 239 | LOCAL_REQUIRED_MODULES := libjavacrypto |
| 240 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Narayan Kamath | b32d679 | 2013-10-28 14:22:43 +0000 | [diff] [blame] | 241 | include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) |
Ian Rogers | 3a03c73 | 2014-05-23 11:53:18 -0700 | [diff] [blame] | 242 | endif |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 243 | |
Ian Rogers | 3a03c73 | 2014-05-23 11:53:18 -0700 | [diff] [blame] | 244 | # Conscrypt native library for host |
| 245 | include $(CLEAR_VARS) |
| 246 | LOCAL_CLANG := true |
| 247 | LOCAL_SRC_FILES += \ |
| 248 | src/main/native/org_conscrypt_NativeCrypto.cpp |
| 249 | LOCAL_C_INCLUDES += \ |
| 250 | external/openssl/include \ |
Kenny Root | f24ba06 | 2014-06-09 10:37:46 -0700 | [diff] [blame] | 251 | external/openssl \ |
Ian Rogers | 3a03c73 | 2014-05-23 11:53:18 -0700 | [diff] [blame] | 252 | libcore/include \ |
| 253 | libcore/luni/src/main/native |
| 254 | LOCAL_CPPFLAGS += $(core_cppflags) |
| 255 | LOCAL_LDLIBS += -lpthread |
| 256 | LOCAL_MODULE_TAGS := optional |
| 257 | LOCAL_MODULE := libjavacrypto |
| 258 | LOCAL_CFLAGS += -DJNI_JARJAR_PREFIX="com/android/" |
Adam Langley | de5225d | 2014-10-06 15:55:30 -0700 | [diff] [blame] | 259 | # NO_KEYSTORE_ENGINE instructs the BoringSSL build of Conscrypt not to support |
| 260 | # the keystore ENGINE. It is not available in this build configuration. |
| 261 | LOCAL_CFLAGS += -DNO_KEYSTORE_ENGINE |
Ian Rogers | 3a03c73 | 2014-05-23 11:53:18 -0700 | [diff] [blame] | 262 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
| 263 | LOCAL_SHARED_LIBRARIES := libcrypto-host libjavacore liblog libnativehelper libssl-host |
Elliott Hughes | 759b198 | 2014-10-28 13:24:26 -0700 | [diff] [blame] | 264 | LOCAL_MULTILIB := both |
Ian Rogers | 3a03c73 | 2014-05-23 11:53:18 -0700 | [diff] [blame] | 265 | include $(BUILD_HOST_SHARED_LIBRARY) |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 266 | |
Ian Rogers | 3a03c73 | 2014-05-23 11:53:18 -0700 | [diff] [blame] | 267 | # Conscrypt native library for nojarjar'd version |
| 268 | # Don't build this for unbundled conscrypt build |
| 269 | ifeq (,$(TARGET_BUILD_APPS)) |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 270 | include $(CLEAR_VARS) |
Ian Rogers | 3a03c73 | 2014-05-23 11:53:18 -0700 | [diff] [blame] | 271 | LOCAL_CLANG := true |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 272 | LOCAL_SRC_FILES += \ |
| 273 | src/main/native/org_conscrypt_NativeCrypto.cpp |
Kenny Root | 0a84a21 | 2013-10-01 17:48:03 -0700 | [diff] [blame] | 274 | LOCAL_C_INCLUDES += \ |
| 275 | external/openssl/include \ |
Kenny Root | f24ba06 | 2014-06-09 10:37:46 -0700 | [diff] [blame] | 276 | external/openssl \ |
Kenny Root | 0a84a21 | 2013-10-01 17:48:03 -0700 | [diff] [blame] | 277 | libcore/include \ |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 278 | libcore/luni/src/main/native |
Kenny Root | 3e46e4e | 2014-05-23 13:35:10 -0700 | [diff] [blame] | 279 | LOCAL_CPPFLAGS += $(core_cppflags) -DCONSCRYPT_NOT_UNBUNDLED |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 280 | LOCAL_LDLIBS += -lpthread |
| 281 | LOCAL_MODULE_TAGS := optional |
Kenny Root | 92b12a8 | 2013-10-02 16:44:41 -0700 | [diff] [blame] | 282 | LOCAL_MODULE := libconscrypt_jni |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 283 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Adam Langley | de5225d | 2014-10-06 15:55:30 -0700 | [diff] [blame] | 284 | # NO_KEYSTORE_ENGINE instructs the BoringSSL build of Conscrypt not to |
| 285 | # support the keystore ENGINE. It is not available in this build |
| 286 | # configuration. |
| 287 | LOCAL_CFLAGS += -DNO_KEYSTORE_ENGINE |
Kenny Root | 7150e32 | 2013-10-01 19:54:34 -0700 | [diff] [blame] | 288 | LOCAL_SHARED_LIBRARIES := libcrypto-host libjavacore liblog libnativehelper libssl-host |
Elliott Hughes | 759b198 | 2014-10-28 13:24:26 -0700 | [diff] [blame] | 289 | LOCAL_MULTILIB := both |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 290 | include $(BUILD_HOST_SHARED_LIBRARY) |
Kenny Root | 0e27f2a | 2013-09-16 13:58:19 -0700 | [diff] [blame] | 291 | endif |
Kenny Root | 18ed3be | 2014-11-24 10:57:37 -0800 | [diff] [blame] | 292 | |
Elliott Hughes | d9b323c | 2014-12-17 13:29:43 -0800 | [diff] [blame] | 293 | endif # HOST_OS == linux |
| 294 | |
Kenny Root | 18ed3be | 2014-11-24 10:57:37 -0800 | [diff] [blame] | 295 | # clear out local variables |
| 296 | core_cflags := |
| 297 | core_cppflags := |
| 298 | local_javac_flags := |