资源介绍:解压 sdl.tar.bz2 包后, 有 data.tar lib.tar sdlpal.tar 三个压缩包, data.tar 是仙剑的运行资源,lib.tar 是仙剑的编译和运行需要的库,sdlpal.tar 是仙剑的源码。
一、首先编译安装仙剑编译和运行需要的库
1.安装 freetype
[root@localhost lib]# tar -zxvf freetype-2.3.11.tar.gz
[root@localhost lib]# cd freetype-2.3.11
[root@localhost freetype-2.3.11]# ./configure --host=arm-linux --prefix=$PWD/../../output/arm-linux
[root@localhost freetype-2.3.11]# make -j4
[root@localhost freetype-2.3.11]# make install
2.安装 zlib
[root@localhost lib]# tar -zxvf zlib-1.2.3.tar.gz
[root@localhost lib]# cd zlib-1.2.3
[root@localhost zlib-1.2.3]# CC=arm-linux-gcc NM=arm-linux-nm CPP="arm-linux-gcc -E " RANLIB="arm-linux-ranlib" AR="arm-linux-ar rcv" ./configure
--shared --prefix=$PWD/../../output/arm-linux
[root@localhost zlib-1.2.3]# make -j4
[root@localhost zlib-1.2.3]# make install
3.安装 jpegsrc.v6b
[root@localhost lib]# tar -zxvf jpegsrc.v6b.tar.gz
[root@localhost lib]# cd jpeg-6b/
[root@localhost jpeg-6b]# ./configure --host=arm-linux --prefix=$PWD/../../output/arm-linux --enable-shared
[root@localhost jpeg-6b]# vim Makefile
手工修改 Makefile ,把所有工具链用 arm-linux-gcc 工具链
23 行改为 CC= arm-linux-gcc
63 行改为 AR = arm-linux-ar rc
65 行改为 AR2= arm-linux-ranlib
[root@localhost jpeg-6b]# mkdir -p $PWD/../../output/arm-linux/man/man1
[root@localhost jpeg-6b]# make -j4
[root@localhost jpeg-6b]# make install
4.安装 libpng-1.2.19
[root@localhost lib]# tar -jxvf libpng-1.2.19.tar.bz2
[root@localhost lib]# cd libpng-1.2.19
[root@localhost libpng-1.2.19]# export CPPFLAGS="-I/root/Desktop/sdl/output/arm-linux/include"
[root@localhost libpng-1.2.19]# export LDFLAGS="-L/root/Desktop/sdl/output/arm-linux/lib"
[root@localhost libpng-1.2.19]# ./configure --host=arm-linux --prefix=$PWD/../../output/arm-linux
[root@localhost libpng-1.2.19]# vim Makefile
把-L 后面的空格去掉
[root@localhost libpng-1.2.19]# make
[root@localhost libpng-1.2.19]# make install
5.安装 libmad
[root@localhost lib]# tar -zxvf libmad-0.15.1b.tar.gz
[root@localhost lib]# cd libmad-0.15.1b
[root@localhost libmad-0.15.1b]# ./configure --host=arm-linux --prefix=$PWD/../../output/arm-linux
[root@localhost libmad-0.15.1b]# vim Makefile
手工修改 Makefile 把 129 的-fforce-mem 去掉
[root@localhost libmad-0.15.1b]# make
[root@localhost libmad-0.15.1b]# make install
6.安装 libiconv
[root@localhost lib]# tar -zxvf libiconv-1.13.1.tar.gz
[root@localhost lib]# cd libiconv-1.13.1
[root@localhost libiconv-1.13.1]# ./configure --host=arm-linux --prefix=$PWD/../../output/arm-linux
[root@localhost libiconv-1.13.1]# vim Makefile
[root@localhost libiconv-1.13.1]# vim lib/Makefile
[root@localhost libiconv-1.13.1]# vim libcharset/Makefile
[root@localhost libiconv-1.13.1]# vim libcharset/lib/Makefile
[root@localhost libiconv-1.13.1]# vim preload/Makefile
[root@localhost libiconv-1.13.1]# vim srclib/Makefile
[root@localhost libiconv-1.13.1]# vim src/Makefile
把-L 后面的空格去掉
[root@localhost libiconv-1.13.1]# make
[root@localhost libiconv-1.13.1]# make intall
7.安装 SDL-1.2.14
[root@localhost lib]# tar -xvzf SDL-1.2.14.tar.gz
[root@localhost lib]# cd SDL-1.2.14
[root@localhost SDL-1.2.14]# ./configure --prefix=$PWD/../../output/arm-linux --disable-video-nanox --disable-video-qtopia --disable-video-photon --disable-video-
ggi --disable-video-svga --disable-video-aalib --