2013年9月3日 星期二

Static cross compile gtk-2.16.6+gtk-directfb+arm-linux (arm-linux-gcc-3.4.4+glib-2.3.5)

Refer to zsfly.cublog.cn GTK+/DirectFB

In Ubuntu 10.4 Desktop and "root" login

apt-get install build-essential libncurses5-dev

apt-get install autoconf

apt-get install libtool

apt-get install gettext

apt-get install libglib2.0-dev

apt-get install libgtk2.0-dev



//tslib 1.4

make clean

export PREFIX=/usr/gtkdfb

./autogen.sh

echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --cache-file=arm-linux.cache --enable-static=yes --enable-shared=no

make

make install


//zlib-1.2.3

make clean

export LDFLAGS=-L$PREFIX/lib

export CFLAGS="-I$PREFIX/include"

export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig

CC=arm-linux-gcc ./configure --prefix=$PREFIX

make

make install


Ps:its default static


//glib 2.24.1

make clean

export LDFLAGS=-L$PREFIX/lib

export CFLAGS="-g -I$PREFIX/include"

export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig

echo ac_cv_type_long_long=yes>arm-linux.cache

echo glib_cv_stack_grows=no>>arm-linux.cache

echo glib_cv_uscore=no>>arm-linux.cache

echo ac_cv_func_posix_getpwuid_r=yes>>arm-linux.cache

echo ac_cv_func_posix_getgrgid_r=yes>>arm-linux.cache

CC=arm-linux-gcc ./configure --host=arm-linux --build=i386-linux --prefix=$PREFIX --cache-file=arm-linux.cache --enable-static=yes --enable-shared=no

make

make install


//atk 1.29.2

make clean

CC=arm-linux-gcc ./configure --host=arm-linux --build=i386-linux --prefix=$PREFIX --enable-static=yes --enable-shared=no

make

make install


//jpeg6b

make clean

export CC=arm-linux-gcc

CC=arm-linux-gcc AR=arm-linux-ar AR2=arm-linux-ranlib ./configure --host=arm-linux --prefix=$PREFIX --enable-static=yes --enable-shared=no

mkdir $PREFIX/man

mkdir $PREFIX/man/man1

make

make install

make install-lib


6、libpng-1.2.33

make clean

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --enable-static=yes --enable-shared=no

make

make install


7、expat-2.0.1

make clean

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --enable-static=yes --enable-shared=no

make

make install



8、freetype-2.3.7

make clean

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --enable-static=yes --enable-shared=no

make

make install



9、libxml2-2.6.31

make clean

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --enable-static=yes --enable-shared=no

make

make install


10、fontconfig-2.6.0

make clean

export LIBXML2_CFLAGS=-I$PREFIX/include/libxml2

export LIBXML2_LIBS="-L$PREFIX/lib -lxml2"

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --with-freetype-config=$PREFIX/bin/freetype-config --with-arch=arm --enable-static=yes --enable-shared=no

make

make install



11、tiff-3.7.4

make clean

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --enable-static=yes --enable-shared=no

make

make install



12、DirectFB-1.3.0

make clean

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --with-gfxdrivers=none --enable-png --enable-jpeg --enable-tiff --enable-zlib --enable-sdl=no --enable-gif=no --disable-x11 --enable-static=yes --enable-shared=no

make

make install


Rember making execute file need add two links or system core error:
/usr/gtkdfb/lib/directfb-1.3-0/wmlibdirectfb_fbdev.o
/usr/gtkdfb/lib/directfb-1.3-0/wmlibdirectfbwm_default.o


13、pixman-0.12.0

make clean

export PKG_CONFIG_LIBDIR="$PREFIX/lib/pkgconfig"

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --enable-static=yes --enable-shared=no

make

make install


14、cairo-1.8.10

make clean

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --without-x --disable-xlib --disable-xlib-xrender --enable-directfb --enable-freetype --disable-win32 --enable-pdf --enable-ps --enable-png --enable-static=yes --enable-shared=no

make

make install


15、pango-1.20.2

修改configure文件,將下面一些參數改成true

have_cairo=true

have_cairo_png=true

have_cairo_ps=true

have_cairo_pdf=true

have_cairo_freetype=true


make clean

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --enable-static=yes --enable-shared=no --without-x --enable-cairo=yes --with-included-modules=basic-fc

make

make install


16、gtk+-2.16.6

mark function:

_gtk_marshal_OBJECT__VOID in gtk+-2.16.6/perf/marshalers.c

modify configure:

*** Can't link to Pango. Pango is required to build
*** GTK+. For more information see http://www.pango.org" >&2;}
{ (exit 1); exit 1; }; }
to
{ (echo 1); echo 1; }; }

make clean

export PREFIX=/usr/gtkdfb

export LDFLAGS="-L$PREFIX/lib -Wl,-rpath,$PREFIX/lib"

export CFLAGS="-I$PREFIX/include"

export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig

echo gio_can_sniff=yes>arm-linux.cache

echo ac_cv_path_GTK_UPDATE_ICON_CACHE=/usr/bin/gtk-update-icon-cache>>arm-linux.cache

echo ac_cv_path_GDK_PIXBUF_CSOURCE=/usr/bin/gdk-pixbuf-csource>>arm-linux.cache

CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --with-gdktarget=directfb --without-x --enable-static=yes --enable-shared=no --without-libtiff --without-libjpeg --without-libjasper --with-included-loaders=ani,bmp,ico,icns,pcx,png,gif,pnm,ras,tga,wbmp,xbm,xpm --disable-glibtest --cache-file=arm-linux.cache

or
CC=arm-linux-gcc ./configure --host=arm-linux --prefix=$PREFIX --with-gdktarget=directfb --without-x --disable-modules --with-included-loaders=ani,bmp,ico,icns,pcx,png,gif,pnm,ras,tga,wbmp,xbm,xpm --enable-static=yes --enable-shared=no --without-libtiff --without-libjpeg --disable-glibtest --cache-file=arm-linux.cache

make

make install


ps: go to gtk-demo remove debug info
strip -s gtk-demo

1 則留言:

  1. try this new framebuffer tool kit
    https://fatalfeel.blogspot.com/2013/12/awtk-framebuffer-gui.html

    回覆刪除