mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2025-02-22 19:51:10 +00:00
Basic infrastructure to build on *BSD
This commit is contained in:
parent
471f51ef9b
commit
18e8dc4dc6
1 changed files with 20 additions and 5 deletions
|
@ -104,25 +104,40 @@ If you have questions concerning this license or the applicable additional terms
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Linux
|
// Unix
|
||||||
#ifdef __linux__
|
#ifdef __unix__
|
||||||
|
|
||||||
#define BUILD_OS_ID 2
|
#define BUILD_OS_ID 2
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
|
#define BUILD_OS "linux"
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
#define BUILD_OS "FreeBSD"
|
||||||
|
#elif defined(__DragonFly__)
|
||||||
|
#define BUILD_OS "DragonFly"
|
||||||
|
#elif defined(__OpenBSD__)
|
||||||
|
#define BUILD_OS "OpenBSD"
|
||||||
|
#elif defined(__NetBSD__)
|
||||||
|
#define BUILD_OS "NetBSD"
|
||||||
|
#else
|
||||||
|
#error unknown operating system!
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
#define BUILD_STRING "linux-x86"
|
|
||||||
#define CPUSTRING "x86"
|
#define CPUSTRING "x86"
|
||||||
#define CPU_EASYARGS 1
|
#define CPU_EASYARGS 1
|
||||||
#elif defined(__x86_64__)
|
#elif defined(__x86_64__)
|
||||||
#define BUILD_STRING "linux-x86_64"
|
|
||||||
#define CPUSTRING "x86_64"
|
#define CPUSTRING "x86_64"
|
||||||
#define CPU_EASYARGS 0
|
#define CPU_EASYARGS 0
|
||||||
#elif defined(__ppc__)
|
#elif defined(__ppc__)
|
||||||
#define BUILD_STRING "linux-ppc"
|
|
||||||
#define CPUSTRING "ppc"
|
#define CPUSTRING "ppc"
|
||||||
#define CPU_EASYARGS 0
|
#define CPU_EASYARGS 0
|
||||||
|
#else
|
||||||
|
#error unknown cpu architecture!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define BUILD_STRING (BUILD_OS "-" CPUSTRING)
|
||||||
|
|
||||||
#define _alloca alloca
|
#define _alloca alloca
|
||||||
#define _alloca16( x ) ((void *)((((uintptr_t)alloca( (x)+15 )) + 15) & ~15))
|
#define _alloca16( x ) ((void *)((((uintptr_t)alloca( (x)+15 )) + 15) & ~15))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue