先添加交叉编译工具环境变量:修改/etc/profile文件,在文件末尾添加export PATH=$PATH:/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/bin/mipsel-linux-gcc
source /etc/profile
echo $PATH
GTK-DirectFB 交叉编译过程:
14个源码包列表:
-rw------- 1 kendy kendy 666821 2008-08-04 10:14 atk-1.19.3.tar.bz2
-rw------- 1 kendy kendy 3216689 2008-08-04 10:14 cairo-1.4.10.tar.gz
-rw------- 1 kendy kendy 2624473 2008-08-04 10:14 DirectFB-1.2.8.tar.gz
-rw------- 1 kendy kendy 446456 2008-08-04 10:14 expat-2.0.1.tar.gz
-rw------- 1 kendy kendy 1278340 2008-08-07 10:55 fontconfig-2.4.2.tar.gz
-rw------- 1 kendy kendy 1279861 2008-08-04 10:15 freetype-2.3.5.tar.bz2
-rw------- 1 kendy kendy 2938164 2008-08-04 10:15 glib-2.12.13.tar.bz2
-rw------- 1 kendy kendy 15172170 2008-08-04 10:15 gtk+-2.10.14.tar.bz2
-rw------- 1 kendy kendy 613261 2008-08-04 10:15 jpegsrc.v6b.tar.gz
-rw------- 1 kendy kendy 650966 2008-08-07 10:23 libpng-1.2.19.tar.bz2
-rw------- 1 kendy kendy 4719760 2008-08-07 10:48 libxml2-2.6.29.tar.gz
-rw------- 1 kendy kendy 1355938 2008-08-04 10:15 pango-1.16.4.tar.bz2
-rw------- 1 kendy kendy 1282627 2008-08-04 10:15 tiff-3.7.4.tar.gz
-rw------- 1 kendy kendy 425209 2008-08-04 10:15 zlib-1.2.3.tar.bz2
安装目录选在/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross,以下是编译过程:
export PREFIX=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross
export LDFLAGS=-L$PREFIX/lib
export CFLAGS="-g -I$PREFIX/include"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
1.glib:
echo ac_cv_type_long_long=yes>mipsel-linux.cache
echo glib_cv_stack_grows=no>>mipsel-linux.cache
echo glib_cv_uscore=no>>mipsel-linux.cache
echo ac_cv_func_posix_getpwuid_r=yes>>mipsel-linux.cache
CC=mipsel-linux-gcc ./configure --host=mipsel-linux --build=i686-linux --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross --cache-file=mipsel-linux.cache
make
make install
2.atk
export PREFIX=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross
export LDFLAGS=-L$PREFIX/lib
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
./configure --host=mipsel-linux --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross
3. zlib
CC=mipsel-linux-gcc ./configure --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross --shared
4. jpeg-6b
./configure --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross --enable-shared --enable-static
修改生成的Makefile文件:
CC= gcc 改成 CC=mipsel-linux-gcc
AR= ar rc 该成 AR= mipsel-linux-ar rc
AR2= ranlib 该成 AR2=mipsel-linux-ranlib
mkdir /opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/man
mkdir /opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/man/man1
make
make install-lib
5. libpng
export LDFLAGS=-L/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/lib
export CFLAGS="-g -I/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/include"
./configure --host=mipsel-linux --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross
6. expat
./configure --host=mipsel-linux --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross
7. freetype
./configure --host=mipsel-linux --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross
8. libxml
./configure --host=mipsel-linux --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross
9. fontconfig
export LDFLAGS=-L/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/lib
export CFLAGS="-g -I/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/include"
export LIBXML2_CFLAGS=-I/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/include/libxml2
export LIBXML2_LIBS="-L/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/lib -lxml2"
./configure --host=mipsel-linux --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross --with-freetype-config=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross/bin/freetype-config --with-arch=arm
10. tiff
./configure --host=mipsel-linux --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross --enable-shared --enable-static
11.DirectFB
export PREFIX=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross
export LDFLAGS=-L$PREFIX/lib
export CFLAGS="-g -I$PREFIX/include"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
./configure -host=mipsel-linux --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross --with-gfxdrivers=none --enable-png --enable-jpeg --enable-tiff --enable-zlib --enable-sdl=no --enable-gif=no --disable-x11
12. cairo
./configure --host=mipsel-linux --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross --without-x --disable-xlib --disable-xlib-xrender --enable-directfb --enable-freetype --disable-win32 --enable-pdf --enable-ps --disable-svg --enable-png
13.pango
修改configure文件
have_cairo=true
have_cairo_png=true
have_cairo_freetype=true
./configure --host=mipsel-linux --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross --enable-cairo --without-x
14. gtk
export PREFIX=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross
export LDFLAGS="-L$PREFIX/lib -Wl,-rpath,$PREFIX/lib"
export CFLAGS="-g -I$PREFIX/include"
export CPPFLAGS="-I$PREFIX/include"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
./configure --host=mipsel-linux --prefix=/opt/tuxbuilder-1.0/mipsel-unknown-linux-gnu/cross --with-gdktarget=directfb --without-x
本文档为【GTK-DirectFB 交叉编译过程】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。