-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
44 lines (40 loc) · 1.23 KB
/
build.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
#!/bin/bash
# (Temporary script)
# Description: this script will build all the libfenc shared object and prototype tools that use the library.
# Author: Joseph Ayo Akinyele
cmd=$1
if [ $# -eq 0 ]; then
echo "$0: [ option ]"
echo "\toptions: help, all, src, tools, bench"
exit 1
fi
if [ $cmd == "all" ]; then
echo "Building src and tools..."
$(cd src; ./configure CC="gcc -arch i386" CXX="g++ -arch i386")
make -C src/
$(cd tools; ./configure CC="gcc -arch i386" CXX="g++ -arch i386")
make -C tools/
elif [ $cmd == "src" ]; then
echo "Building src..."
$(cd src; ./configure CC="gcc -arch i386" CXX="g++ -arch i386")
make -C src/
elif [ $cmd == "tools" ]; then
echo "Building tools..."
$(cd tools; ./configure CC="gcc -arch i386" CXX="g++ -arch i386")
make -C tools/
elif [ $cmd == "bench" ]; then
echo "Building library optimized..."
make -C src/ clean
$(cd src; ./configure CC="gcc -arch i386" CXX="g++ -arch i386" --enable-optimized)
make -C src/
make -C benchmarks/
elif [ $cmd == "docs" ]; then
echo "Building documentation..."
elif [ $cmd == "clean" ]; then
make -C src/ clean
make -C tools/ clean
else
echo "$0: [ option ]"
echo "\toptions: help, all, src, tools, docs"
fi
exit 0