Skip to content

Commit

Permalink
parameterize subjobs
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 committed Dec 30, 2023
1 parent ef52596 commit 11d60a7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SHELL := bash
.DELETE_ON_ERROR:
# MAKEFLAGS += --warn-undefined-variables
# MAKEFLAGS += --no-builtin-rules
SUBJOBS := 4

BROTLI_VERSION := 1.0.9
# In case this is changed, update build-and-test-make.yml as well
Expand Down Expand Up @@ -67,7 +68,7 @@ help: ## Show this help message
firefox-build: $(CURL_VERSION)/.firefox ## Build the Firefox version of curl-impersonate
cd $(CURL_VERSION)
# Don't pass this Makefile's MAKEFLAGS
$(MAKE) MAKEFLAGS=-j4
$(MAKE) MAKEFLAGS=-j$(SUBJOBS)
.PHONY: firefox-build

firefox-checkbuild: ## Run basic checks on the built binary
Expand Down Expand Up @@ -116,7 +117,7 @@ firefox-clean: ## Clean build artifacts of the Firefox version. Use after re-run
chrome-build: $(CURL_VERSION)/.chrome ## Build the Chrome version of curl-impersonate
cd $(CURL_VERSION)
# Don't pass this Makefile's MAKEFLAGS
$(MAKE) MAKEFLAGS=-j4
$(MAKE) MAKEFLAGS=-j$(SUBJOBS)
.PHONY: chrome-build

chrome-checkbuild: ## Run basic checks on the built binary
Expand Down Expand Up @@ -201,7 +202,7 @@ $(brotli_static_libs): brotli-$(BROTLI_VERSION).tar.gz
-DCMAKE_SYSTEM_PROCESSOR=$(host_cpu) \
..

@cmake@ --build . --config Release --target install --parallel 4
@cmake@ --build . --config Release --target install --parallel $(SUBJOBS)


$(NSS_VERSION).tar.gz:
Expand All @@ -213,7 +214,7 @@ $(nss_static_libs): $(NSS_VERSION).tar.gz
ifeq ($(host),$(build))
# Native build, use NSS' build script.
cd $(NSS_VERSION)/nss
./build.sh -o --disable-tests --static --python=python3 -j 4
./build.sh -o --disable-tests --static --python=python3 -j $(SUBJOBS)
else
# We are cross compiling.
# Cross compiling NSS is not supported by its build script and is poorly
Expand Down Expand Up @@ -294,7 +295,7 @@ $(boringssl_static_libs): boringssl.zip boringssl/.patched
-DCMAKE_SYSTEM_PROCESSOR=$(host_cpu) \
-GNinja \
..
@ninja@ -j4
@ninja@ -j$(SUBJOBS)
# Fix the directory structure so that curl can compile against it.
# See https://everything.curl.dev/source/build/tls/boringssl
mkdir -p lib
Expand Down Expand Up @@ -323,7 +324,7 @@ $(nghttp2_static_libs): $(NGHTTP2_VERSION).tar.bz2
}

./configure $$config_flags
$(MAKE) MAKEFLAGS=-j4
$(MAKE) MAKEFLAGS=-j$(SUBJOBS)
$(MAKE) install MAKEFLAGS=

$(CURL_VERSION).tar.xz:
Expand Down

0 comments on commit 11d60a7

Please sign in to comment.