Path: blob/master/build/pkgs/genus2reduction/spkg-install
8817 views
#!/usr/bin/env bash
if [ "$SAGE_LOCAL" = "" ]; then
echo "SAGE_LOCAL undefined ... exiting";
echo "Maybe run 'sage -sh'?"
exit 1
fi
if [ "$SAGE64" = "yes" ]; then
echo "64 bit build"
CFLAGS="$CFLAGS -m64 "; export CFLAGS
fi
echo "Compiling genus2reduction.c"
cd src/
$CC $CFLAGS -O2 -I"$SAGE_LOCAL/include/pari" -L"$SAGE_LOCAL/lib" \
-o genus2reduction genus2reduction.c -lpari -lgmp -lm
if [ $? -ne 0 ]; then
echo "Error building genus2reduction"
exit 1
fi
if [ ! -f genus2reduction ]; then
echo "Mysterious error building genus2reduction"
exit 1
fi
cp genus2reduction "$SAGE_LOCAL"/bin/