Added some support for NDK r5, commented out cin/cout/cerr in built-in STLPort bercause they keep crashing
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user