From ad368c9890beb1ee5dd4c53c907f5d5e29235299 Mon Sep 17 00:00:00 2001 From: David Griffith Date: Mon, 15 Jul 2019 02:42:46 -0700 Subject: [PATCH] Get the number of CPUs available with Linux. Not doing anything with it yet. --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 5da15b6..a368d1f 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,9 @@ ifneq ($(OS),Windows_NT) ifeq ($(UNAME_S),NetBSD) CFLAGS += -D_NETBSD_SOURCE endif + ifeq ($(UNAME_S),Linux) + NPROCS = $(shell grep -c ^processor /proc/cpuinfo) + endif endif # strdup, strndup @@ -123,6 +126,7 @@ AR ?= $(shell which ar) export CC export CFLAGS export CURSES_CFLAGS +export NPROCS export MAKEFLAGS export AR export RANLIB -- 2.34.1