From 5dc22d90e1441ab8497ad16647028ba677565d48 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Sun, 9 Dec 2012 14:46:27 -0800 Subject: [PATCH] Manually integrated @gtbass OSX changes. --- .gitignore | 2 ++ include/bx/sem.h | 4 ++-- include/compat/osx/unordered_map | 1 + premake/toolchain.lua | 11 +++++++++++ 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 include/compat/osx/unordered_map diff --git a/.gitignore b/.gitignore index 75142f1..b1bb97b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .build/ .debug/ .svn/ +tags +.DS_Store diff --git a/include/bx/sem.h b/include/bx/sem.h index 2541053..dd00cf6 100644 --- a/include/bx/sem.h +++ b/include/bx/sem.h @@ -42,8 +42,8 @@ namespace bx bool wait(int32_t _msecs = -1) { -#if BX_PLATFORM_NACL - BX_CHECK(-1 == _msecs, "NaCl doesn't support sem_timedwait at this moment."); +#if BX_PLATFORM_NACL || BX_PLATFORM_OSX + BX_CHECK(-1 == _msecs, "NaCl and OSX don't support sem_timedwait at this moment."); return 0 == sem_wait(&m_handle); #else if (0 > _msecs) diff --git a/include/compat/osx/unordered_map b/include/compat/osx/unordered_map new file mode 100644 index 0000000..22f82dd --- /dev/null +++ b/include/compat/osx/unordered_map @@ -0,0 +1 @@ +#include diff --git a/premake/toolchain.lua b/premake/toolchain.lua index 94707c4..a4a4baa 100644 --- a/premake/toolchain.lua +++ b/premake/toolchain.lua @@ -283,5 +283,16 @@ function toolchain(_buildDir, _libDir) "_XBOX", } + configuration { "macosx" } + buildoptions { + "-U__STRICT_ANSI__", + "-Wunused-value", + "-msse2", + } + includedirs { bxDir .. "include/compat/osx" } + targetdir (_buildDir .. "osx" .. "/bin") + objdir (_buildDir .. "osx" .. "/obj") + libdirs { _libDir .. "lib/osx" } + configuration {} -- reset configuration end