d8773420bb4a8b18cf23398364d16f49d178f15e
[rocksndiamonds.git] / src / libgame / platform.h
1 /***********************************************************
2 * Artsoft Retro-Game Library                               *
3 *----------------------------------------------------------*
4 * (c) 1994-2006 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 /* ========================================================================= */
31 /* define additional keywords for MS-DOS platform                            */
32 /* ========================================================================= */
33
34 #if defined(PLATFORM_MSDOS)
35
36 #ifndef TARGET_ALLEGRO
37 #define TARGET_ALLEGRO
38 #endif
39
40 #ifndef TARGET_X11
41 #define TARGET_X11
42 #endif
43
44 #endif
45
46
47 /* ========================================================================= */
48 /* define additional keywords for several Unix platforms                     */
49 /* ========================================================================= */
50
51 #if defined(PLATFORM_UNIX) && defined(TARGET_X11)
52 #define TARGET_X11_NATIVE
53 #endif
54
55 #if defined(linux)
56 #define PLATFORM_LINUX
57 #endif
58
59 #if defined(__FreeBSD__)
60 #define PLATFORM_FREEBSD
61 #define PLATFORM_BSD
62 #endif
63
64 #if defined(__NetBSD__)
65 #define PLATFORM_NETBSD
66 #define PLATFORM_BSD
67 #endif
68
69 #if defined(__bsdi__)
70 #define PLATFORM_BSDI
71 #define PLATFORM_BSD
72 #endif
73
74 #if defined(sparc) && defined(sun)
75 #define PLATFORM_SUNOS
76 #endif
77
78 #if defined(__APPLE__) && defined(__MACH__)
79 #define PLATFORM_MACOSX
80 #endif
81
82 #if defined(NeXT)
83 #define PLATFORM_NEXT
84 #endif
85
86 /* detecting HP-UX by the following compiler keyword definitions:
87    - in K&R mode (the default), the HP C compiler defines "hpux"
88    - in ANSI mode (-Aa or -Ae), the HP C compiler defines "__hpux"
89    - the gcc (Gnu) C compiler defines "__hpux__"
90    Thanks to Jarkko Hietaniemi  for this note. */
91
92 #if defined(__hpux__) || defined(__hpux) || defined(hpux)
93 #define PLATFORM_HPUX
94 #endif
95
96
97 /* ========================================================================= */
98 /* this should better go into "system.h" or "features.h" (yet to be created) */
99 /* ========================================================================= */
100
101 #if defined(PLATFORM_UNIX) || defined(TARGET_SDL)
102 #define NETWORK_AVALIABLE
103 #endif
104
105
106 #endif /* PLATFORM_H */