YSTest: Platform.h 源文件

YSTest PreAlpha_b400_20130424 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

全部 类 命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 组 页
Platform.h
浏览该文件的文档.
1 ﻿/*
2 Copyright (C) by Franksoft 2009 - 2012.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
41 #ifndef YCL_INC_PLATFORM_H_
42 #define YCL_INC_PLATFORM_H_ 1
43
50 #if defined(YF_DLL) && defined(YF_BUILD_DLL)
51 # error DLL could not be built and used at the same time!
52 #endif
53
54 #ifdef YF_DLL
55 # define YF_API __declspec(dllimport)
56 #elif defined(YF_BUILD_DLL)
57 # define YF_API __declspec(dllexport)
58 #else
59 # define YF_API
60 #endif
61
87 #define YCL_PLATFORM_DS 0x4001
88
92 #define YCL_PLATFORM_MINGW32 0x4002
93
98 #ifdef __MINGW32__
99 //#ifdef _WIN32
100 # define YCL_PLATFORM YCL_PLATFORM_MINGW32
101 #elif !defined(YCL_PLATFORM)
102 //当前默认以 DS 作为目标平台。
103 # define YCL_PLATFORM YCL_PLATFORM_DS
104 #endif
105
106
107
108 #if YCL_PLATFORM == YCL_PLATFORM_DS
109 # define YCL_DS 1
110 # define YCL_HOSTED 0
111 # define YCL_MULTITHREAD 0
112 # define YCL_API_FILESYSTEM_POSIX
113 # define YCL_API_USE_UNISTD
114 # define YCL_API_USE_SYS_DIR
115 #elif YCL_PLATFORM == YCL_PLATFORM_MINGW32
116 # define YCL_MINGW32 1
117 # define YCL_HOSTED 1
118 # define YCL_MULTITHREAD 1
119 #else
120 # error Unsupported platform found!
121 #endif
122
123 #endif
124