2011-01-16 22:41:38 +01:00
ICONV_VERSION = 1.13.1
2011-07-30 16:23:43 +02:00
LIBCONFIG_VERSION = 1.4.7
2011-01-16 22:41:38 +01:00
BOOST_VERSION = 1_42_0
2009-09-26 10:15:31 +02:00
QT_VERSION = 4.5.3
2009-12-06 01:07:35 +01:00
EXPAT_VERSION = 2.0.1
2011-01-16 22:41:38 +01:00
ARABICA_VERSION = 2010-November
LIBXML2_VERSION = 2.7.8
XERCES_VERSION = 3.1.1
2011-08-16 19:43:27 +02:00
APR_VERSION = 1.4.5
APU_VERSION = 1.3.12
2011-01-16 22:41:38 +01:00
LOG4CXX_VERSION = 0.10.0
2009-11-29 17:01:31 +01:00
2008-01-19 20:33:08 +01:00
PREFIX = $( shell pwd ) /inst
2009-12-05 18:07:49 +01:00
PREFIX_FLAG = $( PREFIX) /.flag
2008-01-19 20:33:08 +01:00
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 23:21:38 +02:00
CONFIGURE = CC = " $( CC) " CXX = " $( CXX) " CPPFLAGS = " $( CPPFLAGS) " ./configure --host= i586-mingw32msvc --build= i386-linux --prefix= $( PREFIX)
2008-01-19 20:33:08 +01:00
.PHONY : help all
2011-01-16 22:41:38 +01:00
all : .iconv .boost .qt .apr .apu .log 4cxx .libconfig .expat .arabica
2008-01-19 20:33:08 +01:00
2008-09-22 23:21:38 +02:00
help :
@echo "Usage: make all"
2008-01-19 20:33:08 +01:00
2009-12-05 18:07:49 +01:00
$(PREFIX_FLAG) :
mkdir -p $( PREFIX)
touch $@
2008-01-19 20:33:08 +01:00
2009-09-26 10:15:31 +02:00
2008-01-19 20:33:08 +01:00
### iconv ###
ICONV_DIR = libiconv-$( ICONV_VERSION)
2009-12-05 18:07:49 +01:00
ICONV_DIR_FLAG = $( ICONV_DIR) /.flag
2008-01-19 20:33:08 +01:00
ICONV_ARCHIVE = libiconv-$( ICONV_VERSION) .tar.gz
2009-12-05 18:07:49 +01:00
$(ICONV_ARCHIVE) : $( PREFIX_FLAG )
2009-11-29 17:01:31 +01:00
$( WGET) http://ftp.gnu.org/pub/gnu/libiconv/$@
2009-09-26 10:15:31 +02:00
2009-12-05 18:07:49 +01:00
$(ICONV_DIR_FLAG) : $( ICONV_ARCHIVE )
2009-09-26 10:15:31 +02:00
tar xzf $<
2009-12-05 18:07:49 +01:00
touch $@
2008-01-19 20:33:08 +01:00
2009-12-05 18:07:49 +01:00
.iconv : $( ICONV_DIR_FLAG )
( cd $( ICONV_DIR) && $( CONFIGURE) --enable-static --disable-shared && make && make install)
2008-01-19 20:33:08 +01:00
touch $@
2011-01-16 22:41:38 +01:00
### APR (needed by log4cxx) ###
APR_DIR = apr-$( APR_VERSION)
APR_DIR_FLAG = $( APR_DIR) /.flag
APR_ARCHIVE = apr-$( APR_VERSION) .tar.bz2
$(APR_ARCHIVE) : $( PREFIX_FLAG )
$( WGET) http://www.motorlogy.com/apachemirror/apr/$@
$(APR_DIR_FLAG) : $( APR_ARCHIVE )
tar xjf $<
touch $@
.apr : $( APR_DIR_FLAG )
( cd $( APR_DIR) && $( CONFIGURE) --enable-static --disable-shared && make && make install)
touch $@
### APU (needed by log4cxx) ###
APU_DIR = apr-util-$( APU_VERSION)
APU_DIR_FLAG = $( APU_DIR) /.flag
APU_ARCHIVE = apr-util-$( APU_VERSION) .tar.bz2
$(APU_ARCHIVE) : $( PREFIX_FLAG )
$( WGET) http://www.motorlogy.com/apachemirror/apr/$@
$(APU_DIR_FLAG) : $( APU_ARCHIVE )
tar xjf $<
touch $@
.apu : $( APU_DIR_FLAG )
( cd $( APU_DIR) && $( CONFIGURE) --with-apr= $( PREFIX) --enable-static --disable-shared && make && make install)
touch $@
### log4cxx ###
LOG4CXX_DIR = apache-log4cxx-$( LOG4CXX_VERSION)
LOG4CXX_DIR_FLAG = $( LOG4CXX_DIR) /.flag
LOG4CXX_ARCHIVE = apache-log4cxx-$( LOG4CXX_VERSION) .tar.gz
$(LOG4CXX_ARCHIVE) : $( PREFIX_FLAG )
$( WGET) http://apache.cyberuse.com/logging/log4cxx/$( LOG4CXX_VERSION) /$@
$(LOG4CXX_DIR_FLAG) : $( LOG 4CXX_ARCHIVE )
tar xzf $<
touch $@
.log4cxx : $( LOG 4CXX_DIR_FLAG )
2011-08-16 19:43:27 +02:00
( cd $( LOG4CXX_DIR) && patch -p0 < ../log4cxx-no-example.patch && patch -p0 < ../log4cxx-build-fixes.patch && $( CONFIGURE) --with-apr= $( PREFIX) --with-apu= $( PREFIX) --with-apr-util= $( PREFIX) --disable-doxygen --disable-dot --enable-static --disable-shared && make && make install)
2011-01-16 22:41:38 +01:00
touch $@
2008-09-22 23:21:38 +02:00
### libconfig ###
LIBCONFIG_DIR = libconfig-$( LIBCONFIG_VERSION)
2009-12-05 18:07:49 +01:00
LIBCONFIG_DIR_FLAG = $( LIBCONFIG_DIR) /.flag
2008-09-22 23:21:38 +02:00
LIBCONFIG_ARCHIVE = libconfig-$( LIBCONFIG_VERSION) .tar.gz
2009-12-05 18:07:49 +01:00
$(LIBCONFIG_ARCHIVE) : $( PREFIX_FLAG )
2009-11-29 17:01:31 +01:00
$( WGET) http://www.hyperrealm.com/libconfig/$@
2009-09-26 10:15:31 +02:00
2009-12-05 18:07:49 +01:00
$(LIBCONFIG_DIR_FLAG) : $( LIBCONFIG_ARCHIVE )
2009-09-26 10:15:31 +02:00
tar xvf $<
2009-12-05 18:07:49 +01:00
touch $@
2008-09-22 23:21:38 +02:00
2009-12-05 18:07:49 +01:00
.libconfig : $( LIBCONFIG_DIR_FLAG )
2011-07-30 16:23:43 +02:00
( cd $( LIBCONFIG_DIR) && patch -p0 < ../libconfig++-static-build.patch && CFLAGS = -DLIBCONFIG_STATIC CXXFLAGS = -DLIBCONFIGXX_STATIC $( CONFIGURE) --disable-examples --enable-static --disable-shared && make && make install)
2008-09-22 23:21:38 +02:00
touch $@
2008-01-19 20:33:08 +01:00
### Boost ###
BOOST_DIR = boost_$( BOOST_VERSION)
2009-12-05 18:07:49 +01:00
BOOST_DIR_FLAG = $( BOOST_DIR) /.flag
2008-01-19 20:33:08 +01:00
BOOST_ARCHIVE = boost_$( BOOST_VERSION) .tar.bz2
2009-12-05 18:07:49 +01:00
$(BOOST_ARCHIVE) : $( PREFIX_FLAG )
2009-11-29 17:01:31 +01:00
$( WGET) http://garr.dl.sourceforge.net/sourceforge/boost/$@
2009-09-26 10:15:31 +02:00
2009-12-05 18:07:49 +01:00
$(BOOST_DIR_FLAG) : $( BOOST_ARCHIVE )
2009-09-26 10:15:31 +02:00
tar xjf $<
2009-12-05 18:07:49 +01:00
touch $@
2008-01-19 20:33:08 +01: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)
2009-12-05 18:07:49 +01:00
.boost : $( BOOST_DIR_FLAG )
#(cd $(BOOST_DIR) && ./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_DIR) /boost $( PREFIX) /include
2008-01-19 20:33:08 +01:00
touch $@
### Qt ###
2009-09-26 10:15:31 +02:00
# FIXME: No automated way to build it at the moment :-(
2008-09-05 23:31:30 +02:00
QT_DIR = qt4-$( QT_VERSION) -win32-bin
2009-12-05 18:07:49 +01:00
QT_DIR_FLAG = $( QT_DIR) /.flag
QT_ARCHIVE = qt4-$( QT_VERSION) -win32-bin.tar.bz2
2008-01-19 20:33:08 +01:00
2009-12-05 18:07:49 +01:00
$(QT_ARCHIVE) : $( PREFIX_FLAG )
2009-11-29 17:01:31 +01:00
$( WGET) http://dl.sv.nongnu.org/releases-noredirect/eliot/other/$@
2009-09-26 10:15:31 +02:00
2009-12-05 18:07:49 +01:00
$(QT_DIR_FLAG) : $( QT_ARCHIVE )
2009-09-26 10:15:31 +02:00
tar xjf $<
2009-12-05 18:07:49 +01:00
touch $@
2008-01-19 20:33:08 +01:00
2009-12-05 18:07:49 +01:00
.qt : $( QT_DIR_FLAG )
2009-09-26 10:15:31 +02: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)
2009-12-05 18:07:49 +01:00
( cd $( QT_DIR) ; 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 20:33:08 +01:00
touch $@
2009-11-29 17:01:31 +01:00
2009-12-06 01:07:35 +01:00
### Expat ###
EXPAT_DIR = expat-$( EXPAT_VERSION)
EXPAT_DIR_FLAG = $( EXPAT_DIR) /.flag
EXPAT_ARCHIVE = expat-$( EXPAT_VERSION) .tar.gz
$(EXPAT_ARCHIVE) : $( PREFIX_FLAG )
2011-01-16 22:41:38 +01:00
$( WGET) http://kent.dl.sf.net/project/expat/expat/$( EXPAT_VERSION) /$@
2009-12-06 01:07:35 +01:00
$(EXPAT_DIR_FLAG) : $( EXPAT_ARCHIVE )
tar xzf $<
touch $@
.expat : $( EXPAT_DIR_FLAG )
( cd $( EXPAT_DIR) && $( CONFIGURE) --enable-static --disable-shared && make install)
touch $@
### Arabica ###
ARABICA_DIR = arabica-$( ARABICA_VERSION)
ARABICA_DIR_FLAG = $( ARABICA_DIR) /.flag
ARABICA_ARCHIVE = arabica-$( ARABICA_VERSION) .tar.bz2
$(ARABICA_ARCHIVE) : $( PREFIX_FLAG )
2011-01-16 22:41:38 +01:00
$( WGET) http://downloads.sf.net/project/arabica/arabica/November-10/$@
2009-12-06 01:07:35 +01:00
$(ARABICA_DIR_FLAG) : $( ARABICA_ARCHIVE )
tar xjf $<
touch $@
.arabica : $( ARABICA_DIR_FLAG )
( cd $( ARABICA_DIR) && patch -p0 < ../arabica-no-example.patch && $( CONFIGURE) --enable-static --disable-shared --with-parser= expat --with-expat= $( PREFIX) --with-boost= $( PREFIX) --with-tests= no --with-dom= no && make install)
touch $@
2009-11-29 17:01:31 +01:00
### LibXML 2 ###
LIBXML2_DIR = libxml2-$( LIBXML2_VERSION)
2009-12-05 18:07:49 +01:00
LIBXML2_DIR_FLAG = $( LIBXML2_DIR) /.flag
2009-11-29 17:01:31 +01:00
LIBXML2_ARCHIVE = libxml2-$( LIBXML2_VERSION) .tar.gz
2009-12-05 18:07:49 +01:00
$(LIBXML2_ARCHIVE) : $( PREFIX_FLAG )
2009-11-29 17:01:31 +01:00
$( WGET) ftp://xmlsoft.org/libxml2/$@
2009-12-05 18:07:49 +01:00
$(LIBXML2_DIR_FLAG) : $( LIBXML 2_ARCHIVE )
2009-11-29 17:01:31 +01:00
tar xzf $<
2009-12-05 18:07:49 +01:00
touch $@
2009-11-29 17:01:31 +01:00
# TODO: add more --without-xxx flags (apparently needed for build: pattern, debug)
# --with-legacy and --with-html are needed for arabica
2009-12-05 18:07:49 +01:00
.libxml2 : $( LIBXML 2_DIR_FLAG )
( cd $( LIBXML2_DIR) && $( CONFIGURE) --enable-static --disable-shared --with-legacy --without-schematron --without-tree --without-zlib --without-http --without-ftp --without-html --without-python --without-docbook --without-regexps && make install)
2009-11-29 17:01:31 +01:00
touch $@
2009-12-06 01:07:35 +01:00
### Xerces ###
2009-11-29 17:01:31 +01:00
2009-12-06 01:07:35 +01:00
XERCES_DIR = xerces-c-$( XERCES_VERSION)
XERCES_DIR_FLAG = $( XERCES_DIR) /.flag
XERCES_ARCHIVE = xerces-c-$( XERCES_VERSION) .tar.gz
2009-11-29 17:01:31 +01:00
2009-12-06 01:07:35 +01:00
$(XERCES_ARCHIVE) : $( PREFIX_FLAG )
$( WGET) http://mirrors.24-7-solutions.net/pub/apache/xerces/c/3/sources/$@
2009-11-29 17:01:31 +01:00
2009-12-06 01:07:35 +01:00
$(XERCES_DIR_FLAG) : $( XERCES_ARCHIVE )
tar xzf $<
2009-12-05 18:07:49 +01:00
touch $@
2009-11-29 17:01:31 +01:00
2009-12-06 01:07:35 +01:00
.xerces : $( XERCES_DIR_FLAG )
( cd $( XERCES_DIR) && $( CONFIGURE) --enable-static --disable-shared --disable-network && make install)
2009-11-29 17:01:31 +01:00
touch $@