2008-01-19 19:33:08 +00:00
ICONV_VERSION = 1.12
2009-09-26 08:15:31 +00:00
LIBCONFIG_VERSION = 1.3.2
2009-06-28 13:56:16 +00:00
BOOST_VERSION = 1_39_0
2009-09-26 08:15:31 +00:00
QT_VERSION = 4.5.3
2008-01-19 19:33:08 +00:00
PREFIX = $( shell pwd ) /inst
WGET = wget -c
# XXX: Hardcoded for mingw on linux, at the moment
CC = i586-mingw32msvc-gcc
CXX = i586-mingw32msvc-g++
CPPFLAGS += -I$( PREFIX) /include
2008-09-22 21:21:38 +00:00
CONFIGURE = CC = " $( CC) " CXX = " $( CXX) " CPPFLAGS = " $( CPPFLAGS) " ./configure --host= i586-mingw32msvc --build= i386-linux --prefix= $( PREFIX)
2008-01-19 19:33:08 +00:00
.PHONY : help all
2008-12-08 21:45:27 +00:00
all : .iconv .boost .qt .libconfig
2008-01-19 19:33:08 +00:00
2008-09-22 21:21:38 +00:00
help :
@echo "Usage: make all"
2008-01-19 19:33:08 +00:00
2009-09-26 08:15:31 +00:00
$(PREFIX) :
mkdir -p $@
2008-01-19 19:33:08 +00:00
### iconv ###
ICONV_DIR = libiconv-$( ICONV_VERSION)
ICONV_ARCHIVE = libiconv-$( ICONV_VERSION) .tar.gz
2009-09-26 08:15:31 +00:00
$(ICONV_ARCHIVE) : $( PREFIX )
2008-01-19 19:33:08 +00:00
$( WGET) http://ftp.gnu.org/pub/gnu/libiconv/$( ICONV_ARCHIVE)
2009-09-26 08:15:31 +00:00
$(ICONV_DIR) : $( ICONV_ARCHIVE )
tar xzf $<
2008-01-19 19:33:08 +00:00
.iconv : $( ICONV_DIR )
( cd $< && $( CONFIGURE) --enable-static --disable-shared && make && make install)
touch $@
2008-09-22 21:21:38 +00:00
### libconfig ###
LIBCONFIG_DIR = libconfig-$( LIBCONFIG_VERSION)
LIBCONFIG_ARCHIVE = libconfig-$( LIBCONFIG_VERSION) .tar.gz
2009-09-26 08:15:31 +00:00
$(LIBCONFIG_ARCHIVE) : $( PREFIX )
2008-09-22 21:21:38 +00:00
$( WGET) http://www.hyperrealm.com/libconfig/$( LIBCONFIG_ARCHIVE)
2009-09-26 08:15:31 +00:00
$(LIBCONFIG_DIR) : $( LIBCONFIG_ARCHIVE )
tar xvf $<
2008-09-22 21:21:38 +00:00
.libconfig : $( LIBCONFIG_DIR )
( cd $< && CFLAGS = -DLIBCONFIG_STATIC CXXFLAGS = -DLIBCONFIG_STATIC $( CONFIGURE) --enable-static --disable-shared && make && make install)
touch $@
2008-01-19 19:33:08 +00:00
### Boost ###
BOOST_DIR = boost_$( BOOST_VERSION)
BOOST_ARCHIVE = boost_$( BOOST_VERSION) .tar.bz2
2009-09-26 08:15:31 +00:00
$(BOOST_ARCHIVE) : $( PREFIX )
2008-01-19 19:33:08 +00:00
$( WGET) http://garr.dl.sourceforge.net/sourceforge/boost/$( BOOST_ARCHIVE)
2009-09-26 08:15:31 +00:00
$(BOOST_DIR) : $( BOOST_ARCHIVE )
tar xjf $<
2008-01-19 19:33:08 +00:00
# We don't build any library, because we don't need them (and it is really
# hard to cross-compile with their crappy build system)
.boost : $( BOOST_DIR )
#(cd $< && ./configure --prefix=$(PREFIX) && ./tools/jam/src/bin.linuxx86/bjam --toolset=gcc --prefix=$(PREFIX) --without-date_time --without-filesystem --without-graph --without-iostreams --without-program_options --without-python --without-regex --without-serialization --without-signals --without-test --without-thread --without-wave install)
cp -r $</boost $( PREFIX) /include
touch $@
### Qt ###
2009-09-26 08:15:31 +00:00
# FIXME: No automated way to build it at the moment :-(
2008-09-05 21:31:30 +00:00
QT_ARCHIVE = qt4-$( QT_VERSION) -win32-bin.tar.bz2
QT_DIR = qt4-$( QT_VERSION) -win32-bin
2008-01-19 19:33:08 +00:00
2009-09-26 08:15:31 +00:00
$(QT_ARCHIVE) : $( PREFIX )
$( WGET) http://dl.sv.nongnu.org/releases-noredirect/eliot/other/$( QT_ARCHIVE)
$(QT_DIR) : $( QT_ARCHIVE )
tar xjf $<
2008-01-19 19:33:08 +00:00
2008-09-05 21:31:30 +00:00
.qt : $( QT_DIR )
2009-09-26 08:15:31 +00:00
#(cd $<; mkdir -p $(PREFIX)/bin; mkdir -p $(PREFIX)/include; mkdir -p $(PREFIX)/lib/pkgconfig; rm -f $(PREFIX)/lib/pkgconfig/Qt*; sed 's,@@PREFIX@@,$(PREFIX),' lib/pkgconfig/QtCore.pc.in > $(PREFIX)/lib/pkgconfig/QtCore.pc; sed 's,@@PREFIX@@,$(PREFIX),' lib/pkgconfig/QtGui.pc.in > $(PREFIX)/lib/pkgconfig/QtGui.pc; cp -r include/* $(PREFIX)/include; cp lib/*a $(PREFIX)/lib; mkdir -p $(PREFIX)/share/qt4/translations; cp -r share/translations/* $(PREFIX)/share/qt4/translations)
( cd $<; cp -r bin include lib share $( PREFIX) ; sed 's,@@PREFIX@@,$(PREFIX),' $( PREFIX) /lib/pkgconfig/QtCore.pc.in > $( PREFIX) /lib/pkgconfig/QtCore.pc; sed 's,@@PREFIX@@,$(PREFIX),' lib/pkgconfig/QtGui.pc.in > $( PREFIX) /lib/pkgconfig/QtGui.pc; rm $( PREFIX) /lib/pkgconfig/*.in)
2008-01-19 19:33:08 +00:00
touch $@