Compile time configuration: drop untested combos
[sol.git] / sol / config / arch.hpp
blobb7d8130a71cdf70866d4354c0338005079f473c6
1 #if !defined(sol_config_arch_hpp_included)
2 #define sol_config_arch_hpp_included
3 /// \addtogroup sol_config
4 /// \{
7 /**
8 * \file sol/config/arch.hpp
9 * \brief Architecture-specific environment configuration
10 * \author Sven Suursoho
14 // byte ordering
15 #define SOL_BIG_ENDIAN 0x3412
16 #define SOL_LITTLE_ENDIAN 0x1234
20 // detect
23 #if defined(SOL_ARCH_CONFIG)
24 // already have user specified architecture config
26 #elif defined(__x86_64__) || defined(__x86_64) \
27 || defined(__amd64__) || defined(__amd64)
28 // x86-64
29 #define SOL_ARCH_CONFIG "sol/config/arch/x86_64.hpp"
31 #elif defined(__i386__) || defined(__i386) || defined(i386)
32 // x86
33 #define SOL_ARCH_CONFIG "sol/config/arch/x86.hpp"
35 #else
36 #error "Unknown architecture"
37 #endif
41 // include
44 #if defined(SOL_ARCH_CONFIG)
45 #include SOL_ARCH_CONFIG
46 #endif
50 // check for required stuff
53 #if !defined(SOL_ARCH_NAME)
54 #error "SOL_ARCH_NAME not detected"
55 #endif
57 #if !defined(SOL_BYTE_ORDER)
58 #error "SOL_BYTE_ORDER not detected"
59 #endif
62 /// \}
63 #endif // sol_config_arch_hpp_included