diff --git a/README.md b/README.md index 0d8c89b9..bd80dedd 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ - If you want to use custom build types but your system doesn't have `shasum` or `sha256sum`, add `force_build_dir=build/obj/some_identifier`. That directory will be used to store incremental build object files. Macros that you may want to define are listed in `src/h.h`. - Adding `builddir=1` to the make argument list will give you the build directory of the current configuration. Adding `clean=1` will clean that directory. +- Use `j=8` instead of `-j8` to override the default parallel job count (which is currently `4`). - Tests can be run with `./BQN path/to/mlochbaum/BQN/test/this.bqn` (add `-noerr` if using `make heapverify`). - Git submodules are used for Singeli, replxx, and bytecode. It's possible to override those by, respectively, linking/copying a local version to `build/singeliLocal`, `build/replxxLocal`, and `build/bytecodeLocal`. diff --git a/makefile b/makefile index 0e83c6b1..d3d4d710 100644 --- a/makefile +++ b/makefile @@ -142,12 +142,13 @@ endif ALL_CC_FLAGS = -std=gnu11 -Wall -Wno-unused-function -fms-extensions -ffp-contract=off -fno-math-errno $(CCFLAGS) $(f) $(i_f) $(NOWARN) -DBYTECODE_DIR=$(BYTECODE_DIR) -DSINGELI=$(i_singeli) -DFFI=$(i_FFI) $(i_LIBS_CC) ALL_LD_FLAGS = $(LDFLAGS) $(lf) $(i_lf) $(i_PIE) $(i_LIBS_LD) +j=4 ifneq (${manualJobs},1) ifeq (${MAKECMDGOALS},run_incremental_1) - MAKEFLAGS+= -j4 manualJobs=1 + MAKEFLAGS+= -j${j} manualJobs=1 endif ifeq (${MAKECMDGOALS},build_singeli) - MAKEFLAGS+= -j4 manualJobs=1 + MAKEFLAGS+= -j${j} manualJobs=1 endif endif