we have platform version available in build system but not passed to
GCC, so as to use it in your source. you can process this in
Android.mk and send a CFLAG macro to your source.
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.2.1

there might be a trivial way that i'm not aware of, but a suggestion below.
You can choose to add a global system macro in you BoardConfig.mk..,
say if GB is newer release you are making, do
COMMON_GLOBAL_CFLAGS += -DANDROID_2.3

so, all your source files will see the macro (or dont see if kept
disabled in froyo)

#ifdef ANDROID_2.3
 //gb code
#else
 //froyo,eclari code
#endif

On Mon, Jan 31, 2011 at 5:06 AM, 94087 <[email protected]> wrote:
> I have some C++ code that I need to modify slightly for Gingerbread,
> but the new code cannot be used for earlier android versions.  What
> can I use to #ifdef out the newer code when building for older
> versions?  I've searched through the aosp but couldn't find anything.
>
> Thanks for your help.
>
> --
> unsubscribe: [email protected]
> website: http://groups.google.com/group/android-porting
>



-- 
Regards,
Deva
www.bittoggler.com

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to