Make endianess detection more flexible

And fix it on FreeBSD, where _BIG_ENDIAN is not a flag indicating
big endian machine, but a constant to compare _BYTE_ORDER to.
Add simple CMakeLists.txt
Add Linux support to CMake
Merge branch 'endianess' of github.com:AMDmi3/SRB2
Merge branch 'cmake' of github.com:AMDmi3/SRB2
Merge branch 'master' of https://github.com/ilag11111/SRB2