-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlinux_builder.sh
56 lines (50 loc) · 1.54 KB
/
linux_builder.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
#!/bin/bash
#
# This script is used for building the system remotely in our build system. It
# does contain a basic outline of compilation, but requires a release number
# passed to it (although will work fine without it), will statically link the
# application, and makes assumptions of where the static libraries of LAPACK and
# BLAS are located. Result from command is placed in {this_directory}/linux/.
#
# Arguments
# 1 - release number
export FLAGS="-static -static-libgcc -O3 -msse3 -I /usr/lib/x86_64-linux-gnu"
LINUX_DIRECTORY=linux
rm -rf linux
mkdir linux
cd src/
# Build the version to be paired with the GUI
if ! ./configure --with-version-number=$1 --enable-interface=html CFLAGS="${FLAGS}" ; then
echo "Failure in html interface configuration"
exit 1
fi
if ! make clean; then
echo "Could not clean!"
exit 1
fi
if ! make poy.native; then
echo "Failure in make step"
exit 1
fi
cp _build/poy.native ../$LINUX_DIRECTORY/seq_poy.command
# Now we make the ncurses interface
if ! ./configure --with-version-number=$1 --enable-interface=ncurses CFLAGS="${FLAGS}" ; then
echo "Failure in ncurses interface configuration"
exit 1
fi
if ! make clean; then
echo "Could not clean!"
exit 1
fi
if ! make poy.native; then
echo "Failure in make step"
exit 1
fi
cp _build/poy.native ../$LINUX_DIRECTORY/ncurses_poy
#package ncurses around xterm call
cat > ../${LINUX_DIRECTORY}/ncurses_poy.command <<EOF
#!/bin/bash
xterm -e ../${LINUX_DIRECTORY}/ncurses_poy
EOF
chmod a+x ../${LINUX_DIRECTORY}/ncurses_poy.command
cd ..