aboutsummaryrefslogtreecommitdiffhomepage
path: root/sample/Makefile
diff options
context:
space:
mode:
authorGeoff Nixon <[email protected]>2014-01-11 09:48:58 -0800
committerGeoff Nixon <[email protected]>2014-01-11 15:04:06 -0800
commitb1b39339d8bb25b36bae5ebeb7da25818acc3d4b (patch)
treeee52ad80a5169ff228136e189b0cdbc9f27fbd63 /sample/Makefile
parent702d6e6683c322f08a36ea059f6d6f8263b1bd0d (diff)
downloadxbyak-b1b39339d8bb25b36bae5ebeb7da25818acc3d4b.tar.gz
xbyak-b1b39339d8bb25b36bae5ebeb7da25818acc3d4b.zip
Fixes for detection of <unordered_map> vs. <tr1/unordered_map>, 64-bit Darwin.
Hello! This is so cool looking, I can't wait to try it out. I ran into an immediate little problem though, the defines you were testing to determine whether to use <tr1/unordered_map> vs. <unordered_map> were wrong on my machine, and when I looked at it I saw there were a few other cases that it would be returning the incorrect header, especially on Darwin. Let me know if for some reason you think this is wrong, but I'm pretty confident that it now covers the various cases correctly. Also, I saw in the samples makefile how you were trying to correctly detect 32- or 64-bit on Darwin, which can be very tricky, because some versions of Mac OS X which are in fact fully cabable of running 64-bit binaries run a 32-bit kernel and Unix subsystem. So I went ahead and covered up the gaps there, if thats ok! :) ~Geoff
Diffstat (limited to 'sample/Makefile')
-rw-r--r--sample/Makefile21
1 files changed, 16 insertions, 5 deletions
diff --git a/sample/Makefile b/sample/Makefile
index 279707d..7772b1b 100644
--- a/sample/Makefile
+++ b/sample/Makefile
@@ -3,12 +3,23 @@ XBYAK_INC=../xbyak/xbyak.h
BOOST_EXIST=$(shell echo "\#include <boost/spirit/core.hpp>" | (gcc -E - 2>/dev/null) | grep "boost/spirit/core.hpp" >/dev/null && echo "1")
-BIT=32
-ifeq ($(shell uname -m),x86_64)
-BIT=64
-endif
ifeq ($(shell uname -s),Darwin)
-BIT=64
+ ifeq ($(shell uname -m),x86_64)
+ BIT=64
+ endif
+ ifeq ($(shell uname -m),i386)
+ BIT=32
+ endif
+ ifeq ($(shell sw_vers -productVersion | cut -c1-4 | sed 's/\.//'),105)
+ ifeq ($(shell sysctl -n hw.cpu64bit_capable),1)
+ BIT=64
+ endif
+ endif
+else
+ BIT=32
+ ifeq ($(shell uname -m),x86_64)
+ BIT=64
+ endif
endif
ifeq ($(BIT),64)