-
Notifications
You must be signed in to change notification settings - Fork 17
/
build
executable file
·58 lines (52 loc) · 1.27 KB
/
build
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
#!/bin/sh
# Make sure autotools are setup
if ! test -f ./configure ; then
autoreconf --install --force --symlink
fi
# Get requested configuration
if test -n "$1" ; then
arg=$1
else
arg=`hostname`
fi
# Apply configuration
case $arg in
freeze*|hush*)
echo "Configuration: Laptop (TUBS)"
CC="gcc" \
LDFLAGS="-L/usr/local/lib -L/usr/local/opt/libarchive/lib" \
CPPFLAGS="-I/usr/local/include -I/usr/local/opt/libarchive/include" \
CFLAGS="-pedantic -pipe -O3 -g" \
./configure --prefix=/opt/rieck
;;
compute*)
echo "Configuration: Compute (TUBS)"
CC="gcc" \
LDFLAGS="" \
CPPFLAGS="" \
CFLAGS="-pedantic -pipe -O3 -g" \
./configure --prefix=$HOME/usr
;;
profile|debug)
echo "Configuration: Profiling & Debugging"
CC="gcc" \
LDFLAGS="-L/usr/local/opt/libarchive/lib -g -lprofiler" \
CPPFLAGS="-I/usr/local/opt/libarchive/include" \
CFLAGS="-g -lprofiler -Wl,-no_pie" \
./configure --prefix=/opt/rieck
;;
*)
echo "Unknown system or configuration"
exit
;;
esac
if test $? -gt 0 ; then
echo "Error: Configuration failed"
exit 1
fi
echo
echo "Done. Press <enter> to compile"
read x
# Compile
make clean
make -j 4