From 97258f53634d7237a2962aec3387f011047ce83b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 6 Jun 2021 14:31:01 +0200 Subject: build: add ninja build tool and make it available for cmake ninja is faster at building cmake packages than make, and according to reports also more reliable at handling parallel builds This commit includes a patch that adds GNU make jobserver support, in order to allow more precise control over the number of parallel tasks Enable parallel build by default for packages using ninja Signed-off-by: Felix Fietkau Signed-off-by: Rosen Penev --- rules.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rules.mk') diff --git a/rules.mk b/rules.mk index 51f822e3f1..8b24d3a3bb 100644 --- a/rules.mk +++ b/rules.mk @@ -342,6 +342,12 @@ else $(SCRIPT_DIR)/rstrip.sh endif +NINJA = \ + MAKEFLAGS="$(MAKE_JOBSERVER)" \ + $(STAGING_DIR_HOST)/bin/ninja \ + $(if $(findstring c,$(OPENWRT_VERBOSE)),-v) \ + $(if $(MAKE_JOBSERVER),,-j1) + ifeq ($(CONFIG_IPV6),y) DISABLE_IPV6:= else -- cgit v1.2.3