1 // ============================================================================
2 // Artsoft Retro-Game Library
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
7 // https://www.artsoft.org/
8 // ----------------------------------------------------------------------------
10 // ============================================================================
15 // ============================================================================
16 // define main platform keywords
17 // ============================================================================
19 #if defined(WIN32) || defined(_WIN32)
20 #define PLATFORM_WIN32
21 #define PLATFORM_STRING "Windows"
24 #define PLATFORM_STRING "Unix"
28 // ============================================================================
29 // define additional platform keywords
30 // ============================================================================
34 #undef PLATFORM_STRING
35 #define PLATFORM_STRING "AIX"
38 #if defined(AMIGA) || defined(__AMIGA) || defined(__amigados__)
39 #define PLATFORM_AMIGA
40 #undef PLATFORM_STRING
41 #define PLATFORM_STRING "AmigaOS"
46 #undef PLATFORM_STRING
47 #define PLATFORM_STRING "BeOS"
50 #if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
53 #undef PLATFORM_STRING
54 #define PLATFORM_STRING "BSDI"
57 #if defined(_arch_dreamcast)
58 #define PLATFORM_DREAMCAST
59 #undef PLATFORM_STRING
60 #define PLATFORM_STRING "Dreamcast"
63 #if defined(__FreeBSD__) || defined(__DragonFly__)
64 #define PLATFORM_FREEBSD
66 #undef PLATFORM_STRING
67 #define PLATFORM_STRING "FreeBSD"
70 #if defined(hpux) || defined(__hpux) || defined(__hpux__)
72 #undef PLATFORM_STRING
73 #define PLATFORM_STRING "HP-UX"
76 #if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
78 #undef PLATFORM_STRING
79 #define PLATFORM_STRING "IRIX"
82 #if defined(linux) || defined(__linux) || defined(__linux__)
83 #define PLATFORM_LINUX
84 #undef PLATFORM_STRING
85 #define PLATFORM_STRING "Linux"
88 #if defined(__APPLE__) && defined(__MACH__)
89 #define PLATFORM_MACOSX
90 #undef PLATFORM_STRING
91 #define PLATFORM_STRING "Mac OS X"
94 #if defined(__NetBSD__)
95 #define PLATFORM_NETBSD
97 #undef PLATFORM_STRING
98 #define PLATFORM_STRING "NetBSD"
102 #define PLATFORM_NEXT
103 #undef PLATFORM_STRING
104 #define PLATFORM_STRING "NeXT"
107 #if defined(__OpenBSD__)
108 #define PLATFORM_OPENBSD
110 #undef PLATFORM_STRING
111 #define PLATFORM_STRING "OpenBSD"
116 #undef PLATFORM_STRING
117 #define PLATFORM_STRING "OS/2"
120 #if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
122 #undef PLATFORM_STRING
123 #define PLATFORM_STRING "OSF/1"
126 #if defined(__QNXNTO__)
128 #undef PLATFORM_STRING
129 #define PLATFORM_STRING "QNX"
132 #if defined(riscos) || defined(__riscos) || defined(__riscos__)
133 #define PLATFORM_RISCOS
134 #undef PLATFORM_STRING
135 #define PLATFORM_STRING "RISC OS"
138 #if defined(sparc) || defined(sun) || defined(__SVR4)
139 #define PLATFORM_SOLARIS
140 #undef PLATFORM_STRING
141 #define PLATFORM_STRING "Solaris"
144 #if defined(_WIN32_WCE)
145 #define PLATFORM_WINDOWS_CE
146 #undef PLATFORM_STRING
147 #define PLATFORM_STRING "Windows CE"
150 #if defined(__ANDROID__)
151 #define PLATFORM_ANDROID
152 #undef PLATFORM_STRING
153 #define PLATFORM_STRING "Android"
156 #if defined(__EMSCRIPTEN__)
157 #define PLATFORM_EMSCRIPTEN
158 #undef PLATFORM_STRING
159 #define PLATFORM_STRING "Emscripten"
163 // ============================================================================
164 // define additional platform keywords for CPU architecture
165 // ============================================================================
167 #if defined(__x86_64__) || defined(__LP64__) || defined(_LP64)
168 #define PLATFORM_64_BIT
169 #define PLATFORM_XX_BIT_STRING "64-bit"
171 #define PLATFORM_32_BIT
172 #define PLATFORM_XX_BIT_STRING "32-bit"
176 // ============================================================================
177 // define additional target keywords
178 // ============================================================================
180 #if defined(TARGET_SDL2)