1#!/bin/sh 2# produce the MinGW binary files for snapshots 3# !!!THIS SCRIPT IS FOR INTERNAL DEVELOPER USE ONLY!!! 4 5PWD=`pwd` 6cd .. 7date=`date +%Y.%m.%d` 8target=e:/dailies/$date 9mkdir -p $target/include/libusb-1.0 10cp -v libusb/libusb-1.0.def $target 11cp -v libusb/libusb.h $target/include/libusb-1.0 12 13# 14# 32 bit binaries 15# 16target=e:/dailies/$date/MinGW32 17git clean -fdx 18# Not using debug (-g) in CFLAGS DRAMATICALLY reduces the size of the binaries 19export CFLAGS="-O2 -m32" 20export LDFLAGS="-m32" 21export RCFLAGS="--target=pe-i386" 22export DLLTOOLFLAGS="-m i386 -f --32" 23echo `pwd` 24(glibtoolize --version) < /dev/null > /dev/null 2>&1 && LIBTOOLIZE=glibtoolize || LIBTOOLIZE=libtoolize 25$LIBTOOLIZE --copy --force || exit 1 26aclocal || exit 1 27autoheader || exit 1 28autoconf || exit 1 29automake -a -c || exit 1 30./configure 31make -j2 32mkdir -p $target/static 33mkdir -p $target/dll 34cp -v libusb/.libs/libusb-1.0.a $target/static 35cp -v libusb/.libs/libusb-1.0.dll $target/dll 36cp -v libusb/.libs/libusb-1.0.dll.a $target/dll 37make clean -j2 38 39# 40# 64 bit binaries 41# 42target=e:/dailies/$date/MinGW64 43export CFLAGS="-O2" 44export LDFLAGS="" 45export RCFLAGS="" 46export DLLTOOLFLAGS="" 47./configure 48make -j2 49mkdir -p $target/static 50mkdir -p $target/dll 51cp -v libusb/.libs/libusb-1.0.a $target/static 52cp -v libusb/.libs/libusb-1.0.dll $target/dll 53cp -v libusb/.libs/libusb-1.0.dll.a $target/dll 54cd $PWD 55