Added some support for NDK r5, commented out cin/cout/cerr in built-in STLPort bercause they keep crashing
This commit is contained in:
@@ -523,7 +523,7 @@ cat project/src/Globals.java | \
|
||||
sed "s/public static int AppTouchscreenKeyboardKeysAmountAutoFire = .*;/public static int AppTouchscreenKeyboardKeysAmountAutoFire = $AppTouchscreenKeyboardKeysAmountAutoFire;/" | \
|
||||
sed "s%public static String ReadmeText = .*%public static String ReadmeText = \"$ReadmeText\".replace(\"^\",\"\\\n\");%" | \
|
||||
sed "s%public static String CommandLine = .*%public static String CommandLine = \"$AppCmdline\";%" | \
|
||||
sed "s/public LoadLibrary() .*/public LoadLibrary() { $LibrariesToLoad };/" > \
|
||||
sed "s/public LoadLibrary() .*/public LoadLibrary() { System.loadLibrary(\"stlport_shared\"); $LibrariesToLoad };/" > \
|
||||
project/src/Globals.java.1
|
||||
mv -f project/src/Globals.java.1 project/src/Globals.java
|
||||
|
||||
|
||||
@@ -6,7 +6,11 @@ endif
|
||||
|
||||
ifneq ($(findstring -crystax,$(TARGET_CC)),)
|
||||
$(info Building with CrystaX toolchain - RTTI and exceptions enabled, STLPort disabled)
|
||||
CRYSTAX_TOOLCHAIN=1
|
||||
CRYSTAX_TOOLCHAIN = 1
|
||||
endif
|
||||
ifneq ($(findstring android-ndk-r5,$(TARGET_CC)),)
|
||||
$(info Building with NDK r5 - internal STLPort disabled)
|
||||
NDK_R5_TOOLCHAIN = 1
|
||||
endif
|
||||
|
||||
include $(call all-subdir-makefiles)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
APP_PROJECT_PATH := $(call my-dir)/..
|
||||
|
||||
APP_STL := stlport_shared
|
||||
|
||||
include jni/Settings.mk
|
||||
|
||||
|
||||
@@ -16,15 +16,11 @@ endif
|
||||
|
||||
LOCAL_CFLAGS :=
|
||||
|
||||
ifeq ($(CRYSTAX_TOOLCHAIN),)
|
||||
# Paths should be on newline so launchConfigure.sh will work properly
|
||||
LOCAL_CFLAGS += \
|
||||
-I$(LOCAL_PATH)/../stlport/stlport
|
||||
ifeq ($(CRYSTAX_TOOLCHAIN)$(NDK_R5_TOOLCHAIN),)
|
||||
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../stlport/stlport
|
||||
endif
|
||||
|
||||
# Paths should be on newline so launchConfigure.sh will work properly
|
||||
LOCAL_CFLAGS += \
|
||||
$(foreach D, $(APP_SUBDIRS), -I$(LOCAL_PATH)/$(D)) \
|
||||
LOCAL_CFLAGS += $(foreach D, $(APP_SUBDIRS), -I$(LOCAL_PATH)/$(D)) \
|
||||
-I$(LOCAL_PATH)/../sdl-$(SDL_VERSION)/include \
|
||||
$(foreach L, $(COMPILED_LIBRARIES), -I$(LOCAL_PATH)/../$(L)/include)
|
||||
|
||||
@@ -42,17 +38,26 @@ endif
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := sdl-$(SDL_VERSION) $(filter-out $(APP_AVAILABLE_STATIC_LIBS), $(COMPILED_LIBRARIES))
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := stlport $(filter $(APP_AVAILABLE_STATIC_LIBS), $(COMPILED_LIBRARIES))
|
||||
LOCAL_STATIC_LIBRARIES := $(filter $(APP_AVAILABLE_STATIC_LIBS), $(COMPILED_LIBRARIES))
|
||||
|
||||
ifneq ($(NDK_R5_TOOLCHAIN),)
|
||||
LOCAL_STATIC_LIBRARIES += stlport
|
||||
else
|
||||
LOCAL_SHARED_LIBRARIES += stlport_shared
|
||||
endif
|
||||
|
||||
LOCAL_LDLIBS := -lGLESv1_CM -ldl -llog -lz
|
||||
ifneq ($(NDK_R5_TOOLCHAIN),)
|
||||
endif
|
||||
|
||||
LOCAL_LDFLAGS := -Lobj/local/armeabi
|
||||
|
||||
LOCAL_LDFLAGS += $(APPLICATION_ADDITIONAL_LDFLAGS)
|
||||
|
||||
ifneq (,)
|
||||
|
||||
LIBS_WITH_LONG_SYMBOLS := $(strip $(shell \
|
||||
for f in $(LOCAL_PATH)/../../libs/armeabi/*.so ; do \
|
||||
for f in $(LOCAL_PATH)/../../obj/local/armeabi/*.so ; do \
|
||||
if echo $$f | grep "libapplication[.]so" > /dev/null ; then \
|
||||
continue ; \
|
||||
fi ; \
|
||||
@@ -67,11 +72,13 @@ LIBS_WITH_LONG_SYMBOLS := $(strip $(shell \
|
||||
ifneq "$(LIBS_WITH_LONG_SYMBOLS)" ""
|
||||
$(foreach F, $(LIBS_WITH_LONG_SYMBOLS), \
|
||||
$(info Library $(F): abusing symbol names are: \
|
||||
$(shell nm -g $(LOCAL_PATH)/../../libs/armeabi/$(F) | cut -c 12- | egrep '.{128}' ) ) \
|
||||
$(shell nm -g $(LOCAL_PATH)/../../obj/local/armeabi/$(F) | cut -c 12- | egrep '.{128}' ) ) \
|
||||
$(info Library $(F) contains symbol names longer than 128 bytes, \
|
||||
YOUR CODE WILL DEADLOCK WITHOUT ANY WARNING when you'll access such function - \
|
||||
please make this library static to avoid problems. ) )
|
||||
$(error Detected libraries with too long symbol names. Remove all files under project/libs/armeabi, make these libs static, and recompile)
|
||||
$(error Detected libraries with too long symbol names. Remove all files under project/obj/local/armeabi, make these libs static, and recompile)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
APP_LIB_DEPENDS := $(foreach LIB, $(LOCAL_SHARED_LIBRARIES), $(abspath $(LOCAL_PATH)/../../obj/local/armeabi/lib$(LIB).so))
|
||||
|
||||
@@ -22,8 +22,8 @@ AppTouchscreenKeyboardKeysAmount=0
|
||||
AppTouchscreenKeyboardKeysAmountAutoFire=0
|
||||
RedefinedKeysScreenKb="LCTRL M T H"
|
||||
MultiABI=n
|
||||
AppVersionCode=214607
|
||||
AppVersionName="2146.07"
|
||||
AppVersionCode=214608
|
||||
AppVersionName="2146.08"
|
||||
CompiledLibraries="sdl_net sdl_mixer sdl_image sdl_ttf png intl"
|
||||
CustomBuildScript=n
|
||||
AppCflags='-finline-functions -O2 -DWITH_ZLIB -DWITH_MIXER -DWITH_XML -DWITH_IMAGE -DWITH_TTF'
|
||||
|
||||
@@ -1 +1 @@
|
||||
commandergenius
|
||||
fheroes2
|
||||
@@ -4,7 +4,7 @@ include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := stlport
|
||||
|
||||
ifneq ($(CRYSTAX_TOOLCHAIN),)
|
||||
ifneq ($(CRYSTAX_TOOLCHAIN)$(NDK_R5_TOOLCHAIN),)
|
||||
LOCAL_CPP_EXTENSION := .cpp
|
||||
LOCAL_SRC_FILES := dummy.c
|
||||
else
|
||||
@@ -14,3 +14,12 @@ LOCAL_SRC_FILES := $(addprefix src/,$(notdir $(wildcard $(LOCAL_PATH)/src/*.cpp
|
||||
endif
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
ifeq ($(NDK_R5_TOOLCHAIN),)
|
||||
# Dummy stlport_shared to use the same Java code for all NDKs
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := stlport_shared
|
||||
LOCAL_CPP_EXTENSION := .cpp
|
||||
LOCAL_SRC_FILES := dummy.c
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user