mirror of
https://github.com/pound-emu/ballistic.git
synced 2026-01-31 01:15:21 +01:00
engine: add arm64 and x86 environment detection
Signed-off-by: Ronald Caesar <github43132@proton.me>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user