set -x DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" mkdir -p sdk/include LIB=tommath mkdir $LIB pushd $LIB git clone --depth 1 https://github.com/libtom/libtommath.git #--branch v1.2.0 cp -av $DIR/Makefile.project libtommath/ mv libtommath/makefile libtommath/makefile-no ln -s $DIR/../../Makefile-template libtommath/Makefile pushd libtommath make popd popd pushd sdk/include ln -fs ../../tommath/libtommath tommath cp $DIR/tommath.h . popd