rnd-20020803-1-src
[rocksndiamonds.git] / src / libgame / platform.h
1 /***********************************************************
2 * Artsoft Retro-Game Library                               *
3 *----------------------------------------------------------*
4 * (c) 1994-2002 Artsoft Entertainment                      *
5 *               Holger Schemel                             *
6 *               Detmolder Strasse 189                      *
7 *               33604 Bielefeld                            *
8 *               Germany                                    *
9 *               e-mail: info@artsoft.org                   *
10 *----------------------------------------------------------*
11 * platform.h                                               *
12 ***********************************************************/
13
14 #ifndef PLATFORM_H
15 #define PLATFORM_H
16
17 /* ========================================================================= */
18 /* define keywords for supported main platforms (Unix, DOS and Windows)      */
19 /* ========================================================================= */
20
21 #if defined(MSDOS)
22 #define PLATFORM_MSDOS
23 #elif defined(WIN32)
24 #define PLATFORM_WIN32
25 #else
26 #define PLATFORM_UNIX
27 #endif
28
29 /* ========================================================================= */
30 /* define additional keywords for MS-DOS platform                            */
31 /* ========================================================================= */
32
33 #if defined(PLATFORM_MSDOS)
34
35 #ifndef TARGET_ALLEGRO
36 #define TARGET_ALLEGRO
37 #endif
38
39 #ifndef TARGET_X11
40 #define TARGET_X11
41 #endif
42
43 #endif
44
45 /* ========================================================================= */
46 /* define additional keywords for several Unix platforms                     */
47 /* ========================================================================= */
48
49 #if defined(PLATFORM_UNIX) && defined(TARGET_X11)
50 #define TARGET_X11_NATIVE
51 #endif
52
53 #if defined(linux)
54 #define PLATFORM_LINUX
55 #endif
56
57 #if defined(__FreeBSD__)
58 #define PLATFORM_FREEBSD
59 #endif
60
61 #if defined(__NetBSD__)
62 #define PLATFORM_NETBSD
63 #endif
64
65 #if defined(__bsdi__)
66 #define PLATFORM_BSDI
67 #endif
68
69 #if defined(sparc) || defined(sun)
70 #define PLATFORM_SOLARIS
71 #endif
72
73 #if defined(__APPLE__) && defined(__MACH__)
74 #define PLATFORM_MACOSX
75 #endif
76
77 /* detecting HP-UX by the following compiler keyword definitions:
78    - in K&R mode (the default), the HP C compiler defines "hpux"
79    - in ANSI mode (-Aa or -Ae), the HP C compiler defines "__hpux"
80    - the gcc (Gnu) C compiler defines "__hpux__"
81    Thanks to Jarkko Hietaniemi  for this note. */
82
83 #if defined(__hpux__) || defined(__hpux) || defined(hpux)
84 #define PLATFORM_HPUX
85 #endif
86
87 #endif /* PLATFORM_H */