27 lines
642 B
Bash
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
|