zlib cross-compilation, libpng cross-compilation

Development platform: ubantu
Compilation platform: mipsel-linux
zlib source code download path: http://www.zlib.net/

First, determine whether the compilation can pass under gcc to prove that there is no problem with the source code.
Compile under zlib's mipsel.

$ tar jvxf zlib-1.2.8.tar.gz
$ cd zlib-1.2.8/  
$ export CC=mipsel-linux-uclibc-gcc   //确定编译器
$ ./configure --prefix=$PWD/install_mis //最后生成的库、头文件和man文件都在当前目录的install_mis目录下  
$ make && make install  

Compilation generates zlib library files

Compile libpng again. The compilation process is the same. Configure configure first, then compile, and then install.
If you don’t understand /configure, you can use ./configure –help to view the help.

$ tar jvxf libpng-1.2.43.tar.bz2
$ cd libpng-1.2.43/
$ ./configure --host=mipsel-linux-uclibc -prefix=$PWD/install_mis //最后生成的库、头文件和man文件都在当前目录的install_mis目录下
$ make && make install 

Guess you like

Origin blog.csdn.net/csdn_zmf/article/details/46686457