/*!
	@file scolPlatform.h
	@brief OS detection macros.
*/

// LICENCE

#ifndef __SCOL_PLATFORM_H__
#define __SCOL_PLATFORM_H__

// List all supported OS.
#define SCOL_PLATFORM_WINDOWS 1
#define SCOL_PLATFORM_LINUX 2
#define SCOL_PLATFORM_APPLE 3	// Not supported yet!

// List all supported compilators.
#define SCOL_COMPILATOR_MSVC 1
#define SCOL_COMPILATOR_GNUC 2

// Compilator detection script.
#if defined(_MSC_VER)
#	define SCOL_COMPILATOR SCOL_COMPILATOR_MSVC
#	define SCOL_COMPILATOR_VERSION _MSC_VER
#	include "scolMSC.h"
#elif defined(__GNUC__)
#	define SCOL_COMPILATOR SCOL_COMPILATOR_GNUC
#	define SCOL_COMPILATOR_VERSION __VERSION__
#	include "scolGNUC.h"
#else
#	pragma error "No supported compilator found, abborting compilation!"
#endif

// OS detection script.
#if defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(_WINDOWS)
#	define SCOL_PLATFORM SCOL_PLATFORM_WINDOWS
#	include "scolMsWindows.h"
#elif defined(__APPLE_CC__)
#	define SCOL_PLATFORM SCOL_PLATFORM_APPLE
#	pragma error "Apple OS not supported yet, abborting compilation!"
#else
#	define SCOL_PLATFORM SCOL_PLATFORM_LINUX
#	include "scolLinux.h"
#endif

#endif
