Go to the documentation of this file.
25 #ifndef __MYGUI_PLATFORM_H__
26 #define __MYGUI_PLATFORM_H__
29 #define MYGUI_PLATFORM_WIN32 1
30 #define MYGUI_PLATFORM_LINUX 2
31 #define MYGUI_PLATFORM_APPLE 3
34 #define MYGUI_COMPILER_MSVC 1
35 #define MYGUI_COMPILER_GNUC 2
39 #if defined (__WIN32__) || defined (_WIN32)
40 # define MYGUI_PLATFORM MYGUI_PLATFORM_WIN32
41 #elif defined (__APPLE_CC__)
42 # define MYGUI_PLATFORM MYGUI_PLATFORM_APPLE
44 # define MYGUI_PLATFORM MYGUI_PLATFORM_LINUX
48 #if defined( _MSC_VER )
49 # define MYGUI_COMPILER MYGUI_COMPILER_MSVC
50 # define MYGUI_COMP_VER _MSC_VER
52 #elif defined( __GNUC__ )
53 # define MYGUI_COMPILER MYGUI_COMPILER_GNUC
54 # define MYGUI_COMP_VER (((__GNUC__)*100) + \
55 (__GNUC_MINOR__*10) + \
58 # pragma error "Unknown compiler! Stop building!!!"
62 #if MYGUI_COMPILER == MYGUI_COMPILER_MSVC
63 # if MYGUI_COMP_VER >= 1200
64 # define MYGUI_FORCEINLINE __forceinline
66 #elif defined(__MINGW32__)
67 # if !defined(MYGUI_FORCEINLINE)
68 # define MYGUI_FORCEINLINE __inline
71 # define MYGUI_FORCEINLINE __inline
76 #if MYGUI_PLATFORM == MYGUI_PLATFORM_WIN32
78 # if defined( MYGUI_STATIC )
80 # elif defined( MYGUI_BUILD )
81 # define MYGUI_EXPORT __declspec( dllexport )
83 # if defined( __MINGW32__ )
86 # define MYGUI_EXPORT __declspec( dllimport )
90 # if defined( MYGUI_STATIC )
91 # define MYGUI_EXPORT_DLL
92 # elif defined( MYGUI_BUILD_DLL )
93 # define MYGUI_EXPORT_DLL __declspec( dllexport )
95 # if defined( __MINGW32__ )
96 # define MYGUI_EXPORT_DLL
98 # define MYGUI_EXPORT_DLL __declspec( dllimport )
102 #// Win32 compilers use _DEBUG for specifying debug builds.
104 # define MYGUI_DEBUG_MODE 1
106 # define MYGUI_DEBUG_MODE 0
112 #if MYGUI_PLATFORM == MYGUI_PLATFORM_LINUX || MYGUI_PLATFORM == MYGUI_PLATFORM_APPLE
118 # define MYGUI_EXPORT __attribute__ ((visibility("default")))
120 # define MYGUI_EXPORT
124 # define MYGUI_EXPORT_DLL __attribute__ ((visibility("default")))
126 # define MYGUI_EXPORT_DLL
130 # define stricmp strcasecmp
137 # define MYGUI_DEBUG_MODE 1
139 # define MYGUI_DEBUG_MODE 0
142 # if MYGUI_PLATFORM == MYGUI_PLATFORM_APPLE
143 # define MYGUI_PLATFORM_LIB "MYGUIPlatform.bundle"
144 # else // if MYGUI_PLATFORM_LINUX
145 # define MYGUI_PLATFORM_LIB "libMYGUIPlatform.so"
151 #endif // __MYGUI_PLATFORM_H__