2010-07-28 10:26:06 +08:00
|
|
|
/****************************************************************************
|
|
|
|
Copyright (c) 2010 cocos2d-x.org
|
|
|
|
|
|
|
|
http://www.cocos2d-x.org
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
THE SOFTWARE.
|
|
|
|
****************************************************************************/
|
|
|
|
|
2010-09-06 18:35:24 +08:00
|
|
|
// pre configure
|
2010-07-28 10:26:06 +08:00
|
|
|
#ifdef _TRANZDA_VM_ // under uphone emulator
|
|
|
|
#define CCX_PLATFORM_UPHONE
|
2010-10-08 17:53:04 +08:00
|
|
|
#elif defined (WIN32) && defined (_WINDOWS) // under win32pc
|
|
|
|
#define CCX_PLATFORM_WIN32
|
2010-11-03 10:59:07 +08:00
|
|
|
#elif defined (_ANDROID)
|
|
|
|
#define CCX_PLATFORM_ANDROID
|
2010-11-12 17:18:54 +08:00
|
|
|
#elif defined(IPHONE)
|
|
|
|
#define CCX_PLATFORM_IPHONE
|
2010-09-06 18:35:24 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// user configure
|
|
|
|
|
2010-10-08 17:53:04 +08:00
|
|
|
// use these macros to set compiling environment if needed
|
2010-09-06 18:35:24 +08:00
|
|
|
|
2010-10-08 17:53:04 +08:00
|
|
|
// #define CCX_PLATFORM_UPHONE
|
|
|
|
// #define CCX_PLATFORM_WIN32
|
2010-09-06 18:35:24 +08:00
|
|
|
|
|
|
|
// post configure
|
|
|
|
|
2010-10-08 17:53:04 +08:00
|
|
|
// check user set platform
|
|
|
|
#if defined(CCX_UNDER_UPHONE) || defined(CCX_UNDER_WIN32)
|
|
|
|
#undef CCX_PLATFORM_UPHONE
|
|
|
|
#undef CCX_PLATFORM_WIN32
|
|
|
|
|
|
|
|
#if defined(CCX_UNDER_UPHONE)
|
|
|
|
#define CCX_PLATFORM_UPHONE // under uphone
|
|
|
|
#elif defined(CCX_UNDER_WIN32)
|
|
|
|
#define CCX_PLATFORM_WIN32
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// check compiling platform
|
2010-11-12 17:18:54 +08:00
|
|
|
#if ! defined(CCX_PLATFORM_UPHONE) && ! defined(CCX_PLATFORM_WIN32) && ! defined(CCX_PLATFORM_ANDROID) && ! defined(CCX_PLATFORM_IPHONE)
|
2010-10-08 17:53:04 +08:00
|
|
|
#error "no platform macro defined!"
|
2010-07-28 10:26:06 +08:00
|
|
|
#endif
|