2021-09-07 11:17:16 +00:00
|
|
|
export EDITOR="vim"
|
|
|
|
|
2021-11-08 14:03:34 +00:00
|
|
|
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
|
2021-10-06 22:16:38 +00:00
|
|
|
|
2021-10-06 23:39:23 +00:00
|
|
|
export CFLAGS="-march=native -O2"
|
2021-10-06 22:19:52 +00:00
|
|
|
export CXXFLAGS="$CFLAGS"
|
2021-10-06 22:16:38 +00:00
|
|
|
|
2021-08-28 10:22:05 +00:00
|
|
|
if [ -n "$(command -v clang)" ]; then
|
|
|
|
export CC=clang
|
|
|
|
else
|
|
|
|
export CC=gcc
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$(command -v clang++)" ]; then
|
|
|
|
export CXX=clang++
|
|
|
|
else
|
|
|
|
export CXX=g++
|
|
|
|
fi
|