UniShader  1.0.0a
Interface for GPGPU and working with shader programs
 All Classes Functions Typedefs Enumerations Enumerator
D:/Visual Studio 2010/Projects/Unishader project/Unishader/include/UniShader/Config.h
00001 
00002 //Identify the operating system
00003 #if defined(_WIN32) || defined(__WIN32__)
00004 
00005     // Windows
00006     #define UNISHADER_SYSTEM_WINDOWS
00007 
00008 #elif defined(linux) || defined(__linux)
00009 
00010     // Linux
00011     #define UNISHADER_SYSTEM_LINUX
00012 
00013 #elif defined(__APPLE__) || defined(MACOSX) || defined(macintosh) || defined(Macintosh)
00014 
00015     // MacOS
00016     #define UNISHADER_SYSTEM_MACOS
00017 
00018 #endif
00019 
00020 //Identify the compiler and create import/export macro
00021 #ifndef UNISHADER_STATIC
00022 
00023     #ifdef UNISHADER_SYSTEM_WINDOWS
00024 
00025         #ifdef UNISHADER_EXPORTS
00026 
00027             // From DLL side, we must export
00028             #define UniShader_API __declspec(dllexport)
00029 
00030         #else
00031 
00032             // From client application side, we must import
00033             #define UniShader_API __declspec(dllimport)
00034 
00035         #endif
00036 
00037         //Disable annoying warning
00038         #ifdef _MSC_VER
00039 
00040             #pragma warning(disable : 4251)
00041 
00042         #endif
00043 
00044     #else // Linux, Mac OS X
00045 
00046         #if __GNUC__ >= 4
00047 
00048             // gcc 4 has special keywords for showing/hidding symbols
00049             #define UniShader_API __attribute__ ((__visibility__ ("default")))
00050 
00051         #else
00052 
00053             // gcc < 4 has no mechanism to explicitely hide symbols, everything's exported
00054             #define UniShader_API
00055 
00056         #endif
00057 
00058     #endif
00059 
00060 #else
00061 
00062     // Static build doesn't need these export macros
00063     #define UniShader_API
00064 
00065 #endif