aboutsummaryrefslogtreecommitdiff
path: root/build.env
blob: 0e8dd8bfd7e67b5892074aec20b2ac19a7a075e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# The toolchain will be installed into PREFIX
export PREFIX=/usr/local/pacman

# Setup toolchain search paths
export PATH=$PREFIX/bin:$PREFIX/sbin:$PATH
export MANPATH=$PREFIX/share/man:$MANPATH
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig

# Basic compile/link flags
export CFLAGS="-I$PREFIX/include -O2 -pipe"
export LDFLAGS="-L$PREFIX/lib"

# Use the most basic locale possible
export LANG=C

# Helper for `make -j` calls
export CPU_COUNT=$(python -c 'import os; print(os.cpu_count())')
if (( CPU_COUNT > 1 )); then (( CPU_COUNT-- )); fi