mirror of https://gitlab.com/rnger/amath
48 lines
1.0 KiB
Bash
Executable File
48 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# This file is public domain
|
|
#
|
|
# Project homepage:
|
|
# https://amath.innolan.net
|
|
#
|
|
|
|
set -e
|
|
|
|
version="1.8.3"
|
|
|
|
echo "Building amath ${version} for Windows ..."
|
|
|
|
rm -f amath-${version}.zip
|
|
rm -Rf amath
|
|
rm -Rf dist
|
|
mkdir dist
|
|
|
|
./configure --enable-test --cross-compile="i686-w64-mingw32" CFLAGS="-DWINDOWS" LDFLAGS="-static -static-libgcc -static-libstdc++"
|
|
make clean
|
|
make static
|
|
mv amath dist/amath-${version}-x86.exe
|
|
make clean
|
|
|
|
./configure --enable-test --cross-compile="x86_64-w64-mingw32" CFLAGS="-DWINDOWS" LDFLAGS="-static -static-libgcc -static-libstdc++"
|
|
make static
|
|
mv amath dist/amath-${version}-x64.exe
|
|
make clean
|
|
|
|
#cd dist
|
|
#touch hashkeys.txt
|
|
#sha1sum amath-${version}-x86.exe >>hashkeys.txt
|
|
#sha1sum amath-${version}-x86.exe >>hashkeys.txt
|
|
#sha256sum amath-${version}-x86.exe >>hashkeys.txt
|
|
#sha256sum amath-${version}-x86.exe >>hashkeys.txt
|
|
#cd ..
|
|
|
|
tr '\n' '\r' <LICENSE >dist/license.txt
|
|
tr '\n' '\r' <HISTORY >dist/changes.txt
|
|
|
|
mkdir dist/script
|
|
cp script/* dist/script/
|
|
date -Ru >dist/build.txt
|
|
|
|
mv dist amath
|
|
zip -r amath-${version}.zip amath/*
|