i6engine  1.0
i6eSystemParameters.h
Go to the documentation of this file.
1 /*
2  * i6engine
3  * Copyright (2016) Daniel Bonrath, Michael Baer, All rights reserved.
4  *
5  * This file is part of i6engine; i6engine is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
25 #ifndef __I6ENGINE_UTILS_I6ESYSTEMPARAMETERS_H__
26 #define __I6ENGINE_UTILS_I6ESYSTEMPARAMETERS_H__
27 
28 #include "i6engine/i6engineBuildSettings.h"
29 
30 // Global platform specific defines
31 #define ISIXE_MPLATFORM_WIN32 1
32 #define ISIXE_MPLATFORM_LINUX 2
33 #define BOOST_ALL_DYN_LINK
34 #define WIN32_LEAN_AND_MEAN
35 // #define _WIN32_WINNT 0x0501
36 // Determine the current platform
37 #if defined(WIN32) || defined(__WIN32__) || defined(_WIN32)
38  #define ISIXE_MPLATFORM ISIXE_MPLATFORM_WIN32
39  #define WIN32_LEAN_AND_MEAN
40 #else
41  #define ISIXE_MPLATFORM ISIXE_MPLATFORM_LINUX
42 #endif
43 
44 // Debug/Release modes
45 #define I6E_DEBUG 1
46 #define I6E_RELEASE 2
47 
48 #if defined(NDEBUG)
49  #define ISIXE_MODE I6E_RELEASE
50 #else
51  #define ISIXE_MODE I6E_DEBUG
52 #endif
53 
54 // Dynamic library import/export macro
55 #ifndef ISIXE_UTILS_API
56  #if ISIXE_MPLATFORM == ISIXE_MPLATFORM_WIN32
57  #ifdef ISIXE_BUILD_SHARED
58  #ifdef i6engine_utils_EXPORTS
59  #define ISIXE_UTILS_API __declspec(dllexport)
60  #else
61  #define ISIXE_UTILS_API __declspec(dllimport)
62  #endif
63  #else
64  #define ISIXE_UTILS_API
65  #endif
66  #elif ISIXE_MPLATFORM == ISIXE_MPLATFORM_LINUX
67  #define ISIXE_UTILS_API
68  #else
69  #define ISIXE_UTILS_API
70  #endif
71 #endif
72 #ifndef ISIXE_MATH_API
73  #if ISIXE_MPLATFORM == ISIXE_MPLATFORM_WIN32
74  #ifdef ISIXE_BUILD_SHARED
75  #ifdef i6engine_math_EXPORTS
76  #define ISIXE_MATH_API __declspec(dllexport)
77  #else
78  #define ISIXE_MATH_API __declspec(dllimport)
79  #endif
80  #else
81  #define ISIXE_MATH_API
82  #endif
83  #elif ISIXE_MPLATFORM == ISIXE_MPLATFORM_LINUX
84  #define ISIXE_MATH_API
85  #else
86  #define ISIXE_MATH_API
87  #endif
88 #endif
89 #ifndef ISIXE_CORE_API
90  #if ISIXE_MPLATFORM == ISIXE_MPLATFORM_WIN32
91  #ifdef ISIXE_BUILD_SHARED
92  #ifdef i6engine_core_EXPORTS
93  #define ISIXE_CORE_API __declspec(dllexport)
94  #else
95  #define ISIXE_CORE_API __declspec(dllimport)
96  #endif
97  #else
98  #define ISIXE_CORE_API
99  #endif
100  #elif ISIXE_MPLATFORM == ISIXE_MPLATFORM_LINUX
101  #define ISIXE_CORE_API
102  #else
103  #define ISIXE_CORE_API
104  #endif
105 #endif
106 #ifndef ISIXE_MODULES_API
107  #if ISIXE_MPLATFORM == ISIXE_MPLATFORM_WIN32
108  #ifdef ISIXE_BUILD_SHARED
109  #ifdef i6engine_modules_EXPORTS
110  #define ISIXE_MODULES_API __declspec(dllexport)
111  #else
112  #define ISIXE_MODULES_API __declspec(dllimport)
113  #endif
114  #else
115  #define ISIXE_MODULES_API
116  #endif
117  #elif ISIXE_MPLATFORM == ISIXE_MPLATFORM_LINUX
118  #define ISIXE_MODULES_API
119  #else
120  #define ISIXE_MODULES_API
121  #endif
122 #endif
123 #ifndef ISIXE_RPG_API
124  #if ISIXE_MPLATFORM == ISIXE_MPLATFORM_WIN32
125  #ifdef ISIXE_BUILD_SHARED
126  #ifdef i6engine_rpg_EXPORTS
127  #define ISIXE_RPG_API __declspec(dllexport)
128  #else
129  #define ISIXE_RPG_API __declspec(dllimport)
130  #endif
131  #else
132  #define ISIXE_RPG_API
133  #endif
134  #elif ISIXE_MPLATFORM == ISIXE_MPLATFORM_LINUX
135  #define ISIXE_RPG_API
136  #else
137  #define ISIXE_RPG_API
138  #endif
139 #endif
140 
141 #ifndef ISIXE_LUA_API
142  #if ISIXE_MPLATFORM == ISIXE_MPLATFORM_WIN32
143  #define ISIXE_LUA_API __declspec(dllexport)
144  #else
145  #define ISIXE_LUA_API
146  #endif
147 #endif
148 
149 #ifdef _MSC_VER
150  #pragma warning(disable : 4251) // dll interface to be used by clients...
151 #endif
152 
153 #if ISIXE_MPLATFORM == ISIXE_MPLATFORM_LINUX
154 
157  typedef void * HWND;
158 #endif
159 
164 #endif /* __I6ENGINE_UTILS_I6ESYSTEMPARAMETERS_H__ */
165 
171 /*
172  * Documentation for all important macros. As doxygen doesn't offer an overview on all defined macros,
173  * a new html page is manually created, that will appear in the documentation. So please document
174  * your global macros here. At best in alphabetic order :)
175  */
void * HWND