devconf/.zcustom/env.zsh
2021-11-08 15:03:34 +01:00

22 lines
458 B
Bash

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 CFLAGS="-march=native -O2"
export CXXFLAGS="$CFLAGS"
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