Skip to content

Commit 3f05ed3

Browse files
committed
MacOS may not have core-utils installed so use sysctl instead to get the number of processors
1 parent 93e9e3c commit 3f05ed3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ CFLAGS += ${EXTRA_CFLAGS}
1515
CXXFLAGS += ${EXTRA_CXXFLAGS}
1616
LDFLAGS += $(EXTRA_LDFLAGS)
1717
MACHINE ?= $(shell uname -m)
18-
NPROC ?= $(shell nproc)
18+
ifeq ($(PLATFORM),OS_MACOSX)
19+
NPROC ?= $(shell sysctl -n hw.logicalcpu)
20+
else
21+
NPROC ?= $(shell nproc)
22+
endif
1923
ARFLAGS = ${EXTRA_ARFLAGS} rs
2024
STRIPFLAGS = -S -x
2125

0 commit comments

Comments
 (0)