From 60ee6bb60b11bbfbccf56f335c9c6213e6daa79d Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 5 Dec 2002 05:36:32 +0000 Subject: "" svn path=/trunk/; revision=278 --- externals/grill/flext/source/flprefix.h | 159 +++++++++++++++++++++++++++----- 1 file changed, 136 insertions(+), 23 deletions(-) (limited to 'externals/grill/flext/source/flprefix.h') diff --git a/externals/grill/flext/source/flprefix.h b/externals/grill/flext/source/flprefix.h index 973a6966..34debe69 100755 --- a/externals/grill/flext/source/flprefix.h +++ b/externals/grill/flext/source/flprefix.h @@ -23,32 +23,36 @@ WARRANTIES, see the file, "license.txt," in this distribution. // definitions for FLEXT_OS #define FLEXT_OS_UNKNOWN 0 #define FLEXT_OS_WIN 1 -#define FLEXT_OS_MACOS9 2 -#define FLEXT_OS_MACOSX 3 -#define FLEXT_OS_LINUX 4 -#define FLEXT_OS_IRIX 5 +#define FLEXT_OS_MACOS 2 +#define FLEXT_OS_LINUX 3 +#define FLEXT_OS_IRIX 4 // definitions for FLEXT_CPU #define FLEXT_CPU_UNKNOWN 0 #define FLEXT_CPU_INTEL 1 #define FLEXT_CPU_PPC 2 #define FLEXT_CPU_MIPS 3 +#define FLEXT_CPU_ALPHA 4 + // Old definitions #if defined(MAXMSP) #define FLEXT_SYS FLEXT_SYS_MAX - #undef MAXMSP +// #undef MAXMSP #elif defined(PD) #define FLEXT_SYS FLEXT_SYS_PD - #undef PD - #undef NT +// #undef PD +// #undef NT +#endif + +#if defined(_DEBUG) + #define FLEXT_DEBUG #endif // Definition of supported real-time systems #if FLEXT_SYS == FLEXT_SYS_MAX #elif FLEXT_SYS == FLEXT_SYS_PD - #define PD #else #error "System must be defined by either FLEXT_SYS_MAX or FLEXT_SYS_PD" #endif @@ -57,47 +61,156 @@ WARRANTIES, see the file, "license.txt," in this distribution. #if defined(_MSC_VER) // Microsoft C++ + #ifndef FLEXT_CPU + #if defined(_M_IX86) + #define FLEXT_CPU FLEXT_CPU_INTEL + #elif defined(_M_PPC) + #define FLEXT_CPU FLEXT_CPU_PPC + #elif defined(_M_MRX000) + #define FLEXT_CPU FLEXT_CPU_MIPS + #elif defined(_M_ALPHA) + #define FLEXT_CPU FLEXT_CPU_ALPHA + #else + #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OS + #if defined(_WIN32) + #define FLEXT_OS FLEXT_OS_WIN + #else + #define FLEXT_OS FLEXT_OS_UNKNOWN + #endif + #endif + +#elif defined(__BORLANDC__) + // Borland C++ + + #ifndef FLEXT_CPU + #define FLEXT_CPU FLEXT_CPU_INTEL + #endif + #ifndef FLEXT_OS + #define FLEXT_OS FLEXT_OS_WIN + #endif + #elif defined(__MWERKS__) // Metrowerks CodeWarrior - #if defined(__INTEL__) - #define FLEXT_CPU FLEXT_CPU_INTEL - #elif defined(__POWERPC__) - #define FLEXT_CPU FLEXT_CPU_PPC - #elif defined(__MIPS__) - #define FLEXT_CPU FLEXT_CPU_MIPS - #elif defined(__POWERPC__) - #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #ifndef FLEXT_CPU + #if defined(__INTEL__) + #define FLEXT_CPU FLEXT_CPU_INTEL + #elif defined(__POWERPC__) + #define FLEXT_CPU FLEXT_CPU_PPC + #elif defined(__MIPS__) + #define FLEXT_CPU FLEXT_CPU_MIPS + #else + #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OS + #if defined(macintosh) + #define FLEXT_OS FLEXT_OS_MACOS + #elif defined(__INTEL__) + // assume Windows + #define FLEXT_OS FLEXT_OS_WIN + #else + #define FLEXT_OS FLEXT_OS_UNKNOWN + #endif #endif #elif defined(__GNUG__) // GNU C++ + #ifndef FLEXT_CPU + #if defined(_X86_) || defined(__i386__) || defined(__i586__) || defined(__i686__) + #define FLEXT_CPU FLEXT_CPU_INTEL + #elif defined(__POWERPC__) + #define FLEXT_CPU FLEXT_CPU_PPC + #elif defined(__MIPS__) + #define FLEXT_CPU FLEXT_CPU_MIPS + #else + #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OS + #if defined(linux) || defined(__linux__) + #define FLEXT_OS FLEXT_OS_LINUX + #elif defined(__CYGWIN__) || defined(__CYGWIN32__) + #define FLEXT_OS FLEXT_OS_WIN + #elif defined(__APPLE__) && defined(__MACH__) + #define FLEXT_OS FLEXT_OS_MACOS + // how about IRIX?? + #else + #define FLEXT_OS FLEXT_OS_UNKNOWN + #endif + #endif + +#elif defined(__MRC__) && defined(MPW_CPLUS) + // Apple MPW MrCpp + #if __MRC__ < 0x500 + #error Apple MPW MrCpp v.5.0.0 or better compiler required + #endif + + #ifndef FLEXT_CPU + #if defined(__POWERPC__) + #define FLEXT_CPU FLEXT_CPU_PPC + #else + #define FLEXT_CPU FLEXT_CPU_UNKNOWN + #endif + #endif + + #ifndef FLEXT_OS + #if defined(macintosh) + #define FLEXT_OS FLEXT_OS_MACOS + #else + #define FLEXT_OS FLEXT_OS_UNKNOWN + #endif + #endif + #endif #if FLEXT_OS == FLEXT_OS_WIN +// #pragma message("Compiling for Windows") + #if FLEXT_SYS == FLEXT_SYS_MAX - #define WIN_VERSION 1 +// #define WIN_VERSION 1 #elif FLEXT_SYS == FLEXT_SYS_PD - #define NT +// #define PD +// #define NT #endif #elif FLEXT_OS == FLEXT_OS_LINUX - #if FLEXT_SYS == FLEXT_SYS_MAX +// #pragma message("Compiling for Linux") + + #if FLEXT_SYS == FLEXT_SYS_PD +// #define PD + #else #error "Flext SYS/OS combination unknown" #endif #elif FLEXT_OS == FLEXT_OS_IRIX - #if FLEXT_SYS == FLEXT_SYS_MAX +// #pragma message("Compiling for Irix") + + #if FLEXT_SYS == FLEXT_SYS_PD +// #define PD + #else #error "Flext SYS/OS combination unknown" #endif -#elif FLEXT_OS == FLEXT_OS_MACOS9 +#elif FLEXT_OS == FLEXT_OS_MACOS +// #pragma message("Compiling for MacOS") + #if FLEXT_SYS == FLEXT_SYS_PD - #error "Flext SYS/OS combination unknown" +// #define PD #endif -#elif FLEXT_OS == FLEXT_OS_MACOSX #else #error "Operating system could not be determined" #endif +#if FLEXT_SYS == FLEXT_SYS_MAX +// #pragma message("Compiling for Max/MSP") +#elif FLEXT_SYS == FLEXT_SYS_PD +// #pragma message("Compiling for PD") +#endif #endif -- cgit v1.2.1