GNUmakefile: do number of cores detection same as BSD, system_profiler apparently...
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 14 Mar 2011 16:11:56 +0000 (16:11 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 14 Mar 2011 16:11:56 +0000 (16:11 +0000)
GNUmakefile

index e8571064883ec9994b90c0195b147bb58ca70fd6..088947c9ddb52ba75987a6a242ace4e00803e63d 100644 (file)
@@ -53,7 +53,7 @@ ifeq ($(OS), Linux)
        NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)
 endif
 ifeq ($(OS), Darwin)
-       NPROCS:=$(shell system_profiler SPHardwareDataType | awk '/Total Number Of Cores/ {print $5}{next;};')
+       NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3)
        # make install not support on mac yet 
        DEFAULT_TARGET=
 endif