#ifndef _LIBNEC_H_
#define _LIBNEC_H_

/*	操作系统检测 | os identification
	NEC_WINDOWS : Windows
	NEC_MACOSX : Mac OS X
	NEC_LINUX : Linux
	NEC_FREEBSD : FreeBSD
	*/

/*	编译器检测 | compiler identification
	NEC_VISUAL_STUDIO : Microsoft Visual Studio
	NEC_MINGW32 : Mingw32
	NEC_GCC : gcc/g++
	*/

/*	字长 | word size
	NEC_64BITS : 64 bits OS
	NEC_WIN64 : 64 bits Windows
	NEC_WIN32 : 32 bits Windows
	NEC_LINUX64 : 64 bits Linux
	NEC_LINUX32 : 32 bits Linux
	NEC_FREEBSD64 : 64 bits FreeBSD
	NEC_FREEBSD32 : 32 bits FreeBSD
	*/

#if defined(_MSC_VER)
	#define NEC_VISUAL_STUDIO
	#define NEC_WINDOWS
	#ifdef _WIN64
		#define NEC_WIN64
		#define NEC_64BITS
	#else
		#define NEC_WIN32
	#endif
#elif defined(__MINGW32__)
	#define NEC_WINDOWS
	#define NEC_MINGW32
	#define NEC_WIN32
#elif defined(__linux)
	#define NEC_LINUX
	#define NEC_GCC
	#if __WORDSIZE==64
		#define NEC_LINUX64
		#define NEC_64BITS
	#else
		#define NEC_LINUX32
	#endif
#elif defined(__FreeBSD__)
	#define NEC_FREEBSD
	#define NEC_GCC
	#if __WORDSIZE==64
		#define NEC_FREEBSD64
		#define NEC_64BITS
	#else
		#define NEC_FREEBSD32
	#endif
#elif defined(__APPLE__) && defined(__MACH__)
	#define NEC_MACOSX
	#define NEC_GCC
#endif

/*	This is a hack. SDL by default want you to rename your main statement, and insert it's own first
	It does that to handle some init code. However, libtcod handles that for you. If we did this
	wrappers like libtcod-net would be hosed, since there is no main statement there.
	*/

#ifdef NEC_MACOSX
#define _SDL_main_h_
#include "SDL/SDL.h"
#endif

#define NEC_HEX_VERSION 0x000001
#define NEC_STR_VERSION "0.01"

