From 5a507f0bd14a22673692410ab71eb2f857f28828 Mon Sep 17 00:00:00 2001 From: FellowTraveler Date: Fri, 6 Dec 2013 04:01:27 -0600 Subject: [PATCH 1/2] Now it will build as a subproject. (It will also continue to work building as the main project.) I also added libssl_static. I also removed -ldl for libcrypto_static since it's ignored anyway and was causing a warning. Signed-off-by: FellowTraveler --- apps/Android.mk | 4 ++-- crypto/Android.mk | 11 +++++------ ssl/Android.mk | 16 +++++++++++++--- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/apps/Android.mk b/apps/Android.mk index 002025a0..f477b5e6 100644 --- a/apps/Android.mk +++ b/apps/Android.mk @@ -60,8 +60,8 @@ LOCAL_SHARED_LIBRARIES := \ libcrypto LOCAL_C_INCLUDES := \ - $(NDK_PROJECT_PATH) \ - $(NDK_PROJECT_PATH)/include + $(LOCAL_PATH)/.. \ + $(LOCAL_PATH)/../include LOCAL_CFLAGS := -DMONOLITH diff --git a/crypto/Android.mk b/crypto/Android.mk index 0487137b..de17c87a 100644 --- a/crypto/Android.mk +++ b/crypto/Android.mk @@ -471,11 +471,11 @@ local_src_files := \ x509v3/v3err.c local_c_includes := \ - $(NDK_PROJECT_PATH) \ - $(NDK_PROJECT_PATH)/crypto/asn1 \ - $(NDK_PROJECT_PATH)/crypto/evp \ - $(NDK_PROJECT_PATH)/include \ - $(NDK_PROJECT_PATH)/include/openssl + $(LOCAL_PATH)/.. \ + $(LOCAL_PATH)/asn1 \ + $(LOCAL_PATH)/evp \ + $(LOCAL_PATH)/../include \ + $(LOCAL_PATH)/../include/openssl local_c_flags := -DNO_WINDOWS_BRAINDEATH @@ -527,7 +527,6 @@ LOCAL_SRC_FILES += $(local_src_files) LOCAL_CFLAGS += $(local_c_flags) -DPURIFY LOCAL_C_INCLUDES += $(local_c_includes) LOCAL_SRC_FILES += $(non_arm_src_files) -LOCAL_LDLIBS += -ldl LOCAL_MODULE_TAGS := optional LOCAL_MODULE:= libcrypto_static include $(BUILD_STATIC_LIBRARY) diff --git a/ssl/Android.mk b/ssl/Android.mk index 6cc86cde..a06fc897 100644 --- a/ssl/Android.mk +++ b/ssl/Android.mk @@ -1,9 +1,9 @@ LOCAL_PATH:= $(call my-dir) local_c_includes := \ - $(NDK_PROJECT_PATH) \ - $(NDK_PROJECT_PATH)/include \ - $(NDK_PROJECT_PATH)/crypto + $(LOCAL_PATH)/.. \ + $(LOCAL_PATH)/../include \ + $(LOCAL_PATH)/../crypto local_src_files:= \ s2_meth.c \ @@ -64,6 +64,16 @@ ifeq ($(WITH_HOST_DALVIK),true) include $(BUILD_SHARED_LIBRARY) endif +#static +include $(CLEAR_VARS) +include $(LOCAL_PATH)/../android-config.mk +LOCAL_SRC_FILES += $(local_src_files) +LOCAL_CFLAGS += $(local_c_flags) -DPURIFY +LOCAL_C_INCLUDES += $(local_c_includes) +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE:= libssl_static +include $(BUILD_STATIC_LIBRARY) + # ssltest include $(CLEAR_VARS) include $(LOCAL_PATH)/../android-config.mk From 8d77df7be4f5075303d07dbdf68b52fda2b90e1e Mon Sep 17 00:00:00 2001 From: FellowTraveler Date: Fri, 6 Dec 2013 04:07:38 -0600 Subject: [PATCH 2/2] Removed TOOLCHAIN (it was preventing build.) Signed-off-by: FellowTraveler --- .gitignore | 2 ++ jni/Application.mk | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..e0c35b99 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +obj/ +libs/ diff --git a/jni/Application.mk b/jni/Application.mk index 29b33615..2202feea 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -1,3 +1,2 @@ -NDK_TOOLCHAIN_VERSION=4.4.3 APP_PROJECT_PATH := $(shell pwd) APP_BUILD_SCRIPT := $(APP_PROJECT_PATH)/Android.mk