blob: 675a65b3f1bd0fb1c42ec9705cc6e29949f0d8a4 [file] [log] [blame]
The Android Open Source Project656d9c72009-03-03 19:30:25 -08001#
David 'Digit' Turner9fbf99a2013-02-19 10:38:34 +01002# These flags represent the build-time configuration of OpenSSL for android
The Android Open Source Project656d9c72009-03-03 19:30:25 -08003#
David 'Digit' Turner9fbf99a2013-02-19 10:38:34 +01004# The value of $(openssl_cflags) was pruned from the Makefile generated
5# by running ./Configure from import_openssl.sh.
6#
7# This script performs minor but required patching for the Android build.
The Android Open Source Project656d9c72009-03-03 19:30:25 -08008#
9
Kenny Rootdb4bfdb2014-04-30 13:20:28 -070010# Directories for ENGINE shared libraries
11openssl_cflags_32 += \
12 -DOPENSSLDIR="\"/system/lib/ssl\"" \
13 -DENGINESDIR="\"/system/lib/ssl/engines\""
14openssl_cflags_static_32 += \
15 -DOPENSSLDIR="\"/system/lib/ssl\"" \
16 -DENGINESDIR="\"/system/lib/ssl/engines\""
17openssl_cflags_64 += \
18 -DOPENSSLDIR="\"/system/lib64/ssl\"" \
19 -DENGINESDIR="\"/system/lib64/ssl/engines\""
20openssl_cflags_static_64 += \
21 -DOPENSSLDIR="\"/system/lib64/ssl\"" \
22 -DENGINESDIR="\"/system/lib64/ssl/engines\""
23
Brian Carlstrom155e0cc2014-02-03 15:07:09 -080024# Intentionally excluded http://b/7079965
Alex Ray25ffdb22014-03-21 14:28:27 -070025ifneq (,$(filter -DZLIB, $(openssl_cflags_32) $(openssl_cflags_64) \
26 $(openssl_cflags_static_32) $(openssl_cflags_static_64)))
Brian Carlstrom155e0cc2014-02-03 15:07:09 -080027$(error ZLIB should not be enabled in openssl configuration)
28endif
29
Colin Crossb95c4f92014-01-29 23:14:38 -080030LOCAL_CFLAGS_32 += $(openssl_cflags_32)
31LOCAL_CFLAGS_64 += $(openssl_cflags_64)
Benoit Goby96a090c2012-08-21 12:06:33 -070032
Colin Crossb95c4f92014-01-29 23:14:38 -080033LOCAL_CFLAGS_32 := $(filter-out -DTERMIO, $(LOCAL_CFLAGS_32))
34LOCAL_CFLAGS_64 := $(filter-out -DTERMIO, $(LOCAL_CFLAGS_64))
Alex Ray25ffdb22014-03-21 14:28:27 -070035# filter out static flags too
36openssl_cflags_static_32 := $(filter-out -DTERMIO, $(openssl_cflags_static_32))
37openssl_cflags_static_64 := $(filter-out -DTERMIO, $(openssl_cflags_static_64))
David 'Digit' Turner9fbf99a2013-02-19 10:38:34 +010038
39ifeq ($(HOST_OS),windows)
Colin Crossb95c4f92014-01-29 23:14:38 -080040LOCAL_CFLAGS_32 := $(filter-out -DDSO_DLFCN -DHAVE_DLFCN_H,$(LOCAL_CFLAGS_32))
41LOCAL_CFLAGS_64 := $(filter-out -DDSO_DLFCN -DHAVE_DLFCN_H,$(LOCAL_CFLAGS_64))
Benoit Goby96a090c2012-08-21 12:06:33 -070042endif
Brian Carlstrom98d58bb2010-03-09 09:56:55 -080043
Colin Cross85a3a632014-02-03 13:26:44 -080044LOCAL_CFLAGS += -Wno-missing-field-initializers -Wno-unused-parameter
Brian Carlstrom40278932012-08-29 15:40:03 -070045
Brian Carlstrom92362632010-07-08 16:37:18 -070046# Debug
47# LOCAL_CFLAGS += -DCIPHER_DEBUG
Kenny Root9d6b6912013-02-08 16:29:48 -080048
49# Add clang here when it works on host
50# LOCAL_CLANG := true