TargetConditionals.h [plain text]
#ifndef __TARGETCONDITIONALS__
#define __TARGETCONDITIONALS__
#if defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) )
#define TARGET_OS_MAC 1
#define TARGET_OS_WIN32 0
#define TARGET_OS_UNIX 0
#define TARGET_OS_EMBEDDED @CONFIG_EMBEDDED@
#define TARGET_OS_IPHONE @CONFIG_IPHONE@
#define TARGET_IPHONE_SIMULATOR @CONFIG_IPHONE_SIMULATOR@
#if defined(__ppc__)
#define TARGET_CPU_PPC 1
#define TARGET_CPU_PPC64 0
#define TARGET_CPU_68K 0
#define TARGET_CPU_X86 0
#define TARGET_CPU_X86_64 0
#define TARGET_CPU_ARM 0
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#define TARGET_RT_LITTLE_ENDIAN 0
#define TARGET_RT_BIG_ENDIAN 1
#define TARGET_RT_64_BIT 0
#ifdef __MACOS_CLASSIC__
#define TARGET_RT_MAC_CFM 1
#define TARGET_RT_MAC_MACHO 0
#else
#define TARGET_RT_MAC_CFM 0
#define TARGET_RT_MAC_MACHO 1
#endif
#elif defined(__ppc64__)
#define TARGET_CPU_PPC 0
#define TARGET_CPU_PPC64 1
#define TARGET_CPU_68K 0
#define TARGET_CPU_X86 0
#define TARGET_CPU_X86_64 0
#define TARGET_CPU_ARM 0
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#define TARGET_RT_LITTLE_ENDIAN 0
#define TARGET_RT_BIG_ENDIAN 1
#define TARGET_RT_64_BIT 1
#define TARGET_RT_MAC_CFM 0
#define TARGET_RT_MAC_MACHO 1
#elif defined(__i386__)
#define TARGET_CPU_PPC 0
#define TARGET_CPU_PPC64 0
#define TARGET_CPU_68K 0
#define TARGET_CPU_X86 1
#define TARGET_CPU_X86_64 0
#define TARGET_CPU_ARM 0
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#define TARGET_RT_MAC_CFM 0
#define TARGET_RT_MAC_MACHO 1
#define TARGET_RT_LITTLE_ENDIAN 1
#define TARGET_RT_BIG_ENDIAN 0
#define TARGET_RT_64_BIT 0
#elif defined(__x86_64__)
#define TARGET_CPU_PPC 0
#define TARGET_CPU_PPC64 0
#define TARGET_CPU_68K 0
#define TARGET_CPU_X86 0
#define TARGET_CPU_X86_64 1
#define TARGET_CPU_ARM 0
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#define TARGET_RT_MAC_CFM 0
#define TARGET_RT_MAC_MACHO 1
#define TARGET_RT_LITTLE_ENDIAN 1
#define TARGET_RT_BIG_ENDIAN 0
#define TARGET_RT_64_BIT 1
#elif defined(__arm__)
#define TARGET_CPU_PPC 0
#define TARGET_CPU_PPC64 0
#define TARGET_CPU_68K 0
#define TARGET_CPU_X86 0
#define TARGET_CPU_X86_64 0
#define TARGET_CPU_ARM 1
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#define TARGET_RT_MAC_CFM 0
#define TARGET_RT_MAC_MACHO 1
#define TARGET_RT_LITTLE_ENDIAN 1
#define TARGET_RT_BIG_ENDIAN 0
#define TARGET_RT_64_BIT 0
#else
#error unrecognized GNU C compiler
#endif
#elif defined(__MWERKS__)
#define TARGET_OS_MAC 1
#define TARGET_OS_WIN32 0
#define TARGET_OS_UNIX 0
#define TARGET_OS_EMBEDDED 0
#if defined(__POWERPC__)
#define TARGET_CPU_PPC 1
#define TARGET_CPU_PPC64 0
#define TARGET_CPU_68K 0
#define TARGET_CPU_X86 0
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#define TARGET_RT_LITTLE_ENDIAN 0
#define TARGET_RT_BIG_ENDIAN 1
#elif defined(__INTEL__)
#define TARGET_CPU_PPC 0
#define TARGET_CPU_PPC64 0
#define TARGET_CPU_68K 0
#define TARGET_CPU_X86 1
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#define TARGET_RT_LITTLE_ENDIAN 1
#define TARGET_RT_BIG_ENDIAN 0
#else
#error unknown Metrowerks CPU type
#endif
#define TARGET_RT_64_BIT 0
#ifdef __MACH__
#define TARGET_RT_MAC_CFM 0
#define TARGET_RT_MAC_MACHO 1
#else
#define TARGET_RT_MAC_CFM 1
#define TARGET_RT_MAC_MACHO 0
#endif
#else
#if defined(TARGET_CPU_PPC) && TARGET_CPU_PPC
#define TARGET_CPU_PPC64 0
#define TARGET_CPU_68K 0
#define TARGET_CPU_X86 0
#define TARGET_CPU_X86_64 0
#define TARGET_CPU_ARM 0
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#elif defined(TARGET_CPU_PPC64) && TARGET_CPU_PPC64
#define TARGET_CPU_PPC 0
#define TARGET_CPU_68K 0
#define TARGET_CPU_X86 0
#define TARGET_CPU_X86_64 0
#define TARGET_CPU_ARM 0
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#elif defined(TARGET_CPU_X86) && TARGET_CPU_X86
#define TARGET_CPU_PPC 0
#define TARGET_CPU_PPC64 0
#define TARGET_CPU_X86_64 0
#define TARGET_CPU_68K 0
#define TARGET_CPU_ARM 0
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#elif defined(TARGET_CPU_X86_64) && TARGET_CPU_X86_64
#define TARGET_CPU_PPC 0
#define TARGET_CPU_PPC64 0
#define TARGET_CPU_X86 0
#define TARGET_CPU_68K 0
#define TARGET_CPU_ARM 0
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#elif defined(TARGET_CPU_ARM) && TARGET_CPU_ARM
#define TARGET_CPU_PPC 0
#define TARGET_CPU_PPC64 0
#define TARGET_CPU_X86 0
#define TARGET_CPU_X86_64 0
#define TARGET_CPU_68K 0
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#else
#error TargetConditionals.h: unknown compiler (see comment above)
#define TARGET_CPU_PPC 0
#define TARGET_CPU_68K 0
#define TARGET_CPU_X86 0
#define TARGET_CPU_ARM 0
#define TARGET_CPU_MIPS 0
#define TARGET_CPU_SPARC 0
#define TARGET_CPU_ALPHA 0
#endif
#define TARGET_OS_MAC 1
#define TARGET_OS_WIN32 0
#define TARGET_OS_UNIX 0
#define TARGET_OS_EMBEDDED 0
#if TARGET_CPU_PPC || TARGET_CPU_PPC64
#define TARGET_RT_BIG_ENDIAN 1
#define TARGET_RT_LITTLE_ENDIAN 0
#else
#define TARGET_RT_BIG_ENDIAN 0
#define TARGET_RT_LITTLE_ENDIAN 1
#endif
#if TARGET_CPU_PPC64 || TARGET_CPU_X86_64
#define TARGET_RT_64_BIT 1
#else
#define TARGET_RT_64_BIT 0
#endif
#ifdef __MACH__
#define TARGET_RT_MAC_MACHO 1
#define TARGET_RT_MAC_CFM 0
#else
#define TARGET_RT_MAC_MACHO 0
#define TARGET_RT_MAC_CFM 1
#endif
#endif
#endif