use `MAKE` variable when available, which can set `-j`

This commit is contained in:
Jacek Sieka 2024-06-04 17:14:24 +02:00
parent 2879227085
commit e34c8e825c
No known key found for this signature in database
GPG Key ID: A1B09461ABB656B8
1 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ REPO_DIR="${PWD}"
ROCKSDB_LIB_DIR="${REPO_DIR}/vendor/rocksdb"
BUILD_DEST="${REPO_DIR}/build/lib"
: "${MAKE:=make}"
[[ -z "$NPROC" ]] && NPROC=2 # number of CPU cores available
@ -32,12 +32,12 @@ export ROCKSDB_DISABLE_BZIP=1
export PORTABLE=1
export DEBUG_LEVEL=0
make -C "${ROCKSDB_LIB_DIR}" -j${NPROC} liblz4.a libzstd.a --no-print-directory > /dev/null
${MAKE} -C "${ROCKSDB_LIB_DIR}" liblz4.a libzstd.a --no-print-directory > /dev/null
export EXTRA_CFLAGS="-fpermissive -Wno-error -w -I${ROCKSDB_LIB_DIR}/lz4-1.9.4/lib -I${ROCKSDB_LIB_DIR}/zstd-1.5.5/lib -DLZ4 -DZSTD"
export EXTRA_CXXFLAGS="-fpermissive -Wno-error -w -I${ROCKSDB_LIB_DIR}/lz4-1.9.4/lib -I${ROCKSDB_LIB_DIR}/zstd-1.5.5/lib -DLZ4 -DZSTD"
make -C "${ROCKSDB_LIB_DIR}" -j${NPROC} static_lib --no-print-directory > /dev/null
${MAKE} -C "${ROCKSDB_LIB_DIR}" static_lib --no-print-directory > /dev/null
#cat "${REPO_DIR}/vendor/rocksdb/make_config.mk"