00001
00002
00003
00004
00009 #pragma once
00010 #ifndef __NGE_COMPILE_CONFIG_H__
00011 #define __NGE_COMPILE_CONFIG_H__
00012
00013 #ifndef __cplusplus
00014 # error NUSoftware Game Engine requires C++
00015 #endif
00016
00018 #define NGE_SDK_VERSION "0.1 beta"
00019
00020 #define PLATFORM_WIN32 1
00021 #define PLATFORM_LINUX 2
00022
00023 #define COMPILER_MSVC 1
00024 #define COMPILER_GNUC 2
00025
00026 #if defined( _MSC_VER )
00027 # define GAME_COMPILER COMPILER_MSVC
00028 # define GAME_COMP_VER _MSC_VER
00029
00030 #elif defined( __GNUC__ )
00031 # define GAME_COMPILER COMPILER_GNUC
00032 # define GAME_COMP_VER (((__GNUC__)*100) + (__GNUC_MINOR__*10) + __GNUC_PATCHLEVEL__) // v3.4 -> 340
00033
00034 #else
00035 # error No known compiler. Abort! Abort!
00036 #endif
00037
00038 #if defined(WIN32) || defined(WIN64) || defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_WCE)
00039 # define GAME_PLATFORM PLATFORM_WIN32
00040
00041 #elif !defined(_XBOX) && !defined(OS2) && !defined(MACOSX)
00042 # define GAME_PLATFORM PLATFORM_LINUX
00043
00044 #else
00045 # error No known OS. Abort! Abort!
00046 #endif
00047
00048
00049 #if !defined(_M_IX86) && !defined(__x86_64__) && !defined(__i386__) && !defined(_X86_)
00050 # error No known Architecture. Abort! Abort!
00051 #endif
00052
00054
00055
00056 #define DEBUG_BUILD 1
00057 #define RELEASE_BUILD 2
00058
00059 #if defined(_DEBUG) && !defined(NDEBUG)
00060 # define BUILD_TYPE DEBUG_BUILD
00061 #elif !defined(_DEBUG) && defined(NDEBUG)
00062 # define BUILD_TYPE RELEASE_BUILD
00063 #endif
00064
00066 #if BUILD_TYPE == DEBUG_BUILD
00067 # define _NGE_DEBUG_BREAK_IF( _CONDITION_ ) _IRR_DEBUG_BREAK_IF( _CONDITION_ )
00068 #else
00069 # define _NGE_DEBUG_BREAK_IF( _CONDITION_ )
00070 #endif
00071
00073
00076 #define _NGE_DISABLE_CONSOLE_ON_VC_RELEASE
00077 #if defined(_NGE_DISABLE_CONSOLE_ON_VC_RELEASE)
00078 # if(GAME_PLATFORM == PLATFORM_WIN32) && (GAME_COMPILER == COMPILER_MSVC)
00079 # if BUILD_TYPE == DEBUG_BUILD
00080 # pragma comment(linker, "/subsystem:console")
00081 # else
00082 # pragma comment(linker, "/subsystem:windows /ENTRY:mainCRTStartup")
00083 # endif
00084 # endif
00085 #endif
00086
00087 #define _NGE_COMPILE_WITH_IRRKLANG_
00088
00089 #endif // __NGE_COMPILE_CONFIG_H__