buidexfat.sh 1.18 KB
Newer Older
longpanda's avatar
longpanda committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
# 
# For 32bit, for example CentOS 6.10 i386 
# automake 1.11.1 must update to automake 1.11.2
# pkg-config must be installed
#
#

if uname -a | egrep -q 'x86_64|amd64'; then
    opt=
else
    opt=-lrt
fi

CUR="$PWD"

if ! [ -e LIBFUSE ]; then
	./buidlibfuse.sh
fi


rm -f EXFAT/shared/*
rm -f EXFAT/static/*


rm -rf exfat-1.3.0
unzip exfat-1.3.0.zip


cd exfat-1.3.0
autoreconf --install
./configure --prefix="$CUR" CFLAGS='-static -O2 -D_FILE_OFFSET_BITS=64' FUSE_CFLAGS="-I$CUR/LIBFUSE/include/" FUSE_LIBS="$CUR/LIBFUSE/lib/libfuse.a -pthread $opt -ldl"
make

strip --strip-all fuse/mount.exfat-fuse
strip --strip-all mkfs/mkexfatfs

cp fuse/mount.exfat-fuse ../EXFAT/static/mount.exfat-fuse
cp mkfs/mkexfatfs ../EXFAT/static/mkexfatfs

cd ..
rm -rf exfat-1.3.0

unzip exfat-1.3.0.zip

cd exfat-1.3.0
autoreconf --install
./configure --prefix="$CUR" CFLAGS='-O2 -D_FILE_OFFSET_BITS=64' FUSE_CFLAGS="-I$CUR/LIBFUSE/include/" FUSE_LIBS="$CUR/LIBFUSE/lib/libfuse.a -lpthread -ldl $opt"
make

strip --strip-all fuse/mount.exfat-fuse
strip --strip-all mkfs/mkexfatfs

cp fuse/mount.exfat-fuse ../EXFAT/shared/mount.exfat-fuse
cp mkfs/mkexfatfs ../EXFAT/shared/mkexfatfs

cd ..
rm -rf exfat-1.3.0