Build Libraries
From OpenTom
Based on Ronald TomTom tips Open_PixelMap and ttmaps for the cairo library.
export CC=arm-linux-gcc export CXX=arm-linux-g++ export LD=arm-linux-ld export NM="arm-linux-nm -B" export AR="arm-linux-ar -r" export RANLIB=arm-linux-ranlib export STRIP=arm-linux-strip export OBJCOPY=arm-linux-objcopy export LN_S="ln -s" export CFLAGS="-g -O2 -I/home/tomtom/cross/base/include -I/home/tomtom/cross/base/include/freetype2 -I/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/" export CPPFLAGS=" -I/home/tomtom/cross/base/include -I/home/tomtom/cross/base/include/freetype2 -I/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/" export LDFLAGS=" -L/home/tomtom/cross/base/lib/" export CXXFLAGS="" export PKG_CONFIG_PATH="/home/tomtom/cross/base/lib/pkgconfig/"
cd /home/tomtom/cross rm -rf base libs include freetype-2.3.5 libjpeg-6b gd-2.0.35 libpng-1.2.24 zlib-1.2.3 mkdir base base/man base/man/man1 include libs tar zxvf zlib-1.2.3.tar.gz tar zxvf libpng-1.2.24.tar.gz tar jxvf libjpeg-6b.tar.bz2 tar jxvf gd-2.0.35.tar.bz2 tar zxvf freetype-2.3.5.tar.gz cd zlib-1.2.3/ CC=arm-linux-gcc ./configure --prefix=/home/tomtom/cross/base make make install export AR="arm-linux-ar"
cd ../freetype-2.3.5/ ./configure --build=i386-unknown-linux --host=arm-linux --prefix=/home/tomtom/cross/base/ make make install
cd ../expat-2.0.1 ./configure --host=arm-linux --prefix=/home/tomtom/cross/base/ make make install
cd fontconfig-2.4.2/ ./configure --host=arm-linux --prefix=/home/tomtom/cross/base/ --with-arch=arm --with-freetype-includes=/home/tomtom/cross/base/include/freetype2/ --with-freetype-config=/home/tomtom/cross/base/bin/freetype-config make make install
libcairo , patched to allow RGB16_565 mode. patch from David Hill. Read this message from the Cairo mailing list.
cd ../cairo-1.4.6 patch -p1 <attachment-0001.txt # vi src/cairo-type1-subset.c # #include <ft2build.h> #include FT_FREETYPE_H #include FT_OUTLINE_H #include FT_TYPE1_TABLES_H # ++++> add line #include <ctype.h>
./configure --host=arm-linux --prefix=/home/tomtom/cross/base/ make make install
cd ../gd-2.0.35/ ./configure --host=arm-linux --prefix=/home/tomtom/cross/base/ --with-fontconfig=no --with-xpm=no make make install
See also how to port SDL LibSDL

