source: zzuf/trunk/build-win32 @ 1701

Last change on this file since 1701 was 1701, checked in by Sam Hocevar, 13 years ago
  • Added DLL initialisation code for Win32.
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 789 bytes
Line 
1#! /bin/sh
2
3##  Win32 cross-compilation for zzuf -- Sam Hocevar <sam@zoy.org>
4##  $Id: build-win32 1701 2007-01-23 15:38:18Z sam $
5
6set -x
7set -e
8
9# Clean up our working directory
10SRCDIR="`pwd`"
11DIRNAME="zzuf-win32-`sed -ne 's/^AM_INIT_AUTOMAKE(.*, \(.*\)).*/\1/p' configure.ac`"
12INSTALLDIR="`pwd`/${DIRNAME}"
13BUILDDIR="${INSTALLDIR}/build"
14rm -Rf "${INSTALLDIR}"
15rm -f "${INSTALLDIR}.zip"
16mkdir "${INSTALLDIR}"
17mkdir "${BUILDDIR}"
18
19cd "${BUILDDIR}"
20# Build for win32
21"${SRCDIR}/configure" --host=i586-mingw32msvc --program-suffix=.exe --prefix=/ --bindir=/bin --libdir=/lib
22
23make pkglibdir=/lib pkgdatadir=/data bindir=/bin
24
25make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
26(cd "${SRCDIR}" && rm -Rf "${BUILDDIR}")
27
28# Pack the directory
29zip "${DIRNAME}.zip" `find "${DIRNAME}"`
30rm -Rf "${INSTALLDIR}"
31
Note: See TracBrowser for help on using the repository browser.