Project

General

Profile

SO3Engine
SO3Platform.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OpenSpace3D
4For the latest info, see http://www.openspace3d.com
5
6Copyright (c) 2012 I-maginer
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU Lesser General Public License as published by the Free Software
10Foundation; either version 2 of the License, or (at your option) any later
11version.
12
13This program is distributed in the hope that it will be useful, but WITHOUT
14ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17You should have received a copy of the GNU Lesser General Public License along with
18this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20http://www.gnu.org/copyleft/lesser.txt
21
22-----------------------------------------------------------------------------
23*/
24
32#ifndef __SO3_PLATFORM_H__
33#define __SO3_PLATFORM_H__
34
35// List all planned OS.
36#define SO3_PLATFORM_WINDOWS 1
37#define SO3_PLATFORM_LINUX 2
38#define SO3_PLATFORM_APPLE 3
39#define SO3_PLATFORM_ANDROID 4
40#define SO3_PLATFORM_IOS 5
41
42// List all planned compilators.
43#define SO3_COMPILATOR_MSVC 1
44#define SO3_COMPILATOR_GNUC 2
45
46// Compilator detection script.
47#if defined(_MSC_VER)
48# define SO3_COMPILATOR SO3_COMPILATOR_MSVC
49# define SO3_COMPILATOR_VERSION _MSC_VER
50# include "SO3MSC.h"
51#elif defined(__GNUC__)
52# define SO3_COMPILATOR SO3_COMPILATOR_GNUC
53# define SO3_COMPILATOR_VERSION __VERSION__
54# include "SO3GNUC.h"
55#else
56# pragma error "No supported compilator found, abborting compilation!"
57#endif
58
59// OS detection script.
60#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(_WINDOWS)
61# define SO3_PLATFORM SO3_PLATFORM_WINDOWS
62# include "SO3MsWindows.h"
63#elif defined(__APPLE__) && !defined(APPLE_IOS)
64# define SO3_PLATFORM SO3_PLATFORM_APPLE
65# include "SO3OSX.h"
66#elif defined(APPLE_IOS)
67# define SO3_PLATFORM SO3_PLATFORM_IOS
68# include "SO3IOS.h"
69#elif defined(ANDROID)
70# define SO3_PLATFORM SO3_PLATFORM_ANDROID
71# include "SO3Android.h"
72#else
73# define SO3_PLATFORM SO3_PLATFORM_LINUX
74# include "SO3Linux.h"
75#endif
76
77#endif
Ms Windows specific options.
GCC compiler specific options.
Ms Windows specific options.
Microsoft compiler specific options.