2020-02-07 13:50:29 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
2021-07-08 04:46:47 +08:00
|
|
|
if [ $# -ne 1 ]; then
|
|
|
|
echo "$0 expects one argument, the installation prefix."
|
2020-05-07 05:53:06 +08:00
|
|
|
exit 1
|
|
|
|
fi
|
2020-02-07 13:50:29 +08:00
|
|
|
|
2021-07-08 04:46:47 +08:00
|
|
|
prefix=$1
|
|
|
|
|
2022-03-20 22:28:24 +08:00
|
|
|
export CFLAGS+=" -Wno-unused-variable"
|
|
|
|
# leave the assertions in elfutils
|
|
|
|
export CPPFLAGS="${CPPFLAGS/-DNDEBUG/}"
|
|
|
|
|
2020-02-07 13:50:29 +08:00
|
|
|
cd sim/firesim-lib/src/main/cc/lib/elfutils
|
|
|
|
test -f configure || autoreconf -i -f
|
2021-07-08 04:46:47 +08:00
|
|
|
./configure --prefix="${prefix}" --enable-maintainer-mode
|
2020-02-07 13:50:29 +08:00
|
|
|
make
|
2022-04-13 08:24:00 +08:00
|
|
|
make install
|
2021-07-08 04:46:47 +08:00
|
|
|
# The build process modifies tracked sources. This to clean up after ourselves.
|
|
|
|
git reset --hard
|