Ventoy/vtoyfat/fat_io_lib/buildlib.sh

34 lines
402 B
Bash
Raw Normal View History

2020-04-04 12:07:50 -04:00
#!/bin/sh
if ! [ -f fat_io_lib.zip ]; then
echo "No fat_io_lib.zip found ..."
exit 1
fi
unzip fat_io_lib.zip
2020-04-04 12:07:50 -04:00
rm -rf include
rm -rf lib
2020-04-04 12:07:50 -04:00
cd release
gcc -O2 -D_FILE_OFFSET_BITS=64 fat*.c -c
ar -rc libfat_io_64.a *.o
rm -f *.o
gcc -m32 -O2 -D_FILE_OFFSET_BITS=64 fat*.c -c
ar -rc libfat_io_32.a *.o
rm -f *.o
cd -
mkdir lib
mkdir include
mv release/*.a lib/
cp -a release/*.h include/