mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-23 05:09:43 +00:00
Support capstone from r2pm via sys/install.sh
This commit is contained in:
parent
d4966927f7
commit
d4e46bf204
26
preconfigure
26
preconfigure
@ -4,19 +4,25 @@ MAKE=make
|
||||
gmake --version > /dev/null 2>&1
|
||||
[ $? = 0 ] && MAKE=gmake
|
||||
|
||||
|
||||
echo "[*] Finding `type ${MAKE}` OK"
|
||||
|
||||
if [ ! -f config-user.mk ]; then
|
||||
printf "[*] Configuring the build system ... "
|
||||
./configure > /dev/null 2>&1 || exit 1
|
||||
echo OK
|
||||
printf "[*] Configuring the build system ... "
|
||||
./configure > /dev/null 2>&1 || exit 1
|
||||
echo OK
|
||||
fi
|
||||
|
||||
# checks
|
||||
printf "[*] Checking out capstone... "
|
||||
rm -rf shlr/capstone
|
||||
${MAKE} -C shlr capstone > /dev/null 2>&1 || exit 1
|
||||
echo OK
|
||||
if [ -d "$HOME/.local/share/radare2/prefix/include/capstone" ]; then
|
||||
echo "[*] Using capstone from r2pm"
|
||||
export PKG_CONFIG_PATH
|
||||
else
|
||||
printf "[*] Checking out capstone... "
|
||||
rm -rf shlr/capstone
|
||||
${MAKE} -C shlr capstone > /dev/null 2>&1 || exit 1
|
||||
echo OK
|
||||
fi
|
||||
|
||||
V35WD=libr/arch/p/arm/v35
|
||||
printf "[*] Checking out vector35-arm64... "
|
||||
@ -33,10 +39,10 @@ if [ ! -d "${V35WD}/arch-armv7/.git" ]; then
|
||||
fi
|
||||
echo OK
|
||||
printf "[*] Running configure... "
|
||||
CFGARGS=""
|
||||
if [ `uname` = Linux ]; then
|
||||
./configure --with-rpath > /dev/null 2>&1
|
||||
else
|
||||
./configure > /dev/null 2>&1
|
||||
CFGARGS="${CFGARGS} --with-rpath"
|
||||
fi
|
||||
./configure ${CFGARGS} > /dev/null 2>&1
|
||||
echo OK
|
||||
echo "[*] Ready. You can now run 'make'."
|
||||
|
@ -139,6 +139,16 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# handle home installations of capstone via r2pm
|
||||
export PKG_CONFIG_PATH="${HOME}/.local/share/radare2/prefix/lib/pkgconfig/"
|
||||
if [ -d "$HOME/.local/share/radare2/prefix/include/capstone" ]; then
|
||||
# capstone's pkg-config is wrong :_____
|
||||
# export CFLAGS="$(pkg-config --cflags capstone)"
|
||||
# export LDFLAGS="$(pkg-config --libs capstone)"
|
||||
export CFLAGS="-I$HOME/.local/share/radare2/prefix/include"
|
||||
export LDFLAGS="-L$HOME/.local/share/radare2/prefix/lib"
|
||||
fi
|
||||
|
||||
NEED_CAPSTONE=1
|
||||
pkg-config --cflags capstone > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user