-
Notifications
You must be signed in to change notification settings - Fork 1
/
compile_all.sh
executable file
·77 lines (59 loc) · 1.59 KB
/
compile_all.sh
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
set -eux
which patch
which cargo
which autoreconf
which libtool
which make
which mvn
# Build thirdparty libraries
pushd "./thirdparty/mecab/mecab"
./configure --prefix=$(cd .. && pwd)/tmpusr --libdir=$(cd .. && pwd)/tmpusr/lib
make
make install
popd
pushd "./thirdparty/mecab/mecab-ipadic"
./configure --with-charset=utf8 --prefix=$(cd .. && pwd)/tmpusr --with-mecab-config=../mecab/mecab-config
make
make install
popd
pushd "./thirdparty/kytea"
autoreconf -i
./configure --prefix=$(pwd)/tmpusr --libdir=$(pwd)/tmpusr/lib
make
make install
popd
# Build benches
pushd "./bench/vaporetto-bench"
cargo build --release
popd
pushd "./bench/kytea-bench"
LIBRARY_PATH=$(cd ../.. && pwd)/thirdparty/kytea/tmpusr/lib g++ -std=c++11 -O3 ./main.cc -I../../thirdparty/kytea/tmpusr/include -lkytea
popd
pushd "./bench/mecab-ipadic-2_7_0-bench"
LIBRARY_PATH=$(cd ../.. && pwd)/thirdparty/mecab/tmpusr/lib g++ -std=c++11 -O3 ./main.cc -I../../thirdparty/mecab/tmpusr/include -lmecab
popd
pushd "./bench/mecab-unidic-3_1_1-bench"
LIBRARY_PATH=$(cd ../.. && pwd)/thirdparty/mecab/tmpusr/lib g++ -std=c++11 -O3 ./main.cc -I../../thirdparty/mecab/tmpusr/include -lmecab
popd
pushd "./bench/kuromoji-bench"
mvn compile
popd
pushd "./bench/lindera-ipadic-bench"
cargo build --release
popd
pushd "./bench/lindera-unidic-bench"
cargo build --release
popd
pushd "./bench/sudachi-bench"
mvn compile
popd
pushd "./bench/sudachirs-bench"
cargo build --release
popd
pushd "./bench/rust-tinysegmenter-bench"
cargo build --release
popd
pushd "./bench/vibrato-bench"
RUSTFLAGS='-C target-feature=+avx2' cargo build --release
popd