#!/bin/bash

cd MP-SPDZ
echo CXX = clang++ >> CONFIG.mine
git clone git://github.com/wbhart/mpir.git

cd mpir
autoreconf -i
./configure --enable-cxx --prefix=`pwd`/../local
make -j8 install
cd ..
echo MY_CFLAGS += -I./local/include >> CONFIG.mine
echo MY_LDLIBS += -Wl,-rpath -Wl,./local/lib -L./local/lib >> CONFIG.mine

mkdir static
make -j8 {static/,}{{replicated,sy-rep,rep4}-ring-party,emulate}.x
