Add MAKEOPTS for Mac OS

This commit is contained in:
Leon Grünewald 2021-11-08 15:03:34 +01:00
parent d2191564a4
commit 1a82638336

View file

@ -1,7 +1,11 @@
export EDITOR="vim" export EDITOR="vim"
if [ $(uname -s) = "Darwin" ]; then
export MAKEOPTS="-j$(sysctl -n hw.ncpu)"
else
export MAKEOPTS="-j$(cat /proc/cpuinfo | awk -F: '$1 ~ /cpu cores/ { print $2 }' | head -n 1 | tr -d ' ')"
fi
export MAKEOPTS="-j$(cat /proc/cpuinfo | awk -F: '$1 ~ /cpu cores/ { print $2 }' | head -n 1 | tr -d ' ')"
export CFLAGS="-march=native -O2" export CFLAGS="-march=native -O2"
export CXXFLAGS="$CFLAGS" export CXXFLAGS="$CFLAGS"