diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id b/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id index 5a3818bf10..9d609edff2 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -be9f283a24f020011a1dedfd59ddd6e01da16e3d \ No newline at end of file +caae58ff83f2655d5ea4c19e00a2be17259f8559 \ No newline at end of file diff --git a/cocos/2d/platform/linux/CCApplication.cpp b/cocos/2d/platform/linux/CCApplication.cpp index 8e476ced36..ca41760a34 100644 --- a/cocos/2d/platform/linux/CCApplication.cpp +++ b/cocos/2d/platform/linux/CCApplication.cpp @@ -23,6 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ +#include "CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #include "CCApplication.h" #include #include @@ -213,3 +216,6 @@ LanguageType Application::getCurrentLanguage() } NS_CC_END + +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + diff --git a/cocos/2d/platform/linux/CCApplication.h b/cocos/2d/platform/linux/CCApplication.h index 8c5c51ae60..e71e487f2f 100644 --- a/cocos/2d/platform/linux/CCApplication.h +++ b/cocos/2d/platform/linux/CCApplication.h @@ -26,6 +26,9 @@ THE SOFTWARE. #ifndef CCAPLICATION_H_ #define CCAPLICATION_H_ +#include "CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #include "platform/CCCommon.h" #include "platform/CCApplicationProtocol.h" #include @@ -94,4 +97,6 @@ protected: NS_CC_END +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #endif /* CCAPLICATION_H_ */ diff --git a/cocos/2d/platform/linux/CCCommon.cpp b/cocos/2d/platform/linux/CCCommon.cpp index c48307192b..8ef40e072c 100644 --- a/cocos/2d/platform/linux/CCCommon.cpp +++ b/cocos/2d/platform/linux/CCCommon.cpp @@ -22,6 +22,10 @@ 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. ****************************************************************************/ + +#include "CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #include "platform/CCCommon.h" #include "CCStdC.h" #include "CCConsole.h" @@ -39,3 +43,5 @@ void LuaLog(const char * format) } NS_CC_END + +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX diff --git a/cocos/2d/platform/linux/CCDevice.cpp b/cocos/2d/platform/linux/CCDevice.cpp index 44457cdb6e..683522a337 100644 --- a/cocos/2d/platform/linux/CCDevice.cpp +++ b/cocos/2d/platform/linux/CCDevice.cpp @@ -22,6 +22,10 @@ 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. ****************************************************************************/ + +#include "CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #include "platform/CCDevice.h" #include #include @@ -64,3 +68,5 @@ void Device::setAccelerometerInterval(float interval) } NS_CC_END + +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX diff --git a/cocos/2d/platform/linux/CCFileUtilsLinux.cpp b/cocos/2d/platform/linux/CCFileUtilsLinux.cpp index 2d86c1ec87..7edfad170c 100644 --- a/cocos/2d/platform/linux/CCFileUtilsLinux.cpp +++ b/cocos/2d/platform/linux/CCFileUtilsLinux.cpp @@ -22,6 +22,10 @@ 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. ****************************************************************************/ + +#include "CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #include "CCFileUtilsLinux.h" #include "platform/CCCommon.h" #include "ccMacros.h" @@ -114,3 +118,5 @@ bool FileUtilsLinux::isFileExist(const std::string& strFilePath) const } NS_CC_END + +#endif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX diff --git a/cocos/2d/platform/linux/CCFileUtilsLinux.h b/cocos/2d/platform/linux/CCFileUtilsLinux.h index 20742b02f3..9a574edf6c 100644 --- a/cocos/2d/platform/linux/CCFileUtilsLinux.h +++ b/cocos/2d/platform/linux/CCFileUtilsLinux.h @@ -25,6 +25,9 @@ THE SOFTWARE. #ifndef __CC_FILEUTILS_LINUX_H__ #define __CC_FILEUTILS_LINUX_H__ +#include "CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #include "platform/CCFileUtils.h" #include "CCPlatformMacros.h" #include "ccTypes.h" @@ -56,5 +59,6 @@ public: NS_CC_END -#endif // __CC_FILEUTILS_LINUX_H__ +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX +#endif // __CC_FILEUTILS_LINUX_H__ diff --git a/cocos/2d/platform/linux/CCGL.h b/cocos/2d/platform/linux/CCGL.h index 63b4b91b4a..f85e7b4640 100644 --- a/cocos/2d/platform/linux/CCGL.h +++ b/cocos/2d/platform/linux/CCGL.h @@ -25,8 +25,13 @@ THE SOFTWARE. #ifndef __CCGL_H__ #define __CCGL_H__ +#include "CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #include "GL/glew.h" #define CC_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8 +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #endif // __CCGL_H__ diff --git a/cocos/2d/platform/linux/CCImage.cpp b/cocos/2d/platform/linux/CCImage.cpp index 9e1579f304..8add509d35 100644 --- a/cocos/2d/platform/linux/CCImage.cpp +++ b/cocos/2d/platform/linux/CCImage.cpp @@ -22,6 +22,10 @@ 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. ****************************************************************************/ + +#include "CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #include #include @@ -486,3 +490,5 @@ bool Image::initWithString( } NS_CC_END + +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX diff --git a/cocos/2d/platform/linux/CCPlatformDefine.h b/cocos/2d/platform/linux/CCPlatformDefine.h index 5d2a56ff31..77f17916da 100644 --- a/cocos/2d/platform/linux/CCPlatformDefine.h +++ b/cocos/2d/platform/linux/CCPlatformDefine.h @@ -22,9 +22,13 @@ 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. ****************************************************************************/ + #ifndef __CCPLATFORMDEFINE_H__ #define __CCPLATFORMDEFINE_H__ +#include "CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #include #if defined(_USRDLL) @@ -47,5 +51,6 @@ THE SOFTWARE. #endif +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX #endif /* __CCPLATFORMDEFINE_H__*/ diff --git a/cocos/2d/platform/linux/CCStdC.cpp b/cocos/2d/platform/linux/CCStdC.cpp index 9f47e9e17a..b72f1966b0 100644 --- a/cocos/2d/platform/linux/CCStdC.cpp +++ b/cocos/2d/platform/linux/CCStdC.cpp @@ -23,6 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ +#include "CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #include "CCStdC.h" #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) @@ -65,5 +68,6 @@ int CC_DLL gettimeofday(struct timeval * val, struct timezone *) return 0; } - #endif // CC_PLATFORM_WIN32 + +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX diff --git a/cocos/2d/platform/linux/CCStdC.h b/cocos/2d/platform/linux/CCStdC.h index 5f3e24e8c0..4941bbe66b 100644 --- a/cocos/2d/platform/linux/CCStdC.h +++ b/cocos/2d/platform/linux/CCStdC.h @@ -26,6 +26,9 @@ THE SOFTWARE. #ifndef __CC_STD_C_H__ #define __CC_STD_C_H__ +#include "CCPlatformConfig.h" +#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #include "CCPlatformMacros.h" #include @@ -52,4 +55,6 @@ THE SOFTWARE. #define cosf cos #define sinf sin +#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX + #endif // __CC_STD_C_H__