DoorKeeper/test/platformstrings.h
2014-12-22 16:56:17 +01:00

88 lines
2.4 KiB
C

#ifndef id2802AD0DCAF7443CA095A5AAF417015E
#define id2802AD0DCAF7443CA095A5AAF417015E
#define STR1_LOC(x) #x
#define STRINGIZE(x) STR1_LOC(x)
#if defined(DK_64_BIT)
# define DK_BIT_STRING "64-bit"
#elif defined(DK_32_BIT)
# define DK_BIT_STRING "32-bit"
#else
# error "No registry size defined"
#endif
#if defined(DK_ARM)
# if defined(DK_32_BIT)
# if defined(DK_LITTLE_ENDIAN)
# define DK_ARCH_STRING "ARMv" STRINGIZE(DK_ARM_VERSION) " (v" \
STRINGIZE(DK_ARM_VERSION) "l)"
# elif defined(DK_BIG_ENDIAN)
# define DK_ARCH_STRING "ARMv" STRINGIZE(DK_ARM_VERSION) " (v" \
STRINGIZE(DK_ARM_VERSION) "b)"
# else
# error "Unkonwn endianness"
# endif
# else
# define DK_ARCH_STRING "ARM"
# error "Never tested, please make sure this branch is correct"
# endif
#elif defined(DK_X86)
# define DK_ARCH_STRING "x86"
#elif defined(DK_X86_64)
# define DK_ARCH_STRING "amd64"
#elif defined(DK_IA64)
# define DK_ARCH_STRING "ia64"
#else
# error "No architecture defined"
#endif
#if defined(DK_LINUX)
# define DK_OS_STRING "Linux"
#elif defined(DK_WINDOWS)
# define DK_OS_STRING "Windows"
#elif defined(DK_ANDROID)
# define DK_OS_STRING "Android"
#endif
#if defined(DK_PC)
# define DK_DEVICE_STRING "PC"
#elif defined(DK_MOBILE)
# define DK_DEVICE_STRING "Mobile"
#else
# error "No device type defined"
#endif
#if defined(DK_ARM_ARCH)
# if DK_ARM_ARCH == DK_ARM_ARCH_6 || DK_ARM_ARCH == DK_ARM_ARCH_6J
# define DK_ARM_FAMILY_STRING "ARM11"
# define DK_ARM_ARCH_STRING "ARMv6"
# elif DK_ARM_ARCH == DK_ARM_ARCH_6Z
# define DK_ARM_FAMILY_STRING "ARM11"
# define DK_ARM_ARCH_STRING "ARMv6Z"
# elif DK_ARM_ARCH == DK_ARM_ARCH_6K
# define DK_ARM_FAMILY_STRING "ARM11"
# define DK_ARM_ARCH_STRING "ARMv6K"
# elif DK_ARM_ARCH == DK_ARM_ARCH_6ZK
# error "Missing data - please fill in"
# elif DK_ARM_ARCH == DK_ARM_ARCH_6T2
# define DK_ARM_FAMILY_STRING "ARM11"
# define DK_ARM_ARCH_STRING "ARMv6T2"
# elif DK_ARM_ARCH == DK_ARM_ARCH_7
# error "Missing data - please fill in"
# elif DK_ARM_ARCH == DK_ARM_ARCH_7M
# define DK_ARM_FAMILY_STRING "Cortex-M"
# define DK_ARM_ARCH_STRING "ARMv7-M"
# elif DK_ARM_ARCH == DK_ARM_ARCH_7R
# define DK_ARM_FAMILY_STRING "Cortex-R"
# define DK_ARM_ARCH_STRING "ARMv7-R"
# elif DK_ARM_ARCH == DK_ARM_ARCH_7A
# define DK_ARM_FAMILY_STRING "Cortex-A"
# define DK_ARM_ARCH_STRING "ARMv7-A"
# elif DK_ARM_ARCH == DK_ARM_ARCH_7S
# define DK_ARM_FAMILY_STRING "Apple-A6"
# define DK_ARM_ARCH_STRING "ARMv7-A"
# endif
#endif
#endif