amath/buildwin

56 lines
1.5 KiB
Plaintext
Raw Normal View History

2017-02-27 22:23:06 +00:00
#!/bin/sh
2017-03-11 22:37:45 +00:00
set -e
2017-02-27 22:23:06 +00:00
version="1.7.0"
echo "Building amath ${version} for Windows ..."
2017-03-11 22:37:45 +00:00
rm -f amath-${version}.zip
2017-02-27 22:23:06 +00:00
rm -Rf amath
rm -Rf dist
mkdir dist
2017-03-11 22:37:45 +00:00
./configure --enable-test --cross-compile="i686-w64-mingw32" CFLAGS="-D_WIN32" LDFLAGS="-static -static-libgcc -static-libstdc++"
make clean
2017-02-27 22:23:06 +00:00
make static
mv amath dist/amath-${version}-x86.exe
make clean
2017-03-11 22:37:45 +00:00
./configure --enable-test --cross-compile="x86_64-w64-mingw32" CFLAGS="-D_WIN32" LDFLAGS="-static -static-libgcc -static-libstdc++"
2017-02-27 22:23:06 +00:00
make static
mv amath dist/amath-${version}-x64.exe
make clean
2017-03-11 22:37:45 +00:00
./configure --enable-test --cross-compile="i686-w64-mingw32" CFLAGS="-D_WIN32 -DANSICONSOLE" LDFLAGS="-static -static-libgcc -static-libstdc++"
2017-02-27 22:23:06 +00:00
make static
mv amath dist/amath-${version}-ansi-x86.exe
make clean
2017-03-11 22:37:45 +00:00
./configure --enable-test --cross-compile="x86_64-w64-mingw32" CFLAGS="-D_WIN32 -DANSICONSOLE" LDFLAGS="-static -static-libgcc -static-libstdc++"
2017-02-27 22:23:06 +00:00
make static
mv amath dist/amath-${version}-ansi-x64.exe
make clean
cd dist
touch hashkeys
sha1sum amath-${version}-x86.exe >>hashkeys
sha1sum amath-${version}-x86.exe >>hashkeys
sha1sum amath-${version}-ansi-x86.exe >>hashkeys
sha1sum amath-${version}-ansi-x64.exe >>hashkeys
sha256sum amath-${version}-x86.exe >>hashkeys
sha256sum amath-${version}-x86.exe >>hashkeys
sha256sum amath-${version}-ansi-x86.exe >>hashkeys
sha256sum amath-${version}-ansi-x64.exe >>hashkeys
cd ..
cp LICENSE dist/
cp HISTORY dist/
mkdir dist/script
cp script/* dist/script/
date -Ru >dist/build_date
mv dist amath
zip -r amath-${version}.zip amath/*