<libmaxsi/platform.h> now autodetects the current platform.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-05-27 23:08:20 +02:00
parent 87b81080d5
commit 4b252fc55e
1 changed files with 8 additions and 2 deletions

View File

@ -1,6 +1,6 @@
/******************************************************************************
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011.
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011, 2012.
This file is part of LibMaxsi.
@ -20,11 +20,17 @@
platform.h
Defines platform specific stuff.
******************************************************************************/
*******************************************************************************/
#ifndef LIBMAXSI_PLATFORM_H
#define LIBMAXSI_PLATFORM_H
#if !defined(PLATFORM_X64) && defined(__x86_64__)
#define PLATFORM_X64
#elif !defined(PLATFORM_X86) && defined(__i386__)
#define PLATFORM_X86
#endif
// Detect which platform we are compiling to and declare some useful macros.
#ifdef PLATFORM_X86
#define CPU X86