From c83549101be1ce80dfbf049b7e4d8c5620c030dc Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Sun, 19 Nov 2023 01:37:17 -0500 Subject: [PATCH] Autodeduce CPU count. --- helpful-things/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/helpful-things/Makefile b/helpful-things/Makefile index 0cef424..b5be64c 100644 --- a/helpful-things/Makefile +++ b/helpful-things/Makefile @@ -1,10 +1,14 @@ # You can use this makefile in your # build directory to drive ninja builds. +processor_count=$(shell grep -c "^processor" /proc/cpuinfo) +#count=$(shell expr ${processor_count} - 1) +count=$(shell expr $(processor_count) - 1 ) + __primary: test all: - ninja -v -j19 all + ninja -v -j${count} all clean: ninja clean