]> gitweb.factorcode.org Git - factor.git/blob - vm/platform.hpp
Merge branch 'master' of git://factorcode.org/git/factor
[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-nt.hpp"
7                 #include "os-windows.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
52                         #if defined(FACTOR_X86)
53                                 #include "os-openbsd-x86.32.hpp"
54                         #elif defined(FACTOR_AMD64)
55                                 #include "os-openbsd-x86.64.hpp"
56                         #else
57                                 #error "Unsupported OpenBSD flavor"
58                         #endif
59                 #elif defined(__NetBSD__)
60                         #define FACTOR_OS_STRING "netbsd"
61
62                         #if defined(FACTOR_X86)
63                                 #include "os-netbsd-x86.32.hpp"
64                         #elif defined(FACTOR_AMD64)
65                                 #include "os-netbsd-x86.64.hpp"
66                         #else
67                                 #error "Unsupported NetBSD flavor"
68                         #endif
69
70                         #include "os-netbsd.hpp"
71                 #elif defined(linux)
72                         #define FACTOR_OS_STRING "linux"
73                         #include "os-linux.hpp"
74
75                         #if defined(FACTOR_X86)
76                                 #include "os-linux-x86.32.hpp"
77                         #elif defined(FACTOR_PPC)
78                                 #include "os-linux-ppc.hpp"
79                         #elif defined(FACTOR_ARM)
80                                 #include "os-linux-arm.hpp"
81                         #elif defined(FACTOR_AMD64)
82                                 #include "os-linux-x86.64.hpp"
83                         #else
84                                 #error "Unsupported Linux flavor"
85                         #endif
86                 #elif defined(__SVR4) && defined(sun)
87                         #define FACTOR_OS_STRING "solaris"
88
89                         #if defined(FACTOR_X86)
90                                 #include "os-solaris-x86.32.hpp"
91                         #elif defined(FACTOR_AMD64)
92                                 #include "os-solaris-x86.64.hpp"
93                         #else
94                                 #error "Unsupported Solaris flavor"
95                         #endif
96
97                 #else
98                         #error "Unsupported OS"
99                 #endif
100         #endif
101 #endif
102
103 #if defined(FACTOR_X86)
104         #include "cpu-x86.32.hpp"
105         #include "cpu-x86.hpp"
106 #elif defined(FACTOR_AMD64)
107         #include "cpu-x86.64.hpp"
108         #include "cpu-x86.hpp"
109 #elif defined(FACTOR_PPC)
110         #include "cpu-ppc.hpp"
111 #elif defined(FACTOR_ARM)
112         #include "cpu-arm.hpp"
113 #else
114         #error "Unsupported CPU"
115 #endif