43 lines
984 B
Bash
Executable File
43 lines
984 B
Bash
Executable File
#!/bin/sh
|
|
# env setup
|
|
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
|
|
fi
|
|
|
|
# checks
|
|
printf "[*] Checking out capstone... "
|
|
rm -rf shlr/capstone
|
|
${MAKE} -C shlr capstone > /dev/null 2>&1 || exit 1
|
|
echo OK
|
|
|
|
V35WD=libr/arch/p/arm/v35
|
|
printf "[*] Checking out vector35-arm64... "
|
|
if [ ! -d "${V35WD}/arch-arm64/.git" ]; then
|
|
rm -rf ${V35WD}/arch-arm64
|
|
${MAKE} -C ${V35WD} arch-arm64 > /dev/null || exit 1
|
|
fi
|
|
echo OK
|
|
|
|
printf "[*] Checking out vector35-armv7... "
|
|
if [ ! -d "${V35WD}/arch-armv7/.git" ]; then
|
|
rm -rf ${V35WD}/arch-armv7
|
|
${MAKE} -C ${V35WD} arch-armv7 > /dev/null || exit 1
|
|
fi
|
|
echo OK
|
|
printf "[*] Running configure... "
|
|
if [ `uname` = Linux ]; then
|
|
./configure --with-rpath > /dev/null 2>&1
|
|
else
|
|
./configure > /dev/null 2>&1
|
|
fi
|
|
echo OK
|
|
echo "[*] Ready. You can now run 'make'."
|