]> gitweb.factorcode.org Git - factor.git/blob - vm/platform.hpp
vm: Add freebsd32 support for completeness.
[factor.git] / vm / platform.hpp
1 #if defined(WINDOWS)
2   #if defined(WINNT)
3     #include "os-windows.hpp"
4     #if defined(FACTOR_AMD64)
5       #include "os-windows.64.hpp"
6     #elif defined(FACTOR_X86)
7       #include "os-windows.32.hpp"
8     #else
9       #error "Unsupported Windows flavor"
10     #endif
11   #else
12     #error "Unsupported Windows flavor"
13   #endif
14 #else
15   #include "os-unix.hpp"
16
17   #ifdef __APPLE__
18     #include "os-macosx.hpp"
19     #include "mach_signal.hpp"
20
21     #ifdef FACTOR_X86
22       #include "os-macosx-x86.32.hpp"
23     #elif defined(FACTOR_AMD64)
24       #include "os-macosx-x86.64.hpp"
25     #else
26       #error "Unsupported Mac OS X flavor"
27     #endif
28   #else
29     #include "os-genunix.hpp"
30     #if defined(__FreeBSD__)
31         #define FACTOR_OS_STRING "freebsd"
32         #include "os-freebsd.hpp"
33         #if defined(FACTOR_X86)
34             #include "os-freebsd-x86.32.hpp"
35         #elif defined(FACTOR_AMD64)
36             #include "os-freebsd-x86.64.hpp"
37         #else
38             #error "Unsupported FreeBSD flavor"
39         #endif
40     #elif defined(__linux__)
41       #define FACTOR_OS_STRING "linux"
42       #include "os-linux.hpp"
43       #if defined(FACTOR_X86)
44         #include "os-linux-x86.32.hpp"
45       #elif defined(FACTOR_PPC64)
46         #include "os-linux-ppc.64.hpp"
47       #elif defined(FACTOR_PPC32)
48         #include "os-linux-ppc.32.hpp"
49       #elif defined(FACTOR_ARM)
50         #include "os-linux-arm.hpp"
51       #elif defined(FACTOR_AMD64)
52         #include "os-linux-x86.64.hpp"
53       #else
54         #error "Unsupported Linux flavor"
55       #endif
56     #endif
57   #endif
58 #endif
59
60 #if defined(FACTOR_X86)
61   #include "cpu-x86.32.hpp"
62   #include "cpu-x86.hpp"
63 #elif defined(FACTOR_AMD64)
64   #include "cpu-x86.64.hpp"
65   #include "cpu-x86.hpp"
66 #elif defined(FACTOR_PPC)
67   #include "cpu-ppc.hpp"
68 #elif defined(FACTOR_ARM)
69   #include "cpu-arm.hpp"
70 #else
71   #error "Unsupported CPU"
72 #endif