This commit is contained in:
Maksim Gamarnik 2016-02-12 05:10:44 +02:00
parent e5b0d4b95c
commit 4a1647fcf4
2 changed files with 83 additions and 113 deletions

View File

@ -3,7 +3,7 @@
# compile with GPROF
# GPROF = 1
# build for build platform
# build for build platform
APP_PLATFORM = android-16
# paths used for timestaps, dependencys, tree config and libs
@ -20,7 +20,7 @@ TARGET_HOST = arm-linux
TARGET_HOST2 = arm-linux
TARGET_ABI = armeabi-v7a-hard
TARGET_LIBDIR = armeabi-v7a
TARGET_TOOLCHAIN = arm-linux-androideabi
TARGET_TOOLCHAIN = arm-linux-androideabi-
TARGET_CFLAGS_ADDON = -D_NDK_MATH_NO_SOFTFP=1 -mfloat-abi=hard -Ofast -march=armv7-a
TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON)
TARGET_LDFLAGS_ADDON = -Wl,--no-warn-mismatch -lm_hard
@ -37,7 +37,7 @@ HAVE_LEVELDB = 0
# TARGET_HOST2 = arm-linux
# TARGET_ABI = arm64-v8a
# TARGET_LIBDIR = arm64-v8a
# TARGET_TOOLCHAIN = aarch64-linux-android
# TARGET_TOOLCHAIN = aarch64-linux-android-
# TARGET_CFLAGS_ADDON = -Ofast
# TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON)
# TARGET_ARCH = arm64
@ -53,7 +53,7 @@ HAVE_LEVELDB = 0
# TARGET_HOST2 = x86-linux
# TARGET_ABI = x86
# TARGET_LIBDIR = x86
# TARGET_TOOLCHAIN = x86
# TARGET_TOOLCHAIN = x86-
# TARGET_CFLAGS_ADDON = -Ofast
# TARGET_CXXFLAGS_ADDON = $(TARGET_CFLAGS_ADDON)
# TARGET_ARCH = x86
@ -71,12 +71,11 @@ LEVELDB_TIMESTAMP = $(LEVELDB_DIR)/timestamp
LEVELDB_TIMESTAMP_INT = $(ROOT)/deps/leveldb_timestamp
LEVELDB_URL_GIT = https://github.com/google/leveldb
OPENAL_VERSION = 1.17.2
OPENAL_DIR = $(ROOT)/deps/openal-soft-$(OPENAL_VERSION)
OPENAL_LIB = $(OPENAL_DIR)/build/libopenal.so
OPENAL_DIR = $(ROOT)/deps/openal-soft/
OPENAL_LIB = $(OPENAL_DIR)libs/$(TARGET_ABI)/libopenal.so
OPENAL_TIMESTAMP = $(OPENAL_DIR)/timestamp
OPENAL_TIMESTAMP_INT = $(ROOT)/deps/openal_timestamp
OPENAL_URL_HTTP = http://kcat.strangesoft.net/openal-releases/openal-soft-$(OPENAL_VERSION).tar.bz2
OPENAL_URL_GIT = https://github.com/apportable/openal-soft
OGG_DIR = $(ROOT)/deps/libvorbis-libogg-android/
OGG_LIB = $(OGG_DIR)libs/$(TARGET_ABI)/libogg.so
@ -187,16 +186,16 @@ delconfig :
$(PATHCFGFILE) :
@echo "Please specify path of ANDROID NDK"; \
echo "e.g. /home/user/android-ndk-r10e/"; \
echo "e.g. /home/user/android-ndk-r10e/"; \
read ANDROID_NDK ; \
if [ ! -d $$ANDROID_NDK ] ; then \
echo "$$ANDROID_NDK is not a valid folder"; \
exit 1; \
fi; \
echo "ANDROID_NDK = $$ANDROID_NDK" > ${PATHCFGFILE}; \
echo "NDK_MODULE_PATH = $$ANDROID_NDK/toolchains" >> ${PATHCFGFILE}; \
echo "NDK_MODULE_PATH = $$ANDROID_NDK/toolchains" >> ${PATHCFGFILE}; \
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";\
echo "+ Note: NDK_MODULE_PATH is set to $$ANDROID_NDK/toolchains"; \
echo "+ Note: NDK_MODULE_PATH is set to $$ANDROID_NDK/toolchains"; \
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";\
echo "Please specify path of ANDROID SDK"; \
echo "e.g. /home/user/adt-bundle-linux-x86_64-20131030/sdk/"; \
@ -210,64 +209,38 @@ $(PATHCFGFILE) :
$(OPENAL_TIMESTAMP) : openal_download
@LAST_MODIF=$$(find ${OPENAL_DIR} -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
if [ $$(basename $$LAST_MODIF) != "timestamp" ] ; then \
touch ${OPENAL_TIMESTAMP}; \
touch ${OPENAL_TIMESTAMP}; \
fi
openal_download :
@if [ ! -d "${OPENAL_DIR}" ] ; then \
@if [ ! -d ${OPENAL_DIR} ] ; then \
echo "openal sources missing, downloading..."; \
mkdir -p ${ROOT}/deps; \
cd deps; \
wget ${OPENAL_URL_HTTP} || exit 1; \
tar -xjf openal-soft-${OPENAL_VERSION}.tar.bz2 || exit 1; \
rm openal-soft-${OPENAL_VERSION}.tar.bz2; \
ln -s openal-soft-${OPENAL_VERSION} openal; \
cd openal; \
patch -p1 < ../../openal_soundcard.patch || exit 1; \
patch -p1 < ../../openal_cmake.patch || exit 1; \
cd ${ROOT}/deps ; \
git clone ${OPENAL_URL_GIT} || exit 1; \
fi
openal : $(OPENAL_LIB)
$(OPENAL_LIB) : $(OPENAL_TIMESTAMP)
+ @REFRESH=0; \
$(OPENAL_LIB): $(OPENAL_TIMESTAMP)
+ @REFRESH=0; \
if [ ! -e ${OPENAL_TIMESTAMP_INT} ] ; then \
REFRESH=1; \
fi; \
if [ ! -e ${OPENAL_LIB} ] ; then \
REFRESH=1; \
fi; \
if [ ${OPENAL_TIMESTAMP} -nt ${OPENAL_TIMESTAMP_INT} ] ; then \
REFRESH=1; \
fi; \
if [ $$REFRESH -ne 0 ] ; then \
mkdir -p ${OPENAL_DIR}; \
export PATH=$$PATH:${SDKFOLDER}/platform-tools:${ANDROID_NDK}; \
echo "changed timestamp for openal detected building..."; \
cd deps/openal-soft-${OPENAL_VERSION}/build; \
export CROSS_PREFIX=${CROSS_PREFIX}; \
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-openal; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \
--install-dir=$${TOOLCHAIN}; \
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
export CXX=${CROSS_PREFIX}g++; \
export CC=${CROSS_PREFIX}gcc; \
export AR=${CROSS_PREFIX}ar; \
export LD=${CROSS_PREFIX}ld; \
export AS=${CROSS_PREFIX}as; \
export NM=${CROSS_PREFIX}nm; \
export STRIP=${CROSS_PREFIX}strip; \
export RANLIB=${CROSS_PREFIX}ranlib; \
export OBJDUMP=${CROSS_PREFIX}objdump; \
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile-Android.txt \
-DHOST=${TARGET_TOOLCHAIN} -DTOOLCHAIN=${TOOLCHAIN} \
-DALSOFT_EXAMPLES=0 -DALSOFT_UTILS=0 -DALSOFT_HRTF_DEFS=0 || exit 1; \
$(MAKE) -s || exit 1; \
cd ${OPENAL_DIR}; \
ndk-build NDEBUG=${NDEBUG} NDK_MODULE_PATH=${NDK_MODULE_PATH} \
APP_ABI=${TARGET_ABI} TARGET_ARCH_ABI=${TARGET_ABI} \
APP_PLATFORM=${APP_PLATFORM} TARGET_CFLAGS+="${TARGET_CFLAGS_ADDON}" \
TARGET_LDFLAGS+="${TARGET_LDFLAGS_ADDON}" \
TARGET_CXXFLAGS+="${TARGET_CXXFLAGS_ADDON}" || exit 1; \
touch ${OPENAL_TIMESTAMP}; \
touch ${OPENAL_TIMESTAMP_INT}; \
$(RM) -rf $${TOOLCHAIN}; \
else \
echo "nothing to be done for openal"; \
fi
@ -354,7 +327,7 @@ $(OPENSSL_LIB): $(OPENSSL_TIMESTAMP) $(GMP_LIB)
ln -s ${OPENSSL_DIR} ../openssl; \
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-openssl; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--install-dir=$${TOOLCHAIN}; \
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
CC=${CROSS_PREFIX}gcc ./Configure enable-gmp -DL_ENDIAN -I${GMP_DIR} -L${GMP_DIR}/usr/lib android-${TARGET_ARCH};\
@ -364,7 +337,7 @@ $(OPENSSL_LIB): $(OPENSSL_TIMESTAMP) $(GMP_LIB)
touch ${OPENSSL_TIMESTAMP_INT}; \
$(RM) -rf $${TOOLCHAIN}; \
else \
echo "nothing to be done for openssl"; \
echo "nothing to be done for openssl"; \
fi
clean_openssl :
@ -403,7 +376,7 @@ $(LEVELDB_LIB): $(LEVELDB_TIMESTAMP)
export CROSS_PREFIX=${CROSS_PREFIX}; \
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-leveldb; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--install-dir=$${TOOLCHAIN}; \
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
export CC=${CROSS_PREFIX}gcc; \
@ -426,8 +399,8 @@ clean_leveldb :
$(FREETYPE_TIMESTAMP) : freetype_download
@LAST_MODIF=$$(find ${FREETYPE_DIR} -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
if [ $$(basename $$LAST_MODIF) != "timestamp" ] ; then \
touch ${FREETYPE_TIMESTAMP}; \
if [ $$(basename $$LAST_MODIF) != "timestamp" ] ; then \
touch ${FREETYPE_TIMESTAMP}; \
fi
freetype_download :
@ -462,7 +435,7 @@ $(FREETYPE_LIB) : $(FREETYPE_TIMESTAMP)
export CROSS_PREFIX=${CROSS_PREFIX}; \
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-freetype; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--install-dir=$${TOOLCHAIN}; \
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
export CXX=${CROSS_PREFIX}g++; \
@ -475,9 +448,10 @@ $(FREETYPE_LIB) : $(FREETYPE_TIMESTAMP)
export RANLIB=${CROSS_PREFIX}ranlib; \
export OBJDUMP=${CROSS_PREFIX}objdump; \
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
CC=${CROSS_PREFIX}gcc ./configure --host=${TARGET_TOOLCHAIN} \
CC=${CROSS_PREFIX}gcc ./configure --host=${TARGET_HOST}-androideabi \
--prefix=${TOOLCHAIN} --with-png=no --with-harfbuzz=no || exit 1; \
CC=${CROSS_PREFIX}gcc ANDROID_DEV=/tmp/ndk-${TARGET_HOST}-freetype make || exit 1; \
# $(MAKE) -s || exit 1; \
touch ${FREETYPE_TIMESTAMP}; \
touch ${FREETYPE_TIMESTAMP_INT}; \
$(RM) -rf $${TOOLCHAIN}; \
@ -491,11 +465,11 @@ clean_freetype :
$(ICONV_TIMESTAMP) : iconv_download
@LAST_MODIF=$$(find ${ICONV_DIR} -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
if [ $$(basename $$LAST_MODIF) != "timestamp" ] ; then \
touch ${ICONV_TIMESTAMP}; \
touch ${ICONV_TIMESTAMP}; \
fi
iconv_download :
@if [ ! -d ${ICONV_DIR} ] ; then \
@if [ ! -d ${ICONV_DIR} ] ; then \
echo "iconv sources missing, downloading..."; \
mkdir -p ${ROOT}/deps; \
cd ${ROOT}/deps; \
@ -513,28 +487,29 @@ iconv : $(ICONV_LIB)
$(ICONV_LIB) : $(ICONV_TIMESTAMP)
@REFRESH=0; \
if [ ! -e ${ICONV_TIMESTAMP_INT} ] ; then \
REFRESH=1; \
REFRESH=1; \
fi; \
if [ ! -e ${ICONV_LIB} ] ; then \
REFRESH=1; \
REFRESH=1; \
fi; \
if [ ${ICONV_TIMESTAMP} -nt ${ICONV_TIMESTAMP_INT} ] ; then \
REFRESH=1; \
REFRESH=1; \
fi; \
if [ $$REFRESH -ne 0 ] ; then \
mkdir -p ${ICONV_DIR}; \
export PATH=$$PATH:${SDKFOLDER}/platform-tools:${ANDROID_NDK}; \
echo "changed timestamp for iconv detected building..."; \
cd ${ICONV_DIR}; \
\
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-iconv; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--install-dir=$${TOOLCHAIN}; \
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
export CC=${CROSS_PREFIX}gcc; \
export CXX=${CROSS_PREFIX}g++; \
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
./configure --host=${TARGET_HOST2} || exit 1; \
./configure --host=${TARGET_HOST2} || exit 1; \
sed -i 's/LIBICONV_VERSION_INFO) /LIBICONV_VERSION_INFO) -avoid-version /g' lib/Makefile; \
grep "iconv_LDFLAGS" src/Makefile; \
$(MAKE) -s || exit 1; \
@ -542,7 +517,7 @@ $(ICONV_LIB) : $(ICONV_TIMESTAMP)
touch ${ICONV_TIMESTAMP_INT}; \
rm -rf ${TOOLCHAIN}; \
else \
echo "nothing to be done for iconv"; \
echo "nothing to be done for iconv"; \
fi
clean_iconv :
@ -574,7 +549,7 @@ $(IRRLICHT_TIMESTAMP) : irrlicht_download
irrlicht : $(IRRLICHT_LIB)
$(IRRLICHT_LIB): $(IRRLICHT_TIMESTAMP) $(FREETYPE_LIB)
+ @REFRESH=0; \
+ @REFRESH=0; \
if [ ! -e ${IRRLICHT_TIMESTAMP_INT} ] ; then \
REFRESH=1; \
fi; \
@ -641,7 +616,7 @@ $(CURL_LIB): $(CURL_TIMESTAMP) $(OPENSSL_LIB)
export CROSS_PREFIX=${CROSS_PREFIX}; \
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-curl; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--install-dir=$${TOOLCHAIN}; \
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
export CC=${CROSS_PREFIX}gcc; \
@ -667,11 +642,11 @@ clean_curl :
$(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}; \
touch ${GMP_TIMESTAMP}; \
fi
gmp_download :
@if [ ! -d "${GMP_DIR}" ] ; then \
@if [ ! -d "${GMP_DIR}" ] ; then \
echo "gmp sources missing, downloading..."; \
mkdir -p ${ROOT}/deps; \
cd deps; \
@ -686,13 +661,13 @@ gmp : $(GMP_LIB)
$(GMP_LIB): $(GMP_TIMESTAMP)
@REFRESH=0; \
if [ ! -e ${GMP_TIMESTAMP_INT} ] ; then \
REFRESH=1; \
REFRESH=1; \
fi; \
if [ ! -e ${GMP_LIB} ] ; then \
REFRESH=1; \
REFRESH=1; \
fi; \
if [ ${GMP_TIMESTAMP} -nt ${GMP_TIMESTAMP_INT} ] ; then \
REFRESH=1; \
REFRESH=1; \
fi; \
if [ $$REFRESH -ne 0 ] ; then \
mkdir -p ${GMP_DIR}; \
@ -702,7 +677,7 @@ $(GMP_LIB): $(GMP_TIMESTAMP)
export CROSS_PREFIX=${CROSS_PREFIX}; \
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-gmp; \
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
--toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \
--toolchain=${TARGET_TOOLCHAIN}${COMPILER_VERSION} \
--install-dir=$${TOOLCHAIN}; \
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
export CC=${CROSS_PREFIX}gcc; \
@ -715,7 +690,7 @@ $(GMP_LIB): $(GMP_TIMESTAMP)
touch ${GMP_TIMESTAMP_INT}; \
$(RM) -rf $${TOOLCHAIN}; \
else \
echo "nothing to be done for gmp"; \
echo "nothing to be done for gmp"; \
fi
clean_gmp:
@ -735,15 +710,15 @@ clean_sqlite3:
$(RM) -f sqlite
$(ASSETS_TIMESTAMP) : $(IRRLICHT_LIB)
@mkdir -p ${ROOT}/deps; \
for DIRNAME in {builtin,client,doc,fonts,games,mods,po,textures}; do \
@mkdir -p ${ROOT}/deps; \
for DIRNAME in {builtin,client,doc,fonts,games,mods,po,textures}; do \
LAST_MODIF=$$(find ${ROOT}/../../${DIRNAME} -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
if [ $$(basename $$LAST_MODIF) != "timestamp" ]; then \
touch ${ROOT}/../../${DIRNAME}/timestamp; \
touch ${ASSETS_TIMESTAMP}; \
echo ${DIRNAME} changed $$LAST_MODIF; \
fi; \
done; \
if [ $$(basename $$LAST_MODIF) != "timestamp" ]; then \
touch ${ROOT}/../../${DIRNAME}/timestamp; \
touch ${ASSETS_TIMESTAMP}; \
echo ${DIRNAME} changed $$LAST_MODIF; \
fi; \
done; \
LAST_MODIF=$$(find ${IRRLICHT_DIR}/media -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "); \
if [ $$(basename $$LAST_MODIF) != "timestamp" ] ; then \
touch ${IRRLICHT_DIR}/media/timestamp; \
@ -753,7 +728,7 @@ $(ASSETS_TIMESTAMP) : $(IRRLICHT_LIB)
echo "conf changed"; \
touch ${ASSETS_TIMESTAMP}; \
fi; \
if [ ${ROOT}/../../README.md -nt ${ASSETS_TIMESTAMP} ] ; then \
if [ ${ROOT}/../../README.md -nt ${ASSETS_TIMESTAMP} ] ; then \
touch ${ASSETS_TIMESTAMP}; \
fi; \
if [ ! -e $(ASSETS_TIMESTAMP) ] ; then \
@ -774,14 +749,14 @@ assets : $(ASSETS_TIMESTAMP)
if [ $$REFRESH -ne 0 ] ; then \
echo "assets changed, refreshing..."; \
$(MAKE) clean_assets; \
mkdir -p ${ROOT}/assets/MultiCraft; \
cp ${ROOT}/../../multicraft.conf.example ${ROOT}/assets/MultiCraft; \
cp ${ROOT}/../../README.md ${ROOT}/assets/MultiCraft; \
cp -r ${ROOT}/../../builtin ${ROOT}/assets/MultiCraft; \
mkdir ${ROOT}/assets/MultiCraft/fonts; \
cp -r ${ROOT}/../../fonts/*.ttf ${ROOT}/assets/MultiCraft/fonts/; \
cp -r ${ROOT}/../../games ${ROOT}/assets/MultiCraft; \
cp -r ${ROOT}/../../textures ${ROOT}/assets/MultiCraft; \
mkdir -p ${ROOT}/assets/MultiCraft; \
cp ${ROOT}/../../multicraft.conf.example ${ROOT}/assets/MultiCraft; \
cp ${ROOT}/../../README.md ${ROOT}/assets/MultiCraft; \
cp -r ${ROOT}/../../builtin ${ROOT}/assets/MultiCraft; \
mkdir ${ROOT}/assets/MultiCraft/fonts; \
cp -r ${ROOT}/../../fonts/*.ttf ${ROOT}/assets/MultiCraft/fonts/; \
cp -r ${ROOT}/../../games ${ROOT}/assets/MultiCraft; \
cp -r ${ROOT}/../../textures ${ROOT}/assets/MultiCraft; \
cd ${ROOT}/assets || exit 1; \
find . -name "timestamp" -exec rm {} \; ; \
find . -name "*.blend" -exec rm {} \; ; \
@ -790,12 +765,12 @@ assets : $(ASSETS_TIMESTAMP)
find . -type d -path "*.svn" -exec rm -rf {} \; ; \
find . -type f -path "*.gitignore" -exec rm -rf {} \; ; \
ls -R | grep ":$$" | sed -e 's/:$$//' -e 's/\.//' -e 's/^\///' > "index.txt"; \
find MultiCraft >"filelist.txt"; \
find MultiCraft >"filelist.txt"; \
cp ${ROOT}/${ASSETS_TIMESTAMP} ${ROOT}/${ASSETS_TIMESTAMP}.old; \
echo "Creating Files.zip"; \
zip -r Files.zip MultiCraft; \
else \
echo "nothing to be done for assets"; \
echo "Creating Files.zip"; \
zip -r Files.zip MultiCraft; \
else \
echo "nothing to be done for assets"; \
fi
clean_assets :
@ -816,12 +791,12 @@ apk: $(PATHCFGFILE) assets $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(GMP_LIB) $
TARGET_LDFLAGS+="${TARGET_LDFLAGS_ADDON}" \
TARGET_CXXFLAGS+="${TARGET_CXXFLAGS_ADDON}" && \
# ant $$BUILD_TYPE && \
echo " Success! =)" \
# echo "APK: bin/MultiCraft-$$BUILD_TYPE.apk" && \
echo " Success! =)" \
# echo "APK: bin/MultiCraft-$$BUILD_TYPE.apk" && \
prep_srcdir :
@if [ ! -e ${ROOT}/jni/src ]; then \
ln -s ${ROOT}/../../src ${ROOT}/jni/src; \
ln -s ${ROOT}/../../src ${ROOT}/jni/src; \
fi
clean_apk : manifest
@ -860,10 +835,10 @@ $(ROOT)/jni/src/android_version_githash.h : prep_srcdir
echo "#endif"; \
} > "$${VERSION_FILE_NEW}"; \
if ! cmp -s $${VERSION_FILE} $${VERSION_FILE_NEW}; then \
echo "android_version_githash.h changed, updating..."; \
mv "$${VERSION_FILE_NEW}" "$${VERSION_FILE}"; \
echo "android_version_githash.h changed, updating..."; \
mv "$${VERSION_FILE_NEW}" "$${VERSION_FILE}"; \
else \
rm "$${VERSION_FILE_NEW}"; \
rm "$${VERSION_FILE_NEW}"; \
fi
@ -876,15 +851,15 @@ $(ROOT)/jni/src/android_version.h : prep_srcdir
echo "#define VERSION_MAJOR ${VERSION_MAJOR}"; \
echo "#define VERSION_MINOR ${VERSION_MINOR}"; \
echo "#define VERSION_PATCH ${VERSION_PATCH}"; \
echo "#define VERSION_STRING STR(VERSION_MAJOR) \".\" STR(VERSION_MINOR) \
echo "#define VERSION_STRING STR(VERSION_MAJOR) \".\" STR(VERSION_MINOR) \
\".\" STR(VERSION_PATCH)"; \
echo "#endif"; \
} > $${VERSION_FILE_NEW}; \
if ! cmp -s $${VERSION_FILE} $${VERSION_FILE_NEW}; then \
echo "android_version.h changed, updating..."; \
mv "$${VERSION_FILE_NEW}" "$${VERSION_FILE}"; \
echo "android_version.h changed, updating..."; \
mv "$${VERSION_FILE_NEW}" "$${VERSION_FILE}"; \
else \
rm "$${VERSION_FILE_NEW}"; \
rm "$${VERSION_FILE_NEW}"; \
fi
manifest :

View File

@ -31,7 +31,7 @@ include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := openal
LOCAL_SRC_FILES := deps/openal/build/libopenal.so
LOCAL_SRC_FILES := deps/openal-soft/libs/$(TARGET_LIBDIR)/libopenal.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
@ -44,11 +44,6 @@ LOCAL_MODULE := vorbis
LOCAL_SRC_FILES := deps/libvorbis-libogg-android/libs/$(TARGET_LIBDIR)/libvorbis.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := vorbisfile
LOCAL_SRC_FILES := deps/libvorbis/lib/.libs/libvorbisfile.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := gmp
LOCAL_SRC_FILES := deps/gmp/usr/lib/libgmp.so
@ -110,7 +105,7 @@ LOCAL_C_INCLUDES := \
deps/libiconv/include \
deps/freetype/include \
deps/curl/include \
deps/openal/include \
deps/openal-soft/jni/OpenAL/include \
deps/libvorbis-libogg-android/jni/include \
deps/gmp/usr/include \
deps/leveldb/include \
@ -363,7 +358,7 @@ LOCAL_SRC_FILES += \
# JSONCPP
LOCAL_SRC_FILES += jni/src/json/jsoncpp.cpp
LOCAL_SHARED_LIBRARIES := iconv openal ogg vorbis vorbisfile gmp
LOCAL_SHARED_LIBRARIES := iconv openal ogg vorbis gmp
LOCAL_STATIC_LIBRARIES := Irrlicht freetype curl ssl crypto android_native_app_glue $(PROFILER_LIBS)
ifeq ($(HAVE_LEVELDB), 1)