radare2/sys/build.sh
pancake e241d81f4a Add --with-rpath to fix build on linux with !/usr
Do some changes in sys/ to make it happy
2012-08-27 17:02:58 +02:00

29 lines
507 B
Bash
Executable File

#!/bin/sh
MAKE_JOBS=8
PREFIX=/usr
[ ! "${PREFIX}" = /usr ] && \
CFGARG=--with-rpath
MAKE=make
gmake --help >/dev/null 2>&1
[ $? = 0 ] && MAKE=gmake
# find root
cd `dirname $PWD/$0` ; cd ..
ccache --help > /dev/null 2>&1
if [ $? = 0 ]; then
[ -z "${CC}" ] && CC=gcc
CC="ccache ${CC}"
export CC
fi
# build
${MAKE} mrproper > /dev/null 2>&1
[ "`uname`" = Linux ] && export LDFLAGS="-Wl,--as-needed"
rm -f plugins.cfg
./configure ${CFGARG} --prefix=${PREFIX} || exit 1
exec ${MAKE} -s -j ${MAKE_JOBS}