-
Notifications
You must be signed in to change notification settings - Fork 17
/
android-config.mk
60 lines (50 loc) · 2.24 KB
/
android-config.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
# These flags represent the build-time configuration of OpenSSL for android
#
# The value of $(openssl_cflags) was pruned from the Makefile generated
# by running ./Configure from import_openssl.sh.
#
# This script performs minor but required patching for the Android build.
#
# Directories for ENGINE shared libraries
openssl_cflags_32 += \
-DOPENSSLDIR="\"/system/lib/ssl\"" \
-DENGINESDIR="\"/system/lib/ssl/engines\""
openssl_cflags_static_32 += \
-DOPENSSLDIR="\"/system/lib/ssl\"" \
-DENGINESDIR="\"/system/lib/ssl/engines\""
openssl_cflags_64 += \
-DOPENSSLDIR="\"/system/lib64/ssl\"" \
-DENGINESDIR="\"/system/lib64/ssl/engines\""
openssl_cflags_static_64 += \
-DOPENSSLDIR="\"/system/lib64/ssl\"" \
-DENGINESDIR="\"/system/lib64/ssl/engines\""
# Intentionally excluded http://b/7079965
ifneq (,$(filter -DZLIB, $(openssl_cflags_32) $(openssl_cflags_64) \
$(openssl_cflags_static_32) $(openssl_cflags_static_64)))
$(error ZLIB should not be enabled in openssl configuration)
endif
ifneq (,$(findstring cht,$(TARGET_PRODUCT)))
LOCAL_CFLAGS_linux_32 = $(LOCAL_CFLAGS_32) $(openssl_cflags_32)
LOCAL_CFLAGS_linux_64 = $(LOCAL_CFLAGS_64) $(openssl_cflags_64)
LOCAL_CFLAGS_linux_32 := $(filter-out -DTERMIO, $(LOCAL_CFLAGS_linux_32))
LOCAL_CFLAGS_linux_64 := $(filter-out -DTERMIO, $(LOCAL_CFLAGS_linux_64))
# filter out static flags too
openssl_cflags_static_32 := $(filter-out -DTERMIO, $(openssl_cflags_static_32))
openssl_cflags_static_64 := $(filter-out -DTERMIO, $(openssl_cflags_static_64))
LOCAL_CFLAGS_windows_32 := $(filter-out -DDSO_DLFCN -DHAVE_DLFCN_H,$(LOCAL_CFLAGS_linux_32))
LOCAL_CFLAGS_windows_64 := $(filter-out -DDSO_DLFCN -DHAVE_DLFCN_H,$(LOCAL_CFLAGS_linux_64))
else
LOCAL_CFLAGS_32 += $(openssl_cflags_32)
LOCAL_CFLAGS_64 += $(openssl_cflags_64)
LOCAL_CFLAGS_32 := $(filter-out -DTERMIO, $(LOCAL_CFLAGS_32))
LOCAL_CFLAGS_64 := $(filter-out -DTERMIO, $(LOCAL_CFLAGS_64))
# filter out static flags too
openssl_cflags_static_32 := $(filter-out -DTERMIO, $(openssl_cflags_static_32))
openssl_cflags_static_64 := $(filter-out -DTERMIO, $(openssl_cflags_static_64))
endif
LOCAL_CFLAGS += -Wno-missing-field-initializers -Wno-unused-parameter
# Debug
# LOCAL_CFLAGS += -DCIPHER_DEBUG
# Add clang here when it works on host
# LOCAL_CLANG := true