Mana
Platform.h
Go to the documentation of this file.
1 
8 #pragma once
9 
10 #if !defined(MANA_TARGET_DETECTED)
11  #if defined(_WIN32) || defined(_WIN64)
12  #define MANA_TARGET_WINDOWS (1)
13  #if defined(_WIN64)
14  #define MANA_TARGET_WINDOWS_64 (1)
15  #elif defined(_WIN32)
16  #define MANA_TARGET_WINDOWS_32 (1)
17  #else
18  #error Platform Not Supported.
19  #endif
20  #elif defined(__APPLE__)
21  #define MANA_TARGET_APPLE (1)
22  #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
23  #define MANA_TARGET_IPHONE (1)
24  #define MANA_TARGET_EMBEDDED (1)
25  #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
26  #define MANA_TARGET_MAC_OSX (1)
27  #else
28  #error Platform Not Supported.
29  #endif
30  #elif defined(__unix__)
31  #define MANA_TARGET_UNIX (1)
32  #if defined(__GNUC__)
33  #endif
34  #else
35  #error Platform Not Supported.
36  #endif
37  #define MANA_TARGET_DETECTED
38 #endif
39 
40 #define MANA_BUILD_DEBUG (1)
41 #define MANA_BUILD_RELEASE (2)
42 #if defined(_DEBUG) || defined(DEBUG)
43 #define MANA_BUILD_TARGET MANA_BUILD_DEBUG
44 #else
45 #define MANA_BUILD_TARGET MANA_BUILD_RELEASE
46 #endif
47 
48 #define MANA_UNUSED_VAR(var) ((void)&(var))
49 #define MANA_ELEMENT_OF(var) (sizeof(var) / sizeof((var)[0]))
50 
51 #include "Type.h"