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