Fix broken android version due to new openssl not linking correct to curl

master
sapier 2015-01-05 00:48:33 +01:00
parent cd4d213ae0
commit a92c083011
2 changed files with 19 additions and 15 deletions

View File

@ -309,21 +309,24 @@ $(OPENSSL_LIB): $(OPENSSL_TIMESTAMP)
echo "changed timestamp for openssl detected building..."; \ echo "changed timestamp for openssl detected building..."; \
cd ${OPENSSL_DIR}; \ cd ${OPENSSL_DIR}; \
ln -s ${OPENSSL_DIR} ../openssl; \ ln -s ${OPENSSL_DIR} ../openssl; \
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}; \ export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-openssl; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \ ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \ --toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--install-dir=$${TOOLCHAIN} --system=linux-x86_64; \ --install-dir=$${TOOLCHAIN} --system=linux-x86_64; \
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \ export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
CC=${CROSS_PREFIX}gcc ./Configure -shared android-${TARGET_ARCH}; \ CC=${CROSS_PREFIX}gcc ./Configure android-${TARGET_ARCH} no-idea no-seed -no-sha0 -DL_ENDIAN;\
CC=${CROSS_PREFIX}gcc ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make all; \ CC=${CROSS_PREFIX}gcc ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make build_libs; \
touch ${OPENSSL_TIMESTAMP}; \ touch ${OPENSSL_TIMESTAMP}; \
touch ${OPENSSL_TIMESTAMP_INT}; \ touch ${OPENSSL_TIMESTAMP_INT}; \
$(RM) -rf $${TOOLCHAIN}; \
else \ else \
echo "nothing to be done for openssl"; \ echo "nothing to be done for openssl"; \
fi fi
clean_openssl : clean_openssl :
$(RM) -rf ${OPENSSL_DIR} $(RM) -rf ${OPENSSL_DIR}; \
$(RM) -rf $(ROOT)/deps/${OPENSSL_BASEDIR}.tar.gz; \
$(RM) -rf $(ROOT)/deps/openssl
$(LEVELDB_TIMESTAMP) : leveldb_download $(LEVELDB_TIMESTAMP) : leveldb_download
@LAST_MODIF=$$(find ${LEVELDB_DIR} -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \ @LAST_MODIF=$$(find ${LEVELDB_DIR} -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
@ -354,7 +357,7 @@ $(LEVELDB_LIB): $(LEVELDB_TIMESTAMP)
echo "changed timestamp for leveldb detected building..."; \ echo "changed timestamp for leveldb detected building..."; \
cd deps/leveldb; \ cd deps/leveldb; \
export CROSS_PREFIX=${CROSS_PREFIX}; \ export CROSS_PREFIX=${CROSS_PREFIX}; \
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}; \ export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-leveldb; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \ ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \ --toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--install-dir=$${TOOLCHAIN} --system=linux-x86_64; \ --install-dir=$${TOOLCHAIN} --system=linux-x86_64; \
@ -368,6 +371,7 @@ $(LEVELDB_LIB): $(LEVELDB_TIMESTAMP)
$(MAKE) -j${PARALLEL} -s || exit 1; \ $(MAKE) -j${PARALLEL} -s || exit 1; \
touch ${LEVELDB_TIMESTAMP}; \ touch ${LEVELDB_TIMESTAMP}; \
touch ${LEVELDB_TIMESTAMP_INT}; \ touch ${LEVELDB_TIMESTAMP_INT}; \
$(RM) -rf $${TOOLCHAIN}; \
else \ else \
echo "nothing to be done for leveldb"; \ echo "nothing to be done for leveldb"; \
fi fi
@ -511,7 +515,7 @@ $(CURL_LIB): $(CURL_TIMESTAMP) $(OPENSSL_LIB)
echo "changed timestamp for curl detected building..."; \ echo "changed timestamp for curl detected building..."; \
cd deps/curl-${CURL_VERSION}; \ cd deps/curl-${CURL_VERSION}; \
export CROSS_PREFIX=${CROSS_PREFIX}; \ export CROSS_PREFIX=${CROSS_PREFIX}; \
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}; \ export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-curl; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \ ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \ --toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--install-dir=$${TOOLCHAIN} --system=linux-x86_64; \ --install-dir=$${TOOLCHAIN} --system=linux-x86_64; \
@ -520,14 +524,14 @@ $(CURL_LIB): $(CURL_TIMESTAMP) $(OPENSSL_LIB)
export CXX=${CROSS_PREFIX}g++; \ export CXX=${CROSS_PREFIX}g++; \
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \ export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
export CPPFLAGS="$${CPPFLAGS} -I${OPENSSL_DIR}/include \ export CPPFLAGS="$${CPPFLAGS} -I${OPENSSL_DIR}/include \
-L${OPENSSL_DIR}/libs/${TARGET_ABI}/ ${TARGET_CFLAGS_ADDON}"; \ -L${OPENSSL_DIR} ${TARGET_CFLAGS_ADDON}"; \
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \ export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
export LDFLAGS="$${LDFLAGS} -L${OPENSSL_DIR}/libs/${TARGET_ABI}/ \ export LDFLAGS="$${LDFLAGS} -L${OPENSSL_DIR} ${TARGET_LDFLAGS_ADDON}"; \
${TARGET_LDFLAGS_ADDON}"; \
./configure --host=${TARGET_HOST} --disable-shared --enable-static --with-ssl; \ ./configure --host=${TARGET_HOST} --disable-shared --enable-static --with-ssl; \
$(MAKE) -j${PARALLEL} -s || exit 1; \ $(MAKE) -j${PARALLEL} -s || exit 1; \
touch ${CURL_TIMESTAMP}; \ touch ${CURL_TIMESTAMP}; \
touch ${CURL_TIMESTAMP_INT}; \ touch ${CURL_TIMESTAMP_INT}; \
$(RM) -rf $${TOOLCHAIN}; \
else \ else \
echo "nothing to be done for curl"; \ echo "nothing to be done for curl"; \
fi fi

View File

@ -41,13 +41,13 @@ include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := ssl LOCAL_MODULE := ssl
LOCAL_SRC_FILES := deps/openssl/libssl.so LOCAL_SRC_FILES := deps/openssl/libssl.a
include $(PREBUILT_SHARED_LIBRARY) include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := crypto LOCAL_MODULE := crypto
LOCAL_SRC_FILES := deps/openssl/libcrypto.so LOCAL_SRC_FILES := deps/openssl/libcrypto.a
include $(PREBUILT_SHARED_LIBRARY) include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS) include $(CLEAR_VARS)
@ -302,8 +302,8 @@ LOCAL_SRC_FILES += \
# json # json
LOCAL_SRC_FILES += jni/src/json/jsoncpp.cpp LOCAL_SRC_FILES += jni/src/json/jsoncpp.cpp
LOCAL_SHARED_LIBRARIES := openal ogg vorbis ssl crypto LOCAL_SHARED_LIBRARIES := openal ogg vorbis
LOCAL_STATIC_LIBRARIES := Irrlicht freetype curl android_native_app_glue $(PROFILER_LIBS) LOCAL_STATIC_LIBRARIES := Irrlicht freetype curl ssl crypto android_native_app_glue $(PROFILER_LIBS)
ifeq ($(HAVE_LEVELDB), 1) ifeq ($(HAVE_LEVELDB), 1)
LOCAL_STATIC_LIBRARIES += LevelDB LOCAL_STATIC_LIBRARIES += LevelDB