]> gitweb.factorcode.org Git - factor.git/blob - vm/platform.hpp
e5a07a05d426e5ac580e8aab98faae2563fcd29f
[factor.git] / vm / platform.hpp
1 #if defined(WINDOWS)
2         #if defined(WINCE)
3                 #include "os-windows-ce.hpp"
4                 #include "os-windows.hpp"
5         #elif defined(WINNT)
6                 #include "os-windows.hpp"
7                 #include "os-windows-nt.hpp"
8
9                 #if defined(FACTOR_AMD64)
10                         #include "os-windows-nt.64.hpp"
11                 #elif defined(FACTOR_X86)
12                         #include "os-windows-nt.32.hpp"
13                 #else
14                         #error "Unsupported Windows flavor"
15                 #endif
16         #else
17                 #error "Unsupported Windows flavor"
18         #endif
19 #else
20         #include "os-unix.hpp"
21
22         #ifdef __APPLE__
23                 #include "os-macosx.hpp"
24                 #include "mach_signal.hpp"
25                 
26                 #ifdef FACTOR_X86
27                         #include "os-macosx-x86.32.hpp"
28                 #elif defined(FACTOR_PPC)
29                         #include "os-macosx-ppc.hpp"
30                 #elif defined(FACTOR_AMD64)
31                         #include "os-macosx-x86.64.hpp"
32                 #else
33                         #error "Unsupported Mac OS X flavor"
34                 #endif
35         #else
36                 #include "os-genunix.hpp"
37
38                 #ifdef __FreeBSD__
39                         #define FACTOR_OS_STRING "freebsd"
40                         #include "os-freebsd.hpp"
41                         
42                         #if defined(FACTOR_X86)
43                                 #include "os-freebsd-x86.32.hpp"
44                         #elif defined(FACTOR_AMD64)
45                                 #include "os-freebsd-x86.64.hpp"
46                         #else
47                                 #error "Unsupported FreeBSD flavor"
48                         #endif
49                 #elif defined(__OpenBSD__)
50                         #define FACTOR_OS_STRING "openbsd"
51                         #include "os-openbsd.hpp"
52
53                         #if defined(FACTOR_X86)
54                                 #include "os-openbsd-x86.32.hpp"
55                         #elif defined(FACTOR_AMD64)
56                                 #include "os-openbsd-x86.64.hpp"
57                         #else
58                                 #error "Unsupported OpenBSD flavor"
59                         #endif
60                 #elif defined(__NetBSD__)
61                         #define FACTOR_OS_STRING "netbsd"
62                         #include "os-netbsd.hpp"
63
64                         #if defined(FACTOR_X86)
65                                 #include "os-netbsd-x86.32.hpp"
66                         #elif defined(FACTOR_AMD64)
67                                 #include "os-netbsd-x86.64.hpp"
68                         #else
69                                 #error "Unsupported NetBSD flavor"
70                         #endif
71
72                 #elif defined(linux)
73                         #define FACTOR_OS_STRING "linux"
74                         #include "os-linux.hpp"
75
76                         #if defined(FACTOR_X86)
77                                 #include "os-linux-x86.32.hpp"
78                         #elif defined(FACTOR_PPC)
79                                 #include "os-linux-ppc.hpp"
80                         #elif defined(FACTOR_ARM)
81                                 #include "os-linux-arm.hpp"
82                         #elif defined(FACTOR_AMD64)
83                                 #include "os-linux-x86.64.hpp"
84                         #else
85                                 #error "Unsupported Linux flavor"
86                         #endif
87                 #elif defined(__SVR4) && defined(sun)
88                         #define FACTOR_OS_STRING "solaris"
89
90                         #if defined(FACTOR_X86)
91                                 #include "os-solaris-x86.32.hpp"
92                         #elif defined(FACTOR_AMD64)
93                                 #include "os-solaris-x86.64.hpp"
94                         #else
95                                 #error "Unsupported Solaris flavor"
96                         #endif
97
98                 #else
99                         #error "Unsupported OS"
100                 #endif
101         #endif
102 #endif
103
104 #if defined(FACTOR_X86)
105         #include "cpu-x86.32.hpp"
106         #include "cpu-x86.hpp"
107 #elif defined(FACTOR_AMD64)
108         #include "cpu-x86.64.hpp"
109         #include "cpu-x86.hpp"
110 #elif defined(FACTOR_PPC)
111         #include "cpu-ppc.hpp"
112 #elif defined(FACTOR_ARM)
113         #include "cpu-arm.hpp"
114 #else
115         #error "Unsupported CPU"
116 #endif