mirror of https://github.com/axmolengine/axmol.git
Linux with #ifdef
This commit is contained in:
parent
7da8c84a75
commit
5691829b72
|
@ -1 +1 @@
|
||||||
be9f283a24f020011a1dedfd59ddd6e01da16e3d
|
caae58ff83f2655d5ea4c19e00a2be17259f8559
|
|
@ -23,6 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "CCPlatformConfig.h"
|
||||||
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#include "CCApplication.h"
|
#include "CCApplication.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
@ -213,3 +216,6 @@ LanguageType Application::getCurrentLanguage()
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
||||||
#ifndef CCAPLICATION_H_
|
#ifndef CCAPLICATION_H_
|
||||||
#define CCAPLICATION_H_
|
#define CCAPLICATION_H_
|
||||||
|
|
||||||
|
#include "CCPlatformConfig.h"
|
||||||
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#include "platform/CCCommon.h"
|
#include "platform/CCCommon.h"
|
||||||
#include "platform/CCApplicationProtocol.h"
|
#include "platform/CCApplicationProtocol.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -94,4 +97,6 @@ protected:
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#endif /* CCAPLICATION_H_ */
|
#endif /* CCAPLICATION_H_ */
|
||||||
|
|
|
@ -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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "CCPlatformConfig.h"
|
||||||
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#include "platform/CCCommon.h"
|
#include "platform/CCCommon.h"
|
||||||
#include "CCStdC.h"
|
#include "CCStdC.h"
|
||||||
#include "CCConsole.h"
|
#include "CCConsole.h"
|
||||||
|
@ -39,3 +43,5 @@ void LuaLog(const char * format)
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
|
@ -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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "CCPlatformConfig.h"
|
||||||
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#include "platform/CCDevice.h"
|
#include "platform/CCDevice.h"
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -64,3 +68,5 @@ void Device::setAccelerometerInterval(float interval)
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
|
@ -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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "CCPlatformConfig.h"
|
||||||
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#include "CCFileUtilsLinux.h"
|
#include "CCFileUtilsLinux.h"
|
||||||
#include "platform/CCCommon.h"
|
#include "platform/CCCommon.h"
|
||||||
#include "ccMacros.h"
|
#include "ccMacros.h"
|
||||||
|
@ -114,3 +118,5 @@ bool FileUtilsLinux::isFileExist(const std::string& strFilePath) const
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
|
#endif CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
|
@ -25,6 +25,9 @@ THE SOFTWARE.
|
||||||
#ifndef __CC_FILEUTILS_LINUX_H__
|
#ifndef __CC_FILEUTILS_LINUX_H__
|
||||||
#define __CC_FILEUTILS_LINUX_H__
|
#define __CC_FILEUTILS_LINUX_H__
|
||||||
|
|
||||||
|
#include "CCPlatformConfig.h"
|
||||||
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#include "platform/CCFileUtils.h"
|
#include "platform/CCFileUtils.h"
|
||||||
#include "CCPlatformMacros.h"
|
#include "CCPlatformMacros.h"
|
||||||
#include "ccTypes.h"
|
#include "ccTypes.h"
|
||||||
|
@ -56,5 +59,6 @@ public:
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
#endif // __CC_FILEUTILS_LINUX_H__
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
|
#endif // __CC_FILEUTILS_LINUX_H__
|
||||||
|
|
|
@ -25,8 +25,13 @@ THE SOFTWARE.
|
||||||
#ifndef __CCGL_H__
|
#ifndef __CCGL_H__
|
||||||
#define __CCGL_H__
|
#define __CCGL_H__
|
||||||
|
|
||||||
|
#include "CCPlatformConfig.h"
|
||||||
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#include "GL/glew.h"
|
#include "GL/glew.h"
|
||||||
|
|
||||||
#define CC_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8
|
#define CC_GL_DEPTH24_STENCIL8 GL_DEPTH24_STENCIL8
|
||||||
|
|
||||||
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#endif // __CCGL_H__
|
#endif // __CCGL_H__
|
||||||
|
|
|
@ -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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "CCPlatformConfig.h"
|
||||||
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
@ -486,3 +490,5 @@ bool Image::initWithString(
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
|
@ -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
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef __CCPLATFORMDEFINE_H__
|
#ifndef __CCPLATFORMDEFINE_H__
|
||||||
#define __CCPLATFORMDEFINE_H__
|
#define __CCPLATFORMDEFINE_H__
|
||||||
|
|
||||||
|
#include "CCPlatformConfig.h"
|
||||||
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if defined(_USRDLL)
|
#if defined(_USRDLL)
|
||||||
|
@ -47,5 +51,6 @@ THE SOFTWARE.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#endif /* __CCPLATFORMDEFINE_H__*/
|
#endif /* __CCPLATFORMDEFINE_H__*/
|
||||||
|
|
|
@ -23,6 +23,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "CCPlatformConfig.h"
|
||||||
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#include "CCStdC.h"
|
#include "CCStdC.h"
|
||||||
|
|
||||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
|
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
|
||||||
|
@ -65,5 +68,6 @@ int CC_DLL gettimeofday(struct timeval * val, struct timezone *)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif // CC_PLATFORM_WIN32
|
#endif // CC_PLATFORM_WIN32
|
||||||
|
|
||||||
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
|
@ -26,6 +26,9 @@ THE SOFTWARE.
|
||||||
#ifndef __CC_STD_C_H__
|
#ifndef __CC_STD_C_H__
|
||||||
#define __CC_STD_C_H__
|
#define __CC_STD_C_H__
|
||||||
|
|
||||||
|
#include "CCPlatformConfig.h"
|
||||||
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#include "CCPlatformMacros.h"
|
#include "CCPlatformMacros.h"
|
||||||
|
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
@ -52,4 +55,6 @@ THE SOFTWARE.
|
||||||
#define cosf cos
|
#define cosf cos
|
||||||
#define sinf sin
|
#define sinf sin
|
||||||
|
|
||||||
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||||
|
|
||||||
#endif // __CC_STD_C_H__
|
#endif // __CC_STD_C_H__
|
||||||
|
|
Loading…
Reference in New Issue