Fixed compiling for NDK r4b - note that I may have breaked some other compilation types

This commit is contained in:
pelya
2011-02-09 15:13:32 +00:00
parent d5ef5ffd59
commit 0f221c5477
15 changed files with 59 additions and 41 deletions

View File

@@ -23,9 +23,9 @@ endif
LOCAL_C_INCLUDES += $(foreach D, $(APP_SUBDIRS), $(LOCAL_PATH)/$(D)) \
$(LOCAL_PATH)/../sdl-$(SDL_VERSION)/include \
$(foreach L, $(COMPILED_LIBRARIES), $(LOCAL_PATH)/../$(L)/include)
$(foreach L, $(COMPILED_LIBRARIES), $(LOCAL_PATH)/../$(L)/include) \
LOCAL_CFLAGS += -include SDL_android_printf.h
LOCAL_CFLAGS += -include $(LOCAL_PATH)/../sdl_fake_stdout/include/SDL_android_printf.h
LOCAL_CFLAGS += $(APPLICATION_ADDITIONAL_CFLAGS)
@@ -43,38 +43,36 @@ LOCAL_SHARED_LIBRARIES := sdl-$(SDL_VERSION) $(filter-out $(APP_AVAILABLE_STATIC
LOCAL_STATIC_LIBRARIES := $(filter $(APP_AVAILABLE_STATIC_LIBS), $(COMPILED_LIBRARIES))
LOCAL_STATIC_LIBRARIES += stlport
LOCAL_STATIC_LIBRARIES += stlport sdl_fake_stdout
LOCAL_LDLIBS := -lGLESv1_CM -ldl -llog -lz
LOCAL_LDFLAGS := -Lobj/local/armeabi
LOCAL_LDFLAGS := -Lobj/local/armeabi -Wl,-u,_SDL_ANDROID_initFakeStdout
LOCAL_LDFLAGS += $(APPLICATION_ADDITIONAL_LDFLAGS)
# Disabled for now 'till I not confirmed it
LIBS_WITH_LONG_SYMBOLS := $(strip $(shell \
for f in $(LOCAL_PATH)/../../obj/local/armeabi/*.so ; do \
if echo $$f | grep "libapplication[.]so" > /dev/null ; then \
continue ; \
fi ; \
if [ -e "$$f" ] ; then \
if nm -g $$f | cut -c 12- | egrep '.{128}' > /dev/null ; then \
echo $$f | grep -o 'lib[^/]*[.]so' ; \
fi ; \
fi ; \
done \
) )
#LIBS_WITH_LONG_SYMBOLS := $(strip $(shell \
# for f in $(LOCAL_PATH)/../../obj/local/armeabi/*.so ; do \
# if echo $$f | grep "libapplication[.]so" > /dev/null ; then \
# continue ; \
# fi ; \
# if [ -e "$$f" ] ; then \
# if nm -g $$f | cut -c 12- | egrep '.{128}' > /dev/null ; then \
# echo $$f | grep -o 'lib[^/]*[.]so' ; \
# fi ; \
# fi ; \
# done \
#) )
#ifneq "$(LIBS_WITH_LONG_SYMBOLS)" ""
#$(foreach F, $(LIBS_WITH_LONG_SYMBOLS), \
#$(info Library $(F): abusing symbol names are: \
#$(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/obj/local/armeabi, make these libs static, and recompile)
#endif
ifneq "$(LIBS_WITH_LONG_SYMBOLS)" ""
$(foreach F, $(LIBS_WITH_LONG_SYMBOLS), \
$(info Library $(F): abusing symbol names are: \
$(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/obj/local/armeabi, make these libs static, and recompile)
endif
APP_LIB_DEPENDS := $(foreach LIB, $(LOCAL_SHARED_LIBRARIES), $(abspath $(LOCAL_PATH)/../../obj/local/armeabi/lib$(LIB).so))
APP_LIB_DEPENDS += $(foreach LIB, $(LOCAL_STATIC_LIBRARIES), $(abspath $(LOCAL_PATH)/../../obj/local/armeabi/lib$(LIB).a))