#!/bin/sh set -e set -u version="${1}" libexec="$(cd "$(dirname "$0")"; pwd)" top="${libexec}/.." src="${2:-"${top}/src"}" platform=$(uname) NJOBS="${NJOBS:-$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || true)}" NJOBS="${NJOBS:-1}" echo "parallel job count: ${NJOBS}" cd "${src}/node-${version}" if command -v python3 >/dev/null 2>&1; then PYTHON="${PYTHON:-python3}" else PYTHON="${PYTHON:-python2}" fi case "${platform}" in SunOS) export CC="${CC:-/opt/local/gcc7/bin/gcc}" export CXX="${CXX:-/opt/local/gcc7/bin/g++}" ;; *) if cc --version | grep 4.9 >/dev/null; then export CC="${CC:-clang}" export CXX="${CXX:-clang++}" fi ;; esac case "$(uname -m)" in armv7l) enable_pointer_compression="" ;; *) enable_pointer_compression="--experimental-enable-pointer-compression" ;; esac "${PYTHON}" configure --openssl-no-asm --without-npm --shared --with-intl=full-icu ${enable_pointer_compression} make BUILDTYPE=Release config.gypi make BUILDTYPE=Release out/Makefile export PATH="${PWD}/out/tools/bin:${PATH}" make -j"${NJOBS}" -C out BUILDTYPE=Release V=0 libv8_monolith