2020-07-07 15:37:00 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-12-11 23:56:52 +00:00
|
|
|
rm -f vtoygpt_64
|
|
|
|
rm -f vtoygpt_32
|
|
|
|
rm -f vtoygpt_aa64
|
2020-07-07 15:37:00 +00:00
|
|
|
|
|
|
|
/opt/diet64/bin/diet -Os gcc -D_FILE_OFFSET_BITS=64 vtoygpt.c crc32.c -o vtoygpt_64
|
|
|
|
/opt/diet32/bin/diet -Os gcc -D_FILE_OFFSET_BITS=64 -m32 vtoygpt.c crc32.c -o vtoygpt_32
|
|
|
|
|
2020-12-11 23:56:52 +00:00
|
|
|
aarch64-buildroot-linux-uclibc-gcc -Os -static -D_FILE_OFFSET_BITS=64 vtoygpt.c crc32.c -o vtoygpt_aa64
|
2021-03-05 15:03:34 +00:00
|
|
|
mips64el-linux-musl-gcc -mips64r2 -mabi=64 -static -Os -D_FILE_OFFSET_BITS=64 vtoygpt.c crc32.c -o vtoygpt_m64e
|
|
|
|
|
2020-12-11 23:56:52 +00:00
|
|
|
|
2020-07-07 15:37:00 +00:00
|
|
|
#gcc -D_FILE_OFFSET_BITS=64 -static -Wall vtoygpt.c -o vtoytool_64
|
|
|
|
#gcc -D_FILE_OFFSET_BITS=64 -Wall -m32 vtoygpt.c -o vtoytool_32
|
|
|
|
|
2021-03-05 15:03:34 +00:00
|
|
|
if [ -e vtoygpt_64 ] && [ -e vtoygpt_32 ] && [ -e vtoygpt_aa64 ] && [ -e vtoygpt_m64e ]; then
|
2020-07-07 15:37:00 +00:00
|
|
|
echo -e '\n############### SUCCESS ###############\n'
|
2020-12-11 23:56:52 +00:00
|
|
|
mv vtoygpt_64 ../INSTALL/tool/x86_64/vtoygpt
|
|
|
|
mv vtoygpt_32 ../INSTALL/tool/i386/vtoygpt
|
|
|
|
|
|
|
|
aarch64-buildroot-linux-uclibc-strip --strip-all vtoygpt_aa64
|
|
|
|
mv vtoygpt_aa64 ../INSTALL/tool/aarch64/vtoygpt
|
2021-03-05 15:03:34 +00:00
|
|
|
|
|
|
|
mips64el-linux-musl-strip --strip-all vtoygpt_m64e
|
|
|
|
mv vtoygpt_m64e ../INSTALL/tool/mips64el/vtoygpt
|
|
|
|
|
2020-07-07 15:37:00 +00:00
|
|
|
else
|
|
|
|
echo -e '\n############### FAILED ################\n'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|