2015-08-19 19:06:58 +00:00
|
|
|
/* Copyright 2015, Michele Santullo
|
|
|
|
* This file is part of DoorKeeper.
|
|
|
|
*
|
|
|
|
* DoorKeeper is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* DoorKeeper is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with DoorKeeper. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2014-12-15 22:24:00 +00:00
|
|
|
#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)
|
2014-12-17 16:47:48 +00:00
|
|
|
# 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
|
2014-12-15 22:24:00 +00:00
|
|
|
# else
|
|
|
|
# define DK_ARCH_STRING "ARM"
|
2014-12-17 16:47:48 +00:00
|
|
|
# error "Never tested, please make sure this branch is correct"
|
2014-12-15 22:24:00 +00:00
|
|
|
# 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
|
|
|
|
|
2014-12-17 16:47:48 +00:00
|
|
|
#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
|
|
|
|
|
2014-12-15 22:24:00 +00:00
|
|
|
#endif
|