From: David Griffith Date: Mon, 15 Jul 2019 09:42:46 +0000 (-0700) Subject: Get the number of CPUs available with Linux. Not doing anything with it yet. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=ad368c9890beb1ee5dd4c53c907f5d5e29235299;p=liskon_frotz.git Get the number of CPUs available with Linux. Not doing anything with it yet. --- 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