forked from rieck/sally
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build
executable file
·61 lines (52 loc) · 1.31 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
59
60
61
#!/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
scarecrow*|freeze*)
echo "Configuration: Laptop"
CC="gcc" \
LDFLAGS="-L/usr/local/opt/libarchive/lib" \
CPPFLAGS="-I/usr/local/opt/libarchive/include" \
CFLAGS="-pedantic -pipe -O3 -g" \
./configure --prefix=/opt/rieck
;;
conversion)
echo "Configuration: Conversion"
CC="gcc" \
LDFLAGS="-L/usr/local/opt/libarchive/lib" \
CPPFLAGS="-I/usr/local/opt/libarchive/include" \
CFLAGS="-pedantic -pipe -O3 -g -Wconversion" \
./configure --prefix=/opt/rieck
;;
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