Commented out redefining printf, because it generates lot of warnings in system headers
This commit is contained in:
@@ -25,7 +25,7 @@ LOCAL_C_INCLUDES += $(foreach D, $(APP_SUBDIRS), $(LOCAL_PATH)/$(D)) \
|
||||
$(LOCAL_PATH)/../sdl-$(SDL_VERSION)/include \
|
||||
$(foreach L, $(COMPILED_LIBRARIES), $(LOCAL_PATH)/../$(L)/include)
|
||||
|
||||
LOCAL_CFLAGS += -D__sF=__SDL_fake_stdout -Dcout=__SDL_fake_cout -Dcerr=__SDL_fake_cerr -Dclog=__SDL_fake_clog -Dprintf=__SDL_android_printf
|
||||
LOCAL_CFLAGS += -include SDL_android_printf.h
|
||||
|
||||
LOCAL_CFLAGS += $(APPLICATION_ADDITIONAL_CFLAGS)
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ CFLAGS="-I$NDK/build/platforms/$PLATFORMVER/arch-arm/usr/include \
|
||||
-Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -O2 \
|
||||
-fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 \
|
||||
-Wa,--noexecstack -DNDEBUG -g \
|
||||
-D__sF=__SDL_fake_stdout -Dcout=__SDL_fake_cout -Dcerr=__SDL_fake_cerr -Dclog=__SDL_fake_clog -Dprintf=__SDL_android_printf \
|
||||
-include SDL_android_printf.h \
|
||||
-I$LOCAL_PATH/../sdl-1.2/include $STL_INCLUDE \
|
||||
`echo $APP_MODULES | sed \"s@\([-a-zA-Z0-9_.]\+\)@-I$LOCAL_PATH/../\1/include@g\"`"
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ CFLAGS="\
|
||||
-fpic -ffunction-sections -funwind-tables -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi \
|
||||
-march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 \
|
||||
-I$NDK/platforms/$PLATFORMVER/arch-arm/usr/include -Wa,--noexecstack \
|
||||
-DANDROID -D__sF=__SDL_fake_stdout -Dcout=__SDL_fake_cout -Dcerr=__SDL_fake_cerr -Dclog=__SDL_fake_clog -Dprintf=__SDL_android_printf \
|
||||
-DANDROID -include SDL_android_printf.h \
|
||||
-DNDEBUG -O2 -g \
|
||||
-I$NDK/sources/cxx-stl/gnu-libstdc++/include \
|
||||
-I$NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include \
|
||||
|
||||
1
project/jni/sdl-1.2/include/SDL_android_printf.h
Symbolic link
1
project/jni/sdl-1.2/include/SDL_android_printf.h
Symbolic link
@@ -0,0 +1 @@
|
||||
../../sdl-1.3/include/SDL_android_printf.h
|
||||
47
project/jni/sdl-1.3/include/SDL_android_printf.h
Normal file
47
project/jni/sdl-1.3/include/SDL_android_printf.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
SDL - Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2009 Sam Lantinga
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Sam Lantinga
|
||||
slouken@libsdl.org
|
||||
*/
|
||||
|
||||
#ifndef __SDL_android_printf_h
|
||||
#define __SDL_android_printf_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Outputs to logcat */
|
||||
extern int __SDL_android_printf(const char * fmt, ...) __attribute__((format(printf, 1, 2)));
|
||||
|
||||
#define __sF __SDL_fake_stdout
|
||||
|
||||
/* Generates lot of warning messages in standard headers, enable only for ultra debug mode */
|
||||
/*
|
||||
#define printf __SDL_android_printf
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define cout __SDL_fake_cout
|
||||
#define cerr __SDL_fake_cerr
|
||||
#define clog __SDL_fake_clog
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user