2021-07-31 08:48:40 +08:00
|
|
|
#!/bin/sh
|
2021-11-05 08:25:02 +08:00
|
|
|
# env setup
|
2021-08-25 19:53:08 +08:00
|
|
|
MAKE=make
|
2021-08-27 17:00:43 +08:00
|
|
|
gmake --version > /dev/null 2>&1
|
2021-08-25 19:53:08 +08:00
|
|
|
[ $? = 0 ] && MAKE=gmake
|
2021-11-05 08:25:02 +08:00
|
|
|
|
2023-08-01 23:51:36 +08:00
|
|
|
|
2022-03-22 02:00:22 +08:00
|
|
|
echo "[*] Finding `type ${MAKE}` OK"
|
2022-03-18 16:39:57 +08:00
|
|
|
|
|
|
|
if [ ! -f config-user.mk ]; then
|
2023-08-01 23:51:36 +08:00
|
|
|
printf "[*] Configuring the build system ... "
|
|
|
|
./configure > /dev/null 2>&1 || exit 1
|
|
|
|
echo OK
|
2022-03-18 16:39:57 +08:00
|
|
|
fi
|
|
|
|
|
2021-11-05 08:25:02 +08:00
|
|
|
# checks
|
2023-08-01 23:51:36 +08:00
|
|
|
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
|
2021-11-04 08:03:12 +08:00
|
|
|
|
2023-01-21 09:26:07 +08:00
|
|
|
V35WD=libr/arch/p/arm/v35
|
2021-10-20 02:21:36 +08:00
|
|
|
printf "[*] Checking out vector35-arm64... "
|
2021-11-04 08:03:12 +08:00
|
|
|
if [ ! -d "${V35WD}/arch-arm64/.git" ]; then
|
2021-11-05 08:25:02 +08:00
|
|
|
rm -rf ${V35WD}/arch-arm64
|
2021-11-04 08:03:12 +08:00
|
|
|
${MAKE} -C ${V35WD} arch-arm64 > /dev/null || exit 1
|
|
|
|
fi
|
2021-07-31 08:48:40 +08:00
|
|
|
echo OK
|
2021-10-20 02:21:36 +08:00
|
|
|
|
|
|
|
printf "[*] Checking out vector35-armv7... "
|
2021-11-04 08:03:12 +08:00
|
|
|
if [ ! -d "${V35WD}/arch-armv7/.git" ]; then
|
2021-11-05 08:25:02 +08:00
|
|
|
rm -rf ${V35WD}/arch-armv7
|
2021-11-04 08:03:12 +08:00
|
|
|
${MAKE} -C ${V35WD} arch-armv7 > /dev/null || exit 1
|
|
|
|
fi
|
2021-10-20 02:21:36 +08:00
|
|
|
echo OK
|
2022-03-18 16:39:57 +08:00
|
|
|
printf "[*] Running configure... "
|
2023-08-01 23:51:36 +08:00
|
|
|
CFGARGS=""
|
2021-09-08 04:19:15 +08:00
|
|
|
if [ `uname` = Linux ]; then
|
2023-08-01 23:51:36 +08:00
|
|
|
CFGARGS="${CFGARGS} --with-rpath"
|
2021-09-08 04:19:15 +08:00
|
|
|
fi
|
2023-08-01 23:51:36 +08:00
|
|
|
./configure ${CFGARGS} > /dev/null 2>&1
|
2022-03-18 16:39:57 +08:00
|
|
|
echo OK
|
|
|
|
echo "[*] Ready. You can now run 'make'."
|