summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild3
1 files changed, 2 insertions, 1 deletions
diff --git a/build b/build
index 5f604a0..0b00ac7 100755
--- a/build
+++ b/build
@@ -4,6 +4,7 @@ include ../source.mk
V = 1
KBUILD_ARCH = $$(oh-architecture "$${OPK_HOST_ARCH}")
+JOBS = $$(printf '%s\n' /sys/devices/system/cpu/cpu[0-9]* | wc -l)
# ProteanOS's GCC is currently broken: "-print-file-name=include" simply prints
# "include".
@@ -28,7 +29,7 @@ build:
sed $(nsif_sed) src/Makefile.orig 1>src/Makefile; \
fi; \
read img_src img_dest <image; \
- oh-autobuild -T "$${img_src}" -- -j "$${JOBS:-1}" V=$(V); \
+ oh-autobuild -T "$${img_src}" -- -j "$${JOBS:-$(JOBS)}" V=$(V); \
fi
touch $@