Update 'AuroraEnvironment.hpp'
[+] added additional EPlatform reserve spaces for future consoles [+] Aurora Enum awareness, so long as the includee can handle the overhead of AuroraEnums (hint: include AuroraRuntime.hpp first, if you're in that ecosystem)
This commit is contained in:
parent
7e04d9ac97
commit
07b229a4bb
@ -14,50 +14,128 @@ extern "C"
|
|||||||
#include "AuroraEnvironment.h"
|
#include "AuroraEnvironment.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_AUHAS_AURORAENUM) && defined(_ALLOW_AURORA_ENUM_AUENVHPP)
|
||||||
|
#include <AuroraForEach.hpp>
|
||||||
|
#include <AuroraEnum.hpp>
|
||||||
|
|
||||||
|
#define AUENVHPP_START_ENUM(platform, ...) \
|
||||||
|
AUE_DEFINE(platform, (__VA_ARGS__))
|
||||||
|
|
||||||
|
#else
|
||||||
|
#define AUENVHPP_START_ENUM(platform, ...) \
|
||||||
|
enum class platform \
|
||||||
|
{ \
|
||||||
|
eEnumInvalid = -1, \
|
||||||
|
__VA_ARGS__ \
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Aurora::Build
|
namespace Aurora::Build
|
||||||
{
|
{
|
||||||
enum class ECompiler
|
AUENVHPP_START_ENUM(ECompiler,
|
||||||
{
|
|
||||||
eInvaild = -1,
|
|
||||||
eMSVC,
|
eMSVC,
|
||||||
eClang,
|
eClang,
|
||||||
eGCC
|
eGCC,
|
||||||
};
|
eIntelInside
|
||||||
|
);
|
||||||
|
|
||||||
#if defined(AURORA_COMPILER_CLANG)
|
#if defined(AURORA_COMPILER_CLANG)
|
||||||
static const ECompiler kCurrentECompiler = ECompiler::eClang;
|
static const ECompiler kCurrentCompiler = ECompiler::eClang;
|
||||||
#elif defined(AURORA_COMPILER_MSVC)
|
#elif defined(AURORA_COMPILER_MSVC)
|
||||||
static const ECompiler kCurrentECompiler = ECompiler::eMSVC;
|
static const ECompiler kCurrentCompiler = ECompiler::eMSVC;
|
||||||
#elif defined(AURORA_COMPILER_GCC)
|
#elif defined(AURORA_COMPILER_GCC)
|
||||||
static const ECompiler kCurrentECompiler = ECompiler::eGCC;
|
static const ECompiler kCurrentCompiler = ECompiler::eGCC;
|
||||||
|
#elif defined(AURORA_COMPILER_INTEL)
|
||||||
|
static const ECompiler kCurrentCompiler = ECompiler::eIntelInside;
|
||||||
#else
|
#else
|
||||||
static const ECompiler kCurrentECompiler = ECompiler::eInvaild;
|
static const ECompiler kCurrentCompiler = ECompiler::eEnumInvalid;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum class EPlatform
|
enum class EPlatformLTS
|
||||||
{
|
{
|
||||||
eInvalid = -1,
|
eInvalid = -1,
|
||||||
|
|
||||||
eKernelLinux,
|
eKernelLinux,
|
||||||
|
eKernelBsd,
|
||||||
eKernelNtos,
|
eKernelNtos,
|
||||||
|
eKernelReserved1,
|
||||||
|
eKernelReserved2,
|
||||||
|
eKernelReserved3,
|
||||||
|
|
||||||
ePlatformWin32,
|
ePlatformWin32, // including padding for future OSes
|
||||||
|
ePlatformUWP,
|
||||||
|
ePlatformBSD,
|
||||||
ePlatformAndroid,
|
ePlatformAndroid,
|
||||||
ePlatformLinux,
|
ePlatformLinux,
|
||||||
ePlatformApple,
|
ePlatformAppleMacOS,
|
||||||
ePlatformIos,
|
ePlatformIos,
|
||||||
ePlatformSwitch,
|
ePlatformRTOS,
|
||||||
|
ePlatformNX,
|
||||||
ePlatformPS4,
|
ePlatformPS4,
|
||||||
ePlatformPS5,
|
ePlatformPS5,
|
||||||
|
ePlatformPS6,
|
||||||
|
ePlatformPS7,
|
||||||
ePlatformXbone,
|
ePlatformXbone,
|
||||||
|
ePlatformXbone2020,
|
||||||
|
ePlatformXboneReserved,
|
||||||
|
ePlatformXboneReserved2,
|
||||||
|
ePlatformXboneReserved3,
|
||||||
|
ePlatformNxPlusOne,
|
||||||
|
ePlatformNxPlusTwo,
|
||||||
|
ePlatformNxPlusThree,
|
||||||
|
ePlatformUWPAlt1,
|
||||||
|
ePlatformUWPAlt2,
|
||||||
|
ePlatformAppleAlt1,
|
||||||
|
ePlatformAppleAlt2,
|
||||||
ePlatformWii,
|
ePlatformWii,
|
||||||
ePlatformWiiU
|
ePlatformWiiU,
|
||||||
|
|
||||||
|
ePlatformMCU = 60,
|
||||||
|
ePlatformMPU = 70,
|
||||||
|
|
||||||
|
ePlatformUserReserved1 = 100,
|
||||||
|
ePlatformUserReserved2,
|
||||||
|
ePlatformUserReserved3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
AUENVHPP_START_ENUM(EPlatform,
|
||||||
|
eKernelLinux,
|
||||||
|
eKernelBsd,
|
||||||
|
eKernelNtos,
|
||||||
|
eKernelReserved1,
|
||||||
|
eKernelReserved2,
|
||||||
|
eKernelReserved3,
|
||||||
|
ePlatformWin32,
|
||||||
|
ePlatformUWP,
|
||||||
|
ePlatformBSD,
|
||||||
|
ePlatformAndroid,
|
||||||
|
ePlatformLinux,
|
||||||
|
ePlatformAppleMacOS,
|
||||||
|
ePlatformIos,
|
||||||
|
ePlatformRTOS,
|
||||||
|
ePlatformNX,
|
||||||
|
ePlatformPS4,
|
||||||
|
ePlatformPS5,
|
||||||
|
ePlatformPS6,
|
||||||
|
ePlatformPS7,
|
||||||
|
ePlatformXbone,
|
||||||
|
ePlatformXbone2020,
|
||||||
|
ePlatformXboneReserved,
|
||||||
|
ePlatformXboneReserved2,
|
||||||
|
ePlatformXboneReserved3,
|
||||||
|
ePlatformNxPlusOne,
|
||||||
|
ePlatformNxPlusTwo,
|
||||||
|
ePlatformNxPlusThree
|
||||||
|
)
|
||||||
|
|
||||||
#if defined(AURORA_PLATFORM_KERNEL_LINUX)
|
#if defined(AURORA_PLATFORM_KERNEL_LINUX)
|
||||||
static const EPlatform kCurrentPlatform = EPlatform::eKernelLinux;
|
static const EPlatform kCurrentPlatform = EPlatform::eKernelLinux;
|
||||||
#elif defined(AURORA_PLATFORM_NTOS)
|
#elif defined(AURORA_PLATFORM_NTOS)
|
||||||
static const EPlatform kCurrentPlatform = EPlatform::eKernelNtos;
|
static const EPlatform kCurrentPlatform = EPlatform::eKernelNtos;
|
||||||
|
#elif defined(AURORA_PLATFORM_KERNEL_FREEBSD) || defined(AURORA_PLATFORM_KERNEL_LAIN)
|
||||||
|
static const EPlatform kCurrentPlatform = EPlatform::eKernelBsd;
|
||||||
|
#elif defined(AURORA_PLATFORM_BSD)
|
||||||
|
static const EPlatform kCurrentPlatform = EPlatform::ePlatformBSD;
|
||||||
#elif defined(AURORA_PLATFORM_WIN32)
|
#elif defined(AURORA_PLATFORM_WIN32)
|
||||||
static const EPlatform kCurrentPlatform = EPlatform::ePlatformWin32;
|
static const EPlatform kCurrentPlatform = EPlatform::ePlatformWin32;
|
||||||
#elif defined(AURORA_PLATFORM_ANDROID)
|
#elif defined(AURORA_PLATFORM_ANDROID)
|
||||||
@ -65,7 +143,7 @@ namespace Aurora::Build
|
|||||||
#elif defined(AURORA_PLATFORM_LINUX)
|
#elif defined(AURORA_PLATFORM_LINUX)
|
||||||
static const EPlatform kCurrentPlatform = EPlatform::ePlatformLinux;
|
static const EPlatform kCurrentPlatform = EPlatform::ePlatformLinux;
|
||||||
#elif defined(AURORA_PLATFORM_APPLE)
|
#elif defined(AURORA_PLATFORM_APPLE)
|
||||||
static const EPlatform kCurrentPlatform = EPlatform::ePlatformApple;
|
static const EPlatform kCurrentPlatform = EPlatform::ePlatformAppleMacOS;
|
||||||
#elif defined(AURORA_PLATFORM_IOS)
|
#elif defined(AURORA_PLATFORM_IOS)
|
||||||
static const EPlatform kCurrentPlatform = EPlatform::ePlatformIos;
|
static const EPlatform kCurrentPlatform = EPlatform::ePlatformIos;
|
||||||
#elif defined(AURORA_PLATFORM_SWITCH)
|
#elif defined(AURORA_PLATFORM_SWITCH)
|
||||||
@ -81,21 +159,16 @@ namespace Aurora::Build
|
|||||||
#elif defined(AURORA_PLATFORM_WII_U)
|
#elif defined(AURORA_PLATFORM_WII_U)
|
||||||
static const EPlatform kCurrentPlatform = EPlatform::ePlatformWiiU;
|
static const EPlatform kCurrentPlatform = EPlatform::ePlatformWiiU;
|
||||||
#else
|
#else
|
||||||
static const EPlatform kCurrentPlatform = EPlatform::eInvalid;
|
static const EPlatform kCurrentPlatform = EPlatform::eEnumInvalid;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum class EVendor
|
AUENVHPP_START_ENUM(EVendor,
|
||||||
{
|
|
||||||
eInvalid = -1,
|
|
||||||
eUnknown = 0,
|
|
||||||
|
|
||||||
eConsoleMicrosft,
|
eConsoleMicrosft,
|
||||||
eConsoleSony,
|
eConsoleSony,
|
||||||
eConsoleNintendo,
|
eConsoleNintendo,
|
||||||
|
|
||||||
eGenericApple,
|
eGenericApple,
|
||||||
eGenericMicrosoft,
|
eGenericMicrosoft
|
||||||
};
|
)
|
||||||
|
|
||||||
#if defined(VENDOR_CONSOLE_MICROSOFT)
|
#if defined(VENDOR_CONSOLE_MICROSOFT)
|
||||||
static const EVendor kCurrentVendor = EVendor::eConsoleMicrosft;
|
static const EVendor kCurrentVendor = EVendor::eConsoleMicrosft;
|
||||||
@ -110,16 +183,14 @@ namespace Aurora::Build
|
|||||||
#elif defined(VENDOR_UNKNOWN)
|
#elif defined(VENDOR_UNKNOWN)
|
||||||
static const EVendor kCurrentVendor = EVendor::eUnknown;
|
static const EVendor kCurrentVendor = EVendor::eUnknown;
|
||||||
#else
|
#else
|
||||||
static const EVendor kCurrentVendor = EVendor::eInvalid;
|
static const EVendor kCurrentVendor = EVendor::eEnumInvalid;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum class EArchitecture
|
AUENVHPP_START_ENUM(EArchitecture,
|
||||||
{
|
|
||||||
eInvalid = -1,
|
|
||||||
eX86_32,
|
eX86_32,
|
||||||
eX86_64,
|
eX86_64,
|
||||||
eAArch64
|
eAArch64
|
||||||
};
|
)
|
||||||
|
|
||||||
#if defined(AURORA_ARCH_X86)
|
#if defined(AURORA_ARCH_X86)
|
||||||
static const EArchitecture kCurrentArchitecture = EArchitecture::eX86_32;
|
static const EArchitecture kCurrentArchitecture = EArchitecture::eX86_32;
|
||||||
@ -128,7 +199,7 @@ namespace Aurora::Build
|
|||||||
#elif defined(AURORA_ARCH_ARM)
|
#elif defined(AURORA_ARCH_ARM)
|
||||||
static const EArchitecture kCurrentArchitecture = EArchitecture::eAArch64;
|
static const EArchitecture kCurrentArchitecture = EArchitecture::eAArch64;
|
||||||
#else
|
#else
|
||||||
static const EArchitecture kCurrentArchitecture = EArchitecture::eInvalid;
|
static const EArchitecture kCurrentArchitecture = EArchitecture::eEnumInvalid;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -137,9 +208,7 @@ namespace Aurora::Build
|
|||||||
return kCurrentArchitecture == EArchitecture::eX86_32;
|
return kCurrentArchitecture == EArchitecture::eX86_32;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class EABI
|
AUENVHPP_START_ENUM(EABI,
|
||||||
{
|
|
||||||
eInvalid = -1,
|
|
||||||
// MSFTs in house amd64 abi
|
// MSFTs in house amd64 abi
|
||||||
eMSFT64,
|
eMSFT64,
|
||||||
// MSFTs in house aarch64 abi
|
// MSFTs in house aarch64 abi
|
||||||
@ -154,7 +223,7 @@ namespace Aurora::Build
|
|||||||
eMSFTAArchIntelBridge,
|
eMSFTAArchIntelBridge,
|
||||||
// other arm EPlatforms...
|
// other arm EPlatforms...
|
||||||
eLLVMArm
|
eLLVMArm
|
||||||
};
|
);
|
||||||
|
|
||||||
#if defined(AURORA_ABI_MSFT_64)
|
#if defined(AURORA_ABI_MSFT_64)
|
||||||
static const EABI kCurrentABI = EABI::eMSFT64;
|
static const EABI kCurrentABI = EABI::eMSFT64;
|
||||||
@ -169,14 +238,13 @@ namespace Aurora::Build
|
|||||||
#elif defined(AURORA_ABI_APPLE)
|
#elif defined(AURORA_ABI_APPLE)
|
||||||
static const EABI kCurrentABI = EABI::eAppleArm;
|
static const EABI kCurrentABI = EABI::eAppleArm;
|
||||||
#else
|
#else
|
||||||
static const EABI kCurrentABI = EABI::eInvalid;
|
static const EABI kCurrentABI = EABI::eEnumInvalid;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum class ECPUEndian
|
AUENVHPP_START_ENUM(ECPUEndian,
|
||||||
{
|
|
||||||
eCPUBig,
|
eCPUBig,
|
||||||
eCPULittle
|
eCPULittle
|
||||||
};
|
);
|
||||||
|
|
||||||
#if defined (AU_CPU_ENDIAN_LITTLE)
|
#if defined (AU_CPU_ENDIAN_LITTLE)
|
||||||
static const ECPUEndian kCurrentEndian = ECPUEndian::eCPULittle;
|
static const ECPUEndian kCurrentEndian = ECPUEndian::eCPULittle;
|
||||||
@ -189,7 +257,16 @@ namespace Aurora::Build
|
|||||||
eCpp20,
|
eCpp20,
|
||||||
eCpp17,
|
eCpp17,
|
||||||
eCpp14,
|
eCpp14,
|
||||||
eC
|
eC,
|
||||||
|
eRust,
|
||||||
|
eGo,
|
||||||
|
eCs,
|
||||||
|
eJava,
|
||||||
|
eJavaScript,
|
||||||
|
eKotlin,
|
||||||
|
eHLSL,
|
||||||
|
gGLSL,
|
||||||
|
eCpp20Plus = 20
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined (AU_LANG_CPP_20)
|
#if defined (AU_LANG_CPP_20)
|
||||||
|
Loading…
Reference in New Issue
Block a user