devconf/shell/.zcustom/env.zsh
2023-11-12 19:23:55 +01:00

27 lines
642 B
Bash

export EDITOR="vim"
if [ $(uname -s) = "Darwin" ]; then
export MAKEOPTS="-j$(sysctl -n hw.ncpu)"
export PATH="/usr/local/opt/php@7.4/bin:$PATH"
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
if [ -n "$(command -v ruby)" ] && [ -n "$(command -v gem)" ]; then
PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"
fi