rnd-20001204-3-src
[rocksndiamonds.git] / src / libgame / platform.h
1 /***********************************************************
2 * Artsoft Retro-Game Library                               *
3 *----------------------------------------------------------*
4 * (c) 1994-2000 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 /* define keywords for supported main platforms */
18
19 #if defined(MSDOS)
20 #define PLATFORM_MSDOS
21 #elif defined(WIN32)
22 #define PLATFORM_WIN32
23 #else
24 #define PLATFORM_UNIX
25 #endif
26
27 /* ========================================================================= */
28 /* define additional keywords for MS-DOS platform                            */
29 /* ========================================================================= */
30
31 #if defined(PLATFORM_MSDOS)
32
33 #ifndef TARGET_ALLEGRO
34 #define TARGET_ALLEGRO
35 #endif
36
37 #ifndef TARGET_X11
38 #define TARGET_X11
39 #endif
40
41 #endif
42
43 /* ========================================================================= */
44 /* define additional keywords for several Unix platforms                     */
45 /* ========================================================================= */
46
47 #if defined(PLATFORM_UNIX) && defined(TARGET_X11)
48 #define TARGET_X11_NATIVE
49 #endif
50
51 #if defined(linux)
52 #define PLATFORM_LINUX
53 #endif
54
55 #if defined(__FreeBSD__)
56 #define PLATFORM_FREEBSD
57 #endif
58
59 /* detecting HP-UX by the following compiler keyword definitions:
60    - in K&R mode (the default), the HP C compiler defines "hpux"
61    - in ANSI mode (-Aa or -Ae), the HP C compiler defines "__hpux"
62    - the gcc (Gnu) C compiler defines "__hpux__"
63    Thanks to Jarkko Hietaniemi  for this note. */
64
65 #if defined(__hpux__) || defined(__hpux) || defined(hpux)
66 #define PLATFORM_HPUX
67 #endif
68
69 #endif /* PLATFORM_H */