forked from Alepha/Alepha
Get processor count when building on FreeBSD
This commit is contained in:
@ -1,8 +1,13 @@
|
|||||||
# You can use this makefile in your
|
# You can use this makefile in your
|
||||||
# build directory to drive ninja builds.
|
# build directory to drive ninja builds.
|
||||||
|
|
||||||
processor_count=$(shell grep -c "^processor" /proc/cpuinfo)
|
# The makefile requires gnu make
|
||||||
#count=$(shell expr ${processor_count} - 1)
|
|
||||||
|
ifneq ("$(wildcard /proc/cpuinfo)","")
|
||||||
|
processor_count=$(shell grep -c "^processor" /proc/cpuinfo)
|
||||||
|
else # Assume FreeBSD for now...
|
||||||
|
processor_count=`sysctl -n kern.smp.cpus`
|
||||||
|
endif
|
||||||
count=$(shell expr $(processor_count) - 1 )
|
count=$(shell expr $(processor_count) - 1 )
|
||||||
|
|
||||||
__primary: test
|
__primary: test
|
||||||
|
Reference in New Issue
Block a user