Panda3D

dtool_platform.h

00001 /* Filename: dtool_platform.h
00002  * Created by:  drose (03Aug09)
00003  *
00004  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00005  *
00006  * PANDA 3D SOFTWARE
00007  * Copyright (c) Carnegie Mellon University.  All rights reserved.
00008  *
00009  * All use of this software is subject to the terms of the revised BSD
00010  * license.  You should have received a copy of this license along
00011  * with this source code in a file named "LICENSE."
00012  *
00013  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00014 
00015 #ifndef DTOOL_PLATFORM_H
00016 #define DTOOL_PLATFORM_H
00017 
00018 /* This file defines the macro DTOOL_PLATFORM, which is used in
00019    PandaSystem and a few other places to report the current platform
00020    string.  In practice, this string is primarily useful for the
00021    packaged runtime system. */
00022 
00023 #include "dtool_config.h"
00024 
00025 #if defined(DTOOL_PLATFORM)
00026 // This has already been defined explicitly by the Config.pp file.
00027 
00028 #elif defined(_WIN32)
00029 #define DTOOL_PLATFORM "win32"
00030 
00031 #elif defined(_WIN64)
00032 #define DTOOL_PLATFORM "win64"
00033 
00034 #elif defined(__APPLE__)
00035 #if defined(BUILD_IPHONE)
00036 #define DTOOL_PLATFORM "iphone"
00037 #elif defined(__ppc__)
00038 #define DTOOL_PLATFORM "osx_ppc"
00039 #elif defined(__i386__)
00040 #define DTOOL_PLATFORM "osx_i386"
00041 #elif defined(__x86_64)
00042 #define DTOOL_PLATFORM "osx_amd64"
00043 #endif
00044 
00045 #elif defined(__FreeBSD__)
00046 #if defined(__x86_64)
00047 #define DTOOL_PLATFORM "freebsd_amd64"
00048 #elif defined(__i386__)
00049 #define DTOOL_PLATFORM "freebsd_i386"
00050 #endif
00051 
00052 #elif defined(__x86_64)
00053 #define DTOOL_PLATFORM "linux_amd64"
00054 
00055 #elif defined(__i386)
00056 #define DTOOL_PLATFORM "linux_i386"
00057 
00058 #elif defined(__arm__)
00059 #define DTOOL_PLATFORM "linux_arm"
00060 
00061 #elif defined(__ppc__)
00062 #define DTOOL_PLATFORM "linux_ppc"
00063 #endif
00064 
00065 #ifndef DTOOL_PLATFORM
00066 #error "Can't determine platform; please define DTOOL_PLATFORM in Config.pp file."
00067 #endif
00068 
00069 
00070 
00071 #endif
00072 
 All Classes Functions Variables Enumerations