diff options
Diffstat (limited to 'build/android/Makefile')
-rw-r--r-- | build/android/Makefile | 74 |
1 files changed, 4 insertions, 70 deletions
diff --git a/build/android/Makefile b/build/android/Makefile index b6a27450c..478a4690f 100644 --- a/build/android/Makefile +++ b/build/android/Makefile @@ -106,13 +106,6 @@ CURL_TIMESTAMP = $(CURL_DIR)/timestamp CURL_TIMESTAMP_INT = $(ANDR_ROOT)/deps/curl_timestamp CURL_URL_HTTP = https://curl.haxx.se/download/curl-${CURL_VERSION}.tar.bz2 -GMP_VERSION = 6.1.2 -GMP_DIR = $(ANDR_ROOT)/deps/gmp-$(GMP_VERSION) -GMP_LIB = $(GMP_DIR)/usr/lib/libgmp.so -GMP_TIMESTAMP = $(GMP_DIR)/timestamp -GMP_TIMESTAMP_INT = $(ANDR_ROOT)/deps/gmp_timestamp -GMP_URL_HTTP = https://gmplib.org/download/gmp/gmp-$(GMP_VERSION).tar.bz2 - FREETYPE_DIR = $(ANDR_ROOT)/deps/freetype2-android/ FREETYPE_LIB = $(FREETYPE_DIR)/Android/obj/local/$(TARGET_ABI)/libfreetype2-static.a FREETYPE_TIMESTAMP = $(FREETYPE_DIR)timestamp @@ -297,7 +290,7 @@ openssl_download : openssl : $(OPENSSL_LIB) -$(OPENSSL_LIB): $(OPENSSL_TIMESTAMP) $(GMP_LIB) +$(OPENSSL_LIB): $(OPENSSL_TIMESTAMP) @REFRESH=0; \ if [ ! -e ${OPENSSL_TIMESTAMP_INT} ] ; then \ echo "${OPENSSL_TIMESTAMP_INT} doesn't exist"; \ @@ -319,8 +312,8 @@ $(OPENSSL_LIB): $(OPENSSL_TIMESTAMP) $(GMP_LIB) export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \ export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \ export LDFLAGS="$${LDFLAGS} ${TARGET_LDFLAGS_ADDON}"; \ - CC=${CROSS_CC} ./Configure enable-gmp no-asm -DL_ENDIAN -I${GMP_DIR} \ - -L${GMP_DIR}/usr/lib android-${TARGET_ARCH} -D__ANDROID_API__=$(API); \ + CC=${CROSS_CC} ./Configure -DL_ENDIAN android-${TARGET_ARCH} \ + -D__ANDROID_API__=$(API); \ CC=${CROSS_CC} ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make depend; \ CC=${CROSS_CC} ANDROID_DEV=/tmp/ndk-${TARGET_HOST} make build_libs; \ touch ${OPENSSL_TIMESTAMP}; \ @@ -617,65 +610,6 @@ $(CURL_LIB): $(CURL_TIMESTAMP) $(OPENSSL_LIB) clean_curl : ./gradlew cleanCURL -$(GMP_TIMESTAMP) : gmp_download - @LAST_MODIF=$$(find ${GMP_DIR} -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \ - if [ $$(basename $$LAST_MODIF) != "timestamp" ] ; then \ - touch ${GMP_TIMESTAMP}; \ - fi - -gmp_download : - @if [ ! -d "${GMP_DIR}" ] ; then \ - echo "gmp sources missing, downloading..."; \ - mkdir -p ${ANDR_ROOT}/deps; \ - cd deps; \ - wget ${GMP_URL_HTTP} || exit 1; \ - tar -xjf gmp-${GMP_VERSION}.tar.bz2 || exit 1; \ - rm gmp-${GMP_VERSION}.tar.bz2; \ - ln -s gmp-${GMP_VERSION} gmp; \ - fi - -gmp : $(GMP_LIB) - -$(GMP_LIB): $(GMP_TIMESTAMP) - @REFRESH=0; \ - if [ ! -e ${GMP_TIMESTAMP_INT} ] ; then \ - REFRESH=1; \ - fi; \ - if [ ! -e ${GMP_LIB} ] ; then \ - REFRESH=1; \ - fi; \ - if [ ${GMP_TIMESTAMP} -nt ${GMP_TIMESTAMP_INT} ] ; then \ - REFRESH=1; \ - fi; \ - if [ $$REFRESH -ne 0 ] ; then \ - mkdir -p ${GMP_DIR}; \ - echo "changed timestamp for gmp detected building..."; \ - cd deps/gmp-${GMP_VERSION}; \ - export CROSS_PREFIX=${TARGET_TOOLCHAIN}; \ - export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-gmp; \ - ${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \ - --toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \ - --platform=${APP_PLATFORM} \ - --stl=libc++ \ - --install-dir=$${TOOLCHAIN}; \ - export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \ - export CC=${CROSS_CC}; \ - export CXX=${CROSS_CXX}; \ - export LDFLAGS="$${LDFLAGS} ${TARGET_LDFLAGS_ADDON}"; \ - export LIBGMP_LDFLAGS="-avoid-version"; \ - export LIBGMPXX_LDFLAGS="-avoid-version"; \ - ./configure --disable-static --host=${TARGET_HOST} --prefix=/usr; \ - $(MAKE) install DESTDIR=/${GMP_DIR} || exit 1; \ - touch ${GMP_TIMESTAMP}; \ - touch ${GMP_TIMESTAMP_INT}; \ - $(RM) -rf $${TOOLCHAIN}; \ - else \ - echo "nothing to be done for gmp"; \ - fi - -clean_gmp: - ./gradlew cleanGMP - sqlite3_download: deps/${SQLITE3_FOLDER}/sqlite3.c deps/${SQLITE3_FOLDER}/sqlite3.c : @@ -747,7 +681,7 @@ assets : $(ASSETS_TIMESTAMP) clean_assets : ./gradlew cleanAssets -apk: local.properties assets $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(GMP_LIB) $(LEVELDB_TARGET) \ +apk: local.properties assets $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(LEVELDB_TARGET) \ $(OPENAL_LIB) $(OGG_LIB) prep_srcdir $(ANDR_ROOT)/jni/src/android_version.h \ $(ANDR_ROOT)/jni/src/android_version_githash.h sqlite3_download + @export TARGET_LIBDIR=${TARGET_LIBDIR}; \ |