rnd-20040430-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 /* ========================================================================= */
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 #endif
62
63 #if defined(__NetBSD__)
64 #define PLATFORM_NETBSD
65 #endif
66
67 #if defined(__bsdi__)
68 #define PLATFORM_BSDI
69 #endif
70
71 #if defined(sparc) && defined(sun)
72 #define PLATFORM_SUNOS
73 #endif
74
75 #if defined(__APPLE__) && defined(__MACH__)
76 #define PLATFORM_MACOSX
77 #endif
78
79 #if defined(NeXT)
80 #define PLATFORM_NEXT
81 #endif
82
83 /* detecting HP-UX by the following compiler keyword definitions:
84    - in K&R mode (the default), the HP C compiler defines "hpux"
85    - in ANSI mode (-Aa or -Ae), the HP C compiler defines "__hpux"
86    - the gcc (Gnu) C compiler defines "__hpux__"
87    Thanks to Jarkko Hietaniemi  for this note. */
88
89 #if defined(__hpux__) || defined(__hpux) || defined(hpux)
90 #define PLATFORM_HPUX
91 #endif
92
93
94 /* ========================================================================= */
95 /* this should better go into "system.h" or "features.h" (yet to be created) */
96 /* ========================================================================= */
97
98 #if defined(PLATFORM_UNIX) || defined(TARGET_SDL)
99 #define NETWORK_AVALIABLE
100 #endif
101
102
103 #endif /* PLATFORM_H */