Porting the xianjian game under RedHat

Source: Internet
Author: User
The arm of xianjian transplantation-platform: x86PC RedHat5.5 operating system arm-linux-cross compilation tool resource Introduction: xianjian source code. [Embedded] source code and dependency of xianjian game porting

The arm of xianjian Transplantation -- cloud6410
Platform: x86PC RedHat5.5 operating system arm-linux-cross compilation tool

Resource Introduction: After decompressing the sdl.tar.bz2 package, there are three compression packages: data.tar lib.tar sdlpal.tar. data.tar is the runtime resource of xianjian, and lib.tar is the compilation and operation source code of xianjian.

[Embedded] xianjian game transplantation source code and dependent Library source code download see http://www.linuxidc.com/Linux/2012-12/75555.htm

1. First, compile and install the library required for the compilation and running of xianjian
1. Install freetype
[Root @ localhost lib] # tar-zxvf freetype-2.3.11.tar.gz
[Root @ localhost lib] # freetype-2.3.11 cd
[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. Install zlib
[Root @ localhost lib] # tar-zxvf zlib-1.2.3.tar.gz
[Root @ localhost lib] # zlib-1.2.3 cd
[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. Install composer SRC. v6b
[Root @ localhost lib] # tar-zxvf restart src.v6b.tar.gz
[Root @ localhost lib] # jpeg-6b/cd/
[Root @ localhost jpeg-6b] #./configure -- host = arm-linux -- prefix = $ PWD/.../output/arm-linux -- enable-shared
[Root @ localhost jpeg-6b] # vim Makefile
Manually modify the Makefile and use the arm-linux-gcc tool chain for all tool chains.
Change line 23 to CC = arm-linux-gcc
Change row 63 to AR = arm-linux-ar rc
Change line 65 to 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. Install libpng-1.2.19
[Root @ localhost lib] # tar-jxvf libpng-1.2.19.tar.bz2
[Root @ localhost lib] # libpng-1.2.19 cd
[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] # make-j4
[Root @ localhost libpng-1.2.19] # vim Makefile
Remove the spaces behind-L
[Root @ localhost libpng-1.2.19] # make
[Root @ localhost libpng-1.2.19] # make install
5. Install libmad
[Root @ localhost lib] # tar-zxvf libmad-0.15.1b.tar.gz
[Root @ localhost lib] # libmad-0.15.1b cd
[Root @ localhost libmad-0.15.1b] #./configure -- host = arm-linux -- prefix = $ PWD/.../output/arm-linux
[Root @ localhost libmad-0.15.1b] # vim Makefile
Manually modify Makefile to remove-fforce-mem of 129
[Root @ localhost libmad-0.15.1b] # make
[Root @ localhost libmad-0.15.1b] # make install
6. Install libiconv
[Root @ localhost lib] # tar-zxvf libiconv-1.13.1.tar.gz
[Root @ localhost lib] # libiconv-1.13.1 cd
[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
Remove the spaces behind-L
[Root @ localhost libiconv-1.13.1] # make
[Root @ localhost libiconv-1.13.1] # make intall
7. Install SDL-1.2.14
[Root @ localhost lib] # tar-xvzf SDL-1.2.14.tar.gz
[Root @ localhost lib] # SDL-1.2.14 cd
[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 -- disable-video-dummy -- disable-video-dga -- disable-arts -- disable-esd -- disable-alsa -- disable-video-x11 -- disable-nasm -- enable-joystick -- enable-input-tslib -- enable-video-fbcon -- host = arm-linux -- build = i386 CPPFLAGS = "-I $ PWD /.. /.. /output/arm-linux/include "LDFLAGS ="-L $ PWD /.. /.. /output/arm-linux/lib"
[Root @ localhost SDL-1.2.14] # make-j4
[Root @ localhost SDL-1.2.14] # make install
8. Install SDL_image
[Root @ localhost lib] # tar-zxvf SDL_image-1.2.8.tar.gz
[Root @ localhost lib] # SDL_image-1.2.8 cd
[Root @ localhost SDL_image-1.2.8] #. /configure -- enable-shared -- enable-static -- host = arm-linux -- prefix = $ PWD /.. /.. /output/arm-linux -- enable-bmp -- enable-gif -- enable-jpg -- enable-png -- enable-tif -- enable-pnm -- enable-xpm -- disable-sdltest CC = arm-linux-gcc
[Root @ localhost SDL_image-1.2.8] # vim Makefile
Remove the spaces behind-L
[Root @ localhost SDL_image-1.2.8] # make
[Root @ localhost SDL_image-1.2.8] # make install
9. Install SDL_ttf
[Root @ localhost lib] # tar-zxvf SDL_ttf-2.0.9.tar.gz
[Root @ localhost lib] # SDL_ttf-2.0.9 cd
[Root @ localhost SDL_ttf-2.0.9] # vim glfont. c
Manually modify glfont. c. Clear all, write as follows
Void main (){}
[Root @ localhost SDL_ttf-2.0.9] #. /configure -- host = arm-linux -- prefix = $ PWD /.. /.. /output/arm-linux -- enable-shared -- enable-static -- disable-sdltest -- with-freetype-prefix = $ PWD /.. /.. /output/arm-linux/-- with-sdl-prefix = $ PWD /.. /.. /output/arm-linux/CFLAG = "-I $ PWD /.. /.. /output/arm-
Linux/include "CC = arm-linux-gcc
[Root @ localhost SDL_ttf-2.0.9] # vim Makefile
Manually modify Makefile
Remove-I/usr/include-DHAVE_OPENGL from row 123
Change the value of row 143 to GL_LIBS =
Line 2 glfont_LDADD = libSDL_ttf.la-lm
[Root @ localhost SDL_ttf-2.0.9] # make-j4
[Root @ localhost SDL_ttf-2.0.9] # make install
10. Install SDL_mixer
[Root @ localhost lib] # tar-zxvf SDL_mixer-1.2.9.tar.gz
[Root @ localhost lib] # SDL_mixer-1.2.9 cd
[Root @ localhost lib] #. /configure -- host = arm-linux -- prefix = $ PWD /.. /.. /output/arm-linux -- enable-shared -- enable-static -- disable-sdltest -- with-freetype-prefix = $ PWD /.. /.. /output/arm-linux/-- with-sdl-prefix = $ PWD /.. /.. /output/arm-linux/CFLAG = "-I $ PWD /.. /.. /output/arm-linux/include "LDFLAGS ="-L $ PWD /.. /.. /output/arm-linux/lib-lSDL-liconv-lfreetype "CC = arm-linux-gcc
[Root @ localhost lib] # make-j4
[Root @ localhost lib] # make install

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.