1. download http://download.sourceforge.net/libpng/libpng-1.2.23.tar.gz

2.
CC=arm-elf-gcc CXX=arm-elf-g++ AR=arm-elf-ar RANLIB=arm-elf-ranlib LD=arm-elf-ld STRIP=arm-elf-strip \
CFLAGS="-I/sigma/zlib-1.2.3/" LDFLAGS="-L/sigma/zlib-1.2.3/" \
./configure --target=arm-elf-linux --host=i686-pc-linux --disable-shared --enable-static

3. make

4. cp .lib/libpng.a and png.h to use

5. libpng12.pc
# libpng12 pkg-config file

prefix=/usr
exec_prefix=/usr
libdir=/sigma/libpng-1.2.23/.libs
includedir=/sigma/libpng-1.2.23

Name: libpng12
Description: libpng is the official PNG reference library
Version: 1.2.23
URL: http://libpng.sourceforge.net/
Requires:
Conflicts:
Libs: -L${libdir} -lpng -lz -lm
Libs.private: -L${libdir} -lpng -lz -lm
Cflags: -I${includedir}

台南小新 發表在 痞客邦 PIXNET 留言(0) 人氣()