标签:
我们有的时候需要zlib在非PC环境下工作。
V1.2.8:http://zlib.net/zlib-1.2.8.tar.gz
#tar zxvf zlib-1.2.8.tar.gz
设置安装目录和交叉编译器
#prefix=~/rootfs1CC=/home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc./configure --static
#make
#make install
at91@ubuntu:~/zlib-1.2.8$ prefix=~/rootfs1 CC=/home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc ./configure --static Building static library libz.a version 1.2.8 with /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc. Checking for off64_t... Yes. Checking for fseeko... Yes. Checking for strerror... Yes. Checking for unistd.h... Yes. Checking for stdarg.h... Yes. Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf(). Checking for vsnprintf() in stdio.h... Yes. Checking for return value of vsnprintf()... Yes. Checking for attribute(visibility) support... Yes. at91@ubuntu:~/zlib-1.2.8$ make /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o example.o test/example.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o adler32.o adler32.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o crc32.o crc32.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o deflate.o deflate.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o infback.o infback.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inffast.o inffast.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inflate.o inflate.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o inftrees.o inftrees.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o trees.o trees.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o zutil.o zutil.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o compress.o compress.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o uncompr.o uncompr.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzclose.o gzclose.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzlib.o gzlib.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzread.o gzread.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c -o gzwrite.o gzwrite.c ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example example.o -L. libz.a /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example64 example64.o -L. libz.a /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c /home/at91/x-tools/arm-softfp-linux-gnueabi/bin/arm-softfp-linux-gnueabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip64 minigzip64.o -L. libz.a at91@ubuntu:~/zlib-1.2.8$ make install cp libz.a /home/at91/rootfs1/lib chmod 644 /home/at91/rootfs1/lib/libz.a cp zlib.3 /home/at91/rootfs1/share/man/man3 chmod 644 /home/at91/rootfs1/share/man/man3/zlib.3 cp zlib.pc /home/at91/rootfs1/lib/pkgconfig chmod 644 /home/at91/rootfs1/lib/pkgconfig/zlib.pc cp zlib.h zconf.h /home/at91/rootfs1/include chmod 644 /home/at91/rootfs1/include/zlib.h /home/at91/rootfs1/include/zconf.h
标签:
原文地址:http://blog.csdn.net/xiaobin_hlj80/article/details/43756913