elk/build-win32

26 lines
615 B
Bash
Executable File

#! /bin/sh
## Win32 cross-compilation for Elk -- Sam Hocevar <sam@zoy.org>
## $Id$
set -x
set -e
# Clean up our working directory
DIRNAME="elk-`sed -ne '/^VERSION/s/[^0-9]*//p' Makefile`"
DESTDIR="`pwd`/${DIRNAME}"
rm -Rf "${DIRNAME}"
rm -f "${DIRNAME}.zip"
mkdir "${DIRNAME}"
# To build for win32, I use:
# ./configure --host=i586-mingw32msvc --prefix=/ --bindir=/ --libdir=/
# make pkglibdir=/lib pkgdatadir=/scm
make install DESTDIR="${DESTDIR}" pkglibdir=/lib pkgdatadir=/scm
cp "src/.libs/libelk-0.dll" "${DESTDIR}"
# Pack the directory
zip "${DIRNAME}.zip" `find "${DIRNAME}"`
rm -Rf "${DIRNAME}"