From e232388bdc10159e581db161e2940204230de765 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Fri, 2 Aug 2024 23:14:47 -0400 Subject: [PATCH] Permit tuning CPU usage in build from env var --- helpful-things/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helpful-things/Makefile b/helpful-things/Makefile index 4c2d661..fdff946 100644 --- a/helpful-things/Makefile +++ b/helpful-things/Makefile @@ -3,12 +3,13 @@ # The makefile requires gnu make +RESERVED_CPUS?=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) - $(RESERVED_CPUS) ) __primary: test