diff --git a/include/bal_platform.h b/include/bal_platform.h index b66a890..18934ca 100644 --- a/include/bal_platform.h +++ b/include/bal_platform.h @@ -1,24 +1,53 @@ #ifndef BALLISTIC_PLATFORM_H #define BALLISTIC_PLATFORM_H + #if defined(_WIN32) || defined(_WIN64) - #define BAL_PLATFORM_WINDOWS 1 - #define BAL_PLATFORM_POSIX 0 + +#define BAL_PLATFORM_WINDOWS 1 +#define BAL_PLATFORM_POSIX 0 + #elif defined(__linux__) || defined(__APPLE__) - #define BAL_PLATFORM_WINDOWS 0 - #define BAL_PLATFORM_POSIX 1 + +#define BAL_PLATFORM_WINDOWS 0 +#define BAL_PLATFORM_POSIX 1 + #else - #error "Unknown Platform" + +#error "Unknown Platform" + +#endif + +#if defined(__aarch64__) + +#define BAL_ARCHITECTURE_ARM 1 +#define BAL_ARCHITECTURE_X86 0 + +#elif defined(__x86_64__) + +#define BAL_ARCHITECTURE_ARM 0 +#define BAL_ARCHITECTURE_X86 1 + +#else + +#error "Ballistic requires a 64-bit ARM or x86 environment." + #endif #if defined(_MSC_VER) - #define BAL_COMPILER_MSVC 1 - #define BAL_COMPILER_GCC 0 + +#define BAL_COMPILER_MSVC 1 +#define BAL_COMPILER_GCC 0 + #elif defined(__GNUC__) || defined(__clang__) - #define BAL_COMPILER_MSVC 0 - #define BAL_COMPILER_GCC 1 + +#define BAL_COMPILER_MSVC 0 +#define BAL_COMPILER_GCC 1 + #else - #error "Unknown Compiler" + +#error "Unknown Compiler" + #endif #endif /* BALLISTIC_PLATFORM_H */