Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: sandbox_light/src/OrxonoxConfig.h.in @ 7142

Last change on this file since 7142 was 5789, checked in by rgrieder, 15 years ago

Stripped sandbox further down to get a light version that excludes almost all core features.
Also, the Ogre dependency has been removed and a little ogremath library been added.

  • Property svn:eol-style set to native
File size: 5.0 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Reto Grieder
24 *   Co-authors:
25 *      ...
26 *
27 *   Original code: OgrePlatform.h, licensed under the LGPL. The code
28 *   has changed almost completely though.
29 *
30 *   Caution: Do not configure this file CMake configuration (Debug, Release, etc.)
31 *            dependent! XCode and Visual Studio have the same file for all.
32 *
33 */
34
35/**
36@file
37@brief
38    Various constants for compiler, architecture and platform.
39@remarks
40    @GENERATED_FILE_COMMENT@
41*/
42
43#ifndef _OrxonoxConfig_H__
44#define _OrxonoxConfig_H__
45
46/*---------------------------------
47 * Platform and compiler related options
48 *-------------------------------*/
49#cmakedefine ORXONOX_PLATFORM_WINDOWS
50#cmakedefine ORXONOX_PLATFORM_LINUX
51#cmakedefine ORXONOX_PLATFORM_APPLE
52#cmakedefine ORXONOX_PLATFORM_UNIX /* Apple and Linux */
53
54// Determine compiler and set ORXONOX_COMP_VER
55#if defined( _MSC_VER )
56#  define ORXONOX_COMPILER_MSVC
57#  define ORXONOX_COMP_VER _MSC_VER
58
59#elif defined( __GNUC__ )
60#  define ORXONOX_COMPILER_GCC
61#  define ORXONOX_COMP_VER (((__GNUC__)*100) + \
62        (__GNUC_MINOR__*10) + \
63        __GNUC_PATCHLEVEL__)
64#  if defined(__MINGW32__)
65#    define ORXONOX_COMPILER_MINGW
66#  endif
67
68#elif defined( __BORLANDC__ )
69#  define ORXONOX_COMPILER_BORLAND
70#  define ORXONOX_COMP_VER __BCPLUSPLUS__
71
72#else
73#  pragma error "No known compiler. Abort!"
74
75#endif
76
77// Endianness
78#cmakedefine ORXONOX_BIG_ENDIAN
79#cmakedefine ORXONOX_LITTLE_ENDIAN
80
81// Architecture
82#cmakedefine ORXONOX_ARCH_32
83#cmakedefine ORXONOX_ARCH_64
84
85// See if we can use __forceinline or if we need to use __inline instead
86#cmakedefine HAVE_FORCEINLINE
87#ifndef FORCEINLINE
88#  ifdef HAVE_FORCEINLINE
89#    define FORCEINLINE __forceinline
90#  else
91#    define FORCEINLINE __inline
92#  endif
93#endif
94
95// Try to define function information
96#ifndef __FUNCTIONNAME__
97#  ifdef ORXONOX_COMPILER_BORLAND
98#    define __FUNCTIONNAME__ __FUNC__
99#  elif defined(ORXONOX_COMPILER_GCC)
100#    define __FUNCTIONNAME__ __PRETTY_FUNCTION__
101#  elif defined(ORXONOX_COMPILER_MSVC)
102#    define __FUNCTIONNAME__ __FUNCTION__
103#  else
104#    define __FUNCTIONNAME__
105#  endif
106#endif
107
108
109/*---------------------------------
110 * Options
111 *-------------------------------*/
112/**
113@def ORXONOX_RELEASE
114    Enables expensive (build time) optimisations and disables certain features
115*/
116#cmakedefine ORXONOX_RELEASE
117
118
119/*---------------------------------
120 * Includes and Declarations
121 *-------------------------------*/
122// Define the english written operators like and, or, xor
123// This is C++ standard, but the Microsoft compiler doesn't define them.
124#cmakedefine HAVE_ISO646_H
125#ifdef HAVE_ISO646_H
126#  include <iso646.h>
127#endif
128
129#cmakedefine HAVE_STDINT_H
130#ifdef HAVE_STDINT_H
131#  include <stdint.h>
132#elif defined(ORXONOX_COMPILER_MSVC)
133typedef __int8            int8_t;
134typedef __int16           int16_t;
135typedef __int32           int32_t;
136typedef __int64           int64_t;
137typedef unsigned __int8   uint8_t;
138typedef unsigned __int16  uint16_t;
139typedef unsigned __int32  uint32_t;
140typedef unsigned __int64  uint64_t;
141#endif
142
143#cmakedefine HAVE_STDDEF_H
144/* Quite large, do not include unless necessary
145#ifdef HAVE_STDDEF_H
146#  include <stddef.h>
147#endif
148*/
149
150// Always include the memory leak detector for MSVC except for actual releases
151// Note: Although officially supported, VLD does not work with MSVC 9
152#if defined(ORXONOX_COMPILER_MSVC) && _MSC_VER < 1500 && !defined(ORXONOX_RELEASE)
153#  include <vld.h>
154#endif
155
156// Forward declare the everywhere used std::string
157namespace std
158{
159    template<class _Elem> struct char_traits;
160    template<class _Ty>   class  allocator;
161    template<class _Elem, class _Traits, class _Ax> class basic_string;
162    typedef basic_string<char, char_traits<char>, allocator<char> > string;
163}
164
165// Import general purpose smart pointers
166namespace boost
167{
168    template<class T> class scoped_ptr;
169    template<class T> class shared_ptr;
170    template<class T> class weak_ptr;
171    template<class T> class intrusive_ptr;
172    template<class T> class shared_array;
173    template<class T> class scoped_array;
174}
175namespace orxonox
176{
177    using boost::scoped_ptr;
178    using boost::shared_ptr;
179    using boost::weak_ptr;
180    using boost::intrusive_ptr;
181    using boost::shared_array;
182    using boost::scoped_array;
183}
184
185#endif /* _OrxonoxConfig_H__ */
Note: See TracBrowser for help on using the repository browser.