zlib-1.2.5

  • 작성자
    조재혁(Mminzkn@minzkn.com)

  • 고친과정
    2011년 11월 4일 : 처음씀

  • 본 문서의 내용은 빌드하는데 어려움을 겪는 분들에게 조금이나마 도움을 주기 위해서 참고용으로 작성한 것이며 실제와 다를 수도 있으므로 보다 자세한 사항은 [http]http://www.zlib.net/[]을 방문하여 보시길 바랍니다.

INFO

  • 이름 : zlib
  • 버젼 : 1.2.5 ([http]download[])
  • 홈페이지 : [http]http://www.zlib.net/[] ([http]FAQ[], [http]manual[], [http]official zlib and deflate documentation[])
  • 만든이 : zlib는 [http]Jean-loup Gailly[] (압축부분) 와 [http]Mark Adler[] (압축해제부분)에 의해서 만들어졌습니다.
  • 표준사항 : RFC1950(zlib format), RFC1951(deflate format), RFC1952(gzip format)
  • 라이센스 (zlib.h의 상단부분을 인용)
    /* zlib.h -- interface of the 'zlib' general purpose compression library
      version 1.2.5, April 19th, 2010
    
      Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
    
      This software is provided 'as-is', without any express or implied
      warranty.  In no event will the authors be held liable for any damages
      arising from the use of this software.
    
      Permission is granted to anyone to use this software for any purpose,
      including commercial applications, and to alter it and redistribute it
      freely, subject to the following restrictions:
    
      1. The origin of this software must not be misrepresented; you must not
         claim that you wrote the original software. If you use this software
         in a product, an acknowledgment in the product documentation would be
         appreciated but is not required.
      2. Altered source versions must be plainly marked as such, and must not be
         misrepresented as being the original software.
      3. This notice may not be removed or altered from any source distribution.
    
      Jean-loup Gailly        Mark Adler
      jloup@gzip.org          madler@alumni.caltech.edu
    
    
      The data format used by the zlib library is described by RFCs (Request for
      Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
      (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
    */
    

BUILD

  • virtual target build environment
    CROSS_COMPILE=x86_64-pc-linux-gnu-
    CROSS_PREFIX=/usr
    CROSS_INSTALL_PREFIX=/
    CC=$(CROSS_COMPILE)gcc
    LD=$(CROSS_COMPILE)ld
    CPP=$(CROSS_COMPILE)gcc -E
    CXX=$(CROSS_COMPILE)g++
    CXXCPP=$(CROSS_COMPILE)g++ -E
    
  • download
    $ curl "http://zlib.net/zlib-1.2.5.tar.gz" > "zlib-1.2.5.tar.gz"
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  531k  100  531k    0     0   119k      0  0:00:04  0:00:04 --:--:--  140k
    $ ls -al "zlib-1.2.5.tar.gz"
    -rw-r--r-- 1 minzkn users 544640 Nov  4 15:27 zlib-1.2.5.tar.gz
    $ md5sum "zlib-1.2.5.tar.gz'
    c735eab2d659a96e5a594c9e8541ad63  zlib-1.2.5.tar.gz
    
  • unarchive
    $ tar -xvzf "zlib-1.2.5.tar.gz"
    zlib-1.2.5/
    zlib-1.2.5/adler32.c
    zlib-1.2.5/amiga/
    zlib-1.2.5/amiga/Makefile.pup
    zlib-1.2.5/amiga/Makefile.sas
    zlib-1.2.5/ChangeLog
    zlib-1.2.5/CMakeLists.txt
    zlib-1.2.5/compress.c
    zlib-1.2.5/configure
    zlib-1.2.5/contrib/
    zlib-1.2.5/contrib/ada/
    zlib-1.2.5/contrib/ada/buffer_demo.adb
    zlib-1.2.5/contrib/ada/mtest.adb
    zlib-1.2.5/contrib/ada/read.adb
    zlib-1.2.5/contrib/ada/readme.txt
    zlib-1.2.5/contrib/ada/test.adb
    zlib-1.2.5/contrib/ada/zlib-streams.adb
    zlib-1.2.5/contrib/ada/zlib-streams.ads
    zlib-1.2.5/contrib/ada/zlib-thin.adb
    zlib-1.2.5/contrib/ada/zlib-thin.ads
    zlib-1.2.5/contrib/ada/zlib.adb
    zlib-1.2.5/contrib/ada/zlib.ads
    zlib-1.2.5/contrib/ada/zlib.gpr
    zlib-1.2.5/contrib/amd64/
    zlib-1.2.5/contrib/amd64/amd64-match.S
    zlib-1.2.5/contrib/asm686/
    zlib-1.2.5/contrib/asm686/match.S
    zlib-1.2.5/contrib/asm686/README.686
    zlib-1.2.5/contrib/blast/
    zlib-1.2.5/contrib/blast/blast.c
    zlib-1.2.5/contrib/blast/blast.h
    zlib-1.2.5/contrib/blast/Makefile
    zlib-1.2.5/contrib/blast/README
    zlib-1.2.5/contrib/blast/test.pk
    zlib-1.2.5/contrib/blast/test.txt
    zlib-1.2.5/contrib/delphi/
    zlib-1.2.5/contrib/delphi/readme.txt
    zlib-1.2.5/contrib/delphi/ZLib.pas
    zlib-1.2.5/contrib/delphi/ZLibConst.pas
    zlib-1.2.5/contrib/delphi/zlibd32.mak
    zlib-1.2.5/contrib/dotzlib/
    zlib-1.2.5/contrib/dotzlib/DotZLib/
    zlib-1.2.5/contrib/dotzlib/DotZLib/AssemblyInfo.cs
    zlib-1.2.5/contrib/dotzlib/DotZLib/ChecksumImpl.cs
    zlib-1.2.5/contrib/dotzlib/DotZLib/CircularBuffer.cs
    zlib-1.2.5/contrib/dotzlib/DotZLib/CodecBase.cs
    zlib-1.2.5/contrib/dotzlib/DotZLib/Deflater.cs
    zlib-1.2.5/contrib/dotzlib/DotZLib/DotZLib.cs
    zlib-1.2.5/contrib/dotzlib/DotZLib/DotZLib.csproj
    zlib-1.2.5/contrib/dotzlib/DotZLib/GZipStream.cs
    zlib-1.2.5/contrib/dotzlib/DotZLib/Inflater.cs
    zlib-1.2.5/contrib/dotzlib/DotZLib/UnitTests.cs
    zlib-1.2.5/contrib/dotzlib/DotZLib.build
    zlib-1.2.5/contrib/dotzlib/DotZLib.chm
    zlib-1.2.5/contrib/dotzlib/DotZLib.sln
    zlib-1.2.5/contrib/dotzlib/LICENSE_1_0.txt
    zlib-1.2.5/contrib/dotzlib/readme.txt
    zlib-1.2.5/contrib/gcc_gvmat64/
    zlib-1.2.5/contrib/gcc_gvmat64/gvmat64.S
    zlib-1.2.5/contrib/infback9/
    zlib-1.2.5/contrib/infback9/infback9.c
    zlib-1.2.5/contrib/infback9/infback9.h
    zlib-1.2.5/contrib/infback9/inffix9.h
    zlib-1.2.5/contrib/infback9/inflate9.h
    zlib-1.2.5/contrib/infback9/inftree9.c
    zlib-1.2.5/contrib/infback9/inftree9.h
    zlib-1.2.5/contrib/infback9/README
    zlib-1.2.5/contrib/inflate86/
    zlib-1.2.5/contrib/inflate86/inffas86.c
    zlib-1.2.5/contrib/inflate86/inffast.S
    zlib-1.2.5/contrib/iostream/
    zlib-1.2.5/contrib/iostream/test.cpp
    zlib-1.2.5/contrib/iostream/zfstream.cpp
    zlib-1.2.5/contrib/iostream/zfstream.h
    zlib-1.2.5/contrib/iostream2/
    zlib-1.2.5/contrib/iostream2/zstream.h
    zlib-1.2.5/contrib/iostream2/zstream_test.cpp
    zlib-1.2.5/contrib/iostream3/
    zlib-1.2.5/contrib/iostream3/README
    zlib-1.2.5/contrib/iostream3/test.cc
    zlib-1.2.5/contrib/iostream3/TODO
    zlib-1.2.5/contrib/iostream3/zfstream.cc
    zlib-1.2.5/contrib/iostream3/zfstream.h
    zlib-1.2.5/contrib/masmx64/
    zlib-1.2.5/contrib/masmx64/bld_ml64.bat
    zlib-1.2.5/contrib/masmx64/gvmat64.asm
    zlib-1.2.5/contrib/masmx64/inffas8664.c
    zlib-1.2.5/contrib/masmx64/inffasx64.asm
    zlib-1.2.5/contrib/masmx64/readme.txt
    zlib-1.2.5/contrib/masmx86/
    zlib-1.2.5/contrib/masmx86/bld_ml32.bat
    zlib-1.2.5/contrib/masmx86/inffas32.asm
    zlib-1.2.5/contrib/masmx86/match686.asm
    zlib-1.2.5/contrib/masmx86/readme.txt
    zlib-1.2.5/contrib/minizip/
    zlib-1.2.5/contrib/minizip/crypt.h
    zlib-1.2.5/contrib/minizip/ioapi.c
    zlib-1.2.5/contrib/minizip/ioapi.h
    zlib-1.2.5/contrib/minizip/iowin32.c
    zlib-1.2.5/contrib/minizip/iowin32.h
    zlib-1.2.5/contrib/minizip/make_vms.com
    zlib-1.2.5/contrib/minizip/Makefile
    zlib-1.2.5/contrib/minizip/miniunz.c
    zlib-1.2.5/contrib/minizip/minizip.c
    zlib-1.2.5/contrib/minizip/MiniZip64_Changes.txt
    zlib-1.2.5/contrib/minizip/MiniZip64_info.txt
    zlib-1.2.5/contrib/minizip/mztools.c
    zlib-1.2.5/contrib/minizip/mztools.h
    zlib-1.2.5/contrib/minizip/unzip.c
    zlib-1.2.5/contrib/minizip/unzip.h
    zlib-1.2.5/contrib/minizip/zip.c
    zlib-1.2.5/contrib/minizip/zip.h
    zlib-1.2.5/contrib/pascal/
    zlib-1.2.5/contrib/pascal/example.pas
    zlib-1.2.5/contrib/pascal/readme.txt
    zlib-1.2.5/contrib/pascal/zlibd32.mak
    zlib-1.2.5/contrib/pascal/zlibpas.pas
    zlib-1.2.5/contrib/puff/
    zlib-1.2.5/contrib/puff/Makefile
    zlib-1.2.5/contrib/puff/puff.c
    zlib-1.2.5/contrib/puff/puff.h
    zlib-1.2.5/contrib/puff/README
    zlib-1.2.5/contrib/puff/zeros.raw
    zlib-1.2.5/contrib/README.contrib
    zlib-1.2.5/contrib/testzlib/
    zlib-1.2.5/contrib/testzlib/testzlib.c
    zlib-1.2.5/contrib/testzlib/testzlib.txt
    zlib-1.2.5/contrib/untgz/
    zlib-1.2.5/contrib/untgz/Makefile
    zlib-1.2.5/contrib/untgz/Makefile.msc
    zlib-1.2.5/contrib/untgz/untgz.c
    zlib-1.2.5/contrib/vstudio/
    zlib-1.2.5/contrib/vstudio/readme.txt
    zlib-1.2.5/contrib/vstudio/vc10/
    zlib-1.2.5/contrib/vstudio/vc10/miniunz.vcxproj
    zlib-1.2.5/contrib/vstudio/vc10/miniunz.vcxproj.filters
    zlib-1.2.5/contrib/vstudio/vc10/miniunz.vcxproj.user
    zlib-1.2.5/contrib/vstudio/vc10/minizip.vcxproj
    zlib-1.2.5/contrib/vstudio/vc10/minizip.vcxproj.filters
    zlib-1.2.5/contrib/vstudio/vc10/minizip.vcxproj.user
    zlib-1.2.5/contrib/vstudio/vc10/testzlib.vcxproj
    zlib-1.2.5/contrib/vstudio/vc10/testzlib.vcxproj.filters
    zlib-1.2.5/contrib/vstudio/vc10/testzlib.vcxproj.user
    zlib-1.2.5/contrib/vstudio/vc10/testzlibdll.vcxproj
    zlib-1.2.5/contrib/vstudio/vc10/testzlibdll.vcxproj.filters
    zlib-1.2.5/contrib/vstudio/vc10/testzlibdll.vcxproj.user
    zlib-1.2.5/contrib/vstudio/vc10/zlib.rc
    zlib-1.2.5/contrib/vstudio/vc10/zlibstat.vcxproj
    zlib-1.2.5/contrib/vstudio/vc10/zlibstat.vcxproj.filters
    zlib-1.2.5/contrib/vstudio/vc10/zlibstat.vcxproj.user
    zlib-1.2.5/contrib/vstudio/vc10/zlibvc.def
    zlib-1.2.5/contrib/vstudio/vc10/zlibvc.sln
    zlib-1.2.5/contrib/vstudio/vc10/zlibvc.vcxproj
    zlib-1.2.5/contrib/vstudio/vc10/zlibvc.vcxproj.filters
    zlib-1.2.5/contrib/vstudio/vc10/zlibvc.vcxproj.user
    zlib-1.2.5/contrib/vstudio/vc9/
    zlib-1.2.5/contrib/vstudio/vc9/miniunz.vcproj
    zlib-1.2.5/contrib/vstudio/vc9/minizip.vcproj
    zlib-1.2.5/contrib/vstudio/vc9/testzlib.vcproj
    zlib-1.2.5/contrib/vstudio/vc9/testzlibdll.vcproj
    zlib-1.2.5/contrib/vstudio/vc9/zlib.rc
    zlib-1.2.5/contrib/vstudio/vc9/zlibstat.vcproj
    zlib-1.2.5/contrib/vstudio/vc9/zlibvc.def
    zlib-1.2.5/contrib/vstudio/vc9/zlibvc.sln
    zlib-1.2.5/contrib/vstudio/vc9/zlibvc.vcproj
    zlib-1.2.5/crc32.c
    zlib-1.2.5/crc32.h
    zlib-1.2.5/deflate.c
    zlib-1.2.5/deflate.h
    zlib-1.2.5/doc/
    zlib-1.2.5/doc/algorithm.txt
    zlib-1.2.5/doc/rfc1950.txt
    zlib-1.2.5/doc/rfc1951.txt
    zlib-1.2.5/doc/rfc1952.txt
    zlib-1.2.5/doc/txtvsbin.txt
    zlib-1.2.5/example.c
    zlib-1.2.5/examples/
    zlib-1.2.5/examples/enough.c
    zlib-1.2.5/examples/fitblk.c
    zlib-1.2.5/examples/gun.c
    zlib-1.2.5/examples/gzappend.c
    zlib-1.2.5/examples/gzjoin.c
    zlib-1.2.5/examples/gzlog.c
    zlib-1.2.5/examples/gzlog.h
    zlib-1.2.5/examples/README.examples
    zlib-1.2.5/examples/zlib_how.html
    zlib-1.2.5/examples/zpipe.c
    zlib-1.2.5/examples/zran.c
    zlib-1.2.5/FAQ
    zlib-1.2.5/gzclose.c
    zlib-1.2.5/gzguts.h
    zlib-1.2.5/gzlib.c
    zlib-1.2.5/gzread.c
    zlib-1.2.5/gzwrite.c
    zlib-1.2.5/INDEX
    zlib-1.2.5/infback.c
    zlib-1.2.5/inffast.c
    zlib-1.2.5/inffast.h
    zlib-1.2.5/inffixed.h
    zlib-1.2.5/inflate.c
    zlib-1.2.5/inflate.h
    zlib-1.2.5/inftrees.c
    zlib-1.2.5/inftrees.h
    zlib-1.2.5/make_vms.com
    zlib-1.2.5/Makefile
    zlib-1.2.5/Makefile.in
    zlib-1.2.5/minigzip.c
    zlib-1.2.5/msdos/
    zlib-1.2.5/msdos/Makefile.bor
    zlib-1.2.5/msdos/Makefile.dj2
    zlib-1.2.5/msdos/Makefile.emx
    zlib-1.2.5/msdos/Makefile.msc
    zlib-1.2.5/msdos/Makefile.tc
    zlib-1.2.5/nintendods/
    zlib-1.2.5/nintendods/Makefile
    zlib-1.2.5/nintendods/README
    zlib-1.2.5/old/
    zlib-1.2.5/old/as400/
    zlib-1.2.5/old/as400/bndsrc
    zlib-1.2.5/old/as400/compile.clp
    zlib-1.2.5/old/as400/readme.txt
    zlib-1.2.5/old/as400/zlib.inc
    zlib-1.2.5/old/descrip.mms
    zlib-1.2.5/old/Makefile.riscos
    zlib-1.2.5/old/os2/
    zlib-1.2.5/old/os2/Makefile.os2
    zlib-1.2.5/old/os2/zlib.def
    zlib-1.2.5/old/README
    zlib-1.2.5/old/visual-basic.txt
    zlib-1.2.5/old/visualc6/
    zlib-1.2.5/old/visualc6/example.dsp
    zlib-1.2.5/old/visualc6/minigzip.dsp
    zlib-1.2.5/old/visualc6/README.txt
    zlib-1.2.5/old/visualc6/zlib.dsp
    zlib-1.2.5/old/visualc6/zlib.dsw
    zlib-1.2.5/qnx/
    zlib-1.2.5/qnx/package.qpg
    zlib-1.2.5/README
    zlib-1.2.5/treebuild.xml
    zlib-1.2.5/trees.c
    zlib-1.2.5/trees.h
    zlib-1.2.5/uncompr.c
    zlib-1.2.5/watcom/
    zlib-1.2.5/watcom/watcom_f.mak
    zlib-1.2.5/watcom/watcom_l.mak
    zlib-1.2.5/win32/
    zlib-1.2.5/win32/DLL_FAQ.txt
    zlib-1.2.5/win32/Makefile.bor
    zlib-1.2.5/win32/Makefile.emx
    zlib-1.2.5/win32/Makefile.gcc
    zlib-1.2.5/win32/Makefile.msc
    zlib-1.2.5/win32/README-WIN32.txt
    zlib-1.2.5/win32/VisualC.txt
    zlib-1.2.5/win32/zlib.def
    zlib-1.2.5/win32/zlib1.rc
    zlib-1.2.5/zconf.h
    zlib-1.2.5/zconf.h.cmakein
    zlib-1.2.5/zconf.h.in
    zlib-1.2.5/zlib.3
    zlib-1.2.5/zlib.3.pdf
    zlib-1.2.5/zlib.h
    zlib-1.2.5/zlib.map
    zlib-1.2.5/zlib.pc.in
    zlib-1.2.5/zlib2ansi
    zlib-1.2.5/zutil.c
    zlib-1.2.5/zutil.h
    
  • configure
    $ cd zlib-1.2.5
    zlib-1.2.5 $ ./configure --help
    usage:
      configure [--zprefix] [--prefix=PREFIX]  [--eprefix=EXPREFIX]
        [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]
        [--includedir=INCLUDEDIR]
    zlib-1.2.5 $ CROSS_PREFIX="$(CROSS_COMPILE)" \
    ./configure \
    --prefix="$(CROSS_PREFIX)" \
    --shared
    Using $(CROSS_COMPILE)ar
    Using $(CROSS_COMPILE)ranlib
    Using $(CROSS_COMPILE)nm
    Checking for $(CROSS_COMPILE)gcc...
    Checking for shared library support...
    Building shared library libz.so.1.2.5 with $(CROSS_COMPILE)gcc.
    Checking for off64_t... Yes.
    Checking for fseeko... Yes.
    Checking for unistd.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.
    
  • build
    zlib-1.2.5 $ make \
    TARGET_ARCH="" \
    CC="$(CC)" \
    LD="$(LD)" \
    CPP="$(CPP)" \
    CXX="$(CXX)" \
    CXXCPP="$(CXXCPP)" \
    --no-print-directory \
    --directory="."
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o adler32.o adler32.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o compress.o compress.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o crc32.o crc32.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o deflate.o deflate.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o gzclose.o gzclose.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o gzlib.o gzlib.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o gzread.o gzread.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o gzwrite.o gzwrite.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o infback.o infback.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o inffast.o inffast.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o inflate.o inflate.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o inftrees.o inftrees.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o trees.o trees.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o uncompr.o uncompr.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1   -c -o zutil.o zutil.c 
    $(CROSS_COMPILE)ar rc libz.a adler32.o compress.o crc32.o deflate.o gzclose.o gzlib.o gzread.o gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o 
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/adler32.o adler32.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/compress.o compress.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/crc32.o crc32.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/deflate.o deflate.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/gzclose.o gzclose.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/gzlib.o gzlib.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/gzread.o gzread.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/gzwrite.o gzwrite.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/infback.o infback.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/inffast.o inffast.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/inflate.o inflate.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/inftrees.o inftrees.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/trees.o trees.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/uncompr.o uncompr.c
    $(CROSS_COMPILE)gcc -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -DPIC -c -o objs/zutil.o zutil.c
    $(CROSS_COMPILE)gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O3 -fPIC -D_LARGEFILE64_SOURCE=1 -o libz.so.1.2.5 adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo  -lc -L. libz.a
    rm -f libz.so libz.so.1
    ln -s libz.so.1.2.5 libz.so
    ln -s libz.so.1.2.5 libz.so.1
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1 -o examplesh example.o -L. libz.so.1.2.5
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1 -o minigzipsh minigzip.o -L. libz.so.1.2.5
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -c -o example64.o example.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1 -o example64 example64.o -L. libz.a
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o minigzip.c
    $(CROSS_COMPILE)gcc -O3 -D_LARGEFILE64_SOURCE=1 -o minigzip64 minigzip64.o -L. libz.a
    
  • install
    zlib-1.2.5 $ make \
    DESTDIR="$(CROSS_INSTALL_PREFIX)" \
    TARGET_ARCH="" \
    CC="$(CC)" \
    LD="$(LD)" \
    CPP="$(CPP)" \
    CXX="$(CXX)" \
    CXXCPP="$(CXXCPP)" \
    --no-print-directory \
    --directory="." \
    install
    cp libz.a $(CROSS_INSTALL_PREFIX)/usr/lib
    cp libz.so.1.2.5 $(CROSS_INSTALL_PREFIX)/usr/lib
    cd $(CROSS_INSTALL_PREFIX)/usr/lib; chmod u=rw,go=r libz.a
    cp zlib.3 $(CROSS_INSTALL_PREFIX)/usr/share/man/man3
    chmod 644 $(CROSS_INSTALL_PREFIX)/usr/share/man/man3/zlib.3
    cp zlib.pc $(CROSS_INSTALL_PREFIX)/usr/lib/pkgconfig
    chmod 644 $(CROSS_INSTALL_PREFIX)/usr/lib/pkgconfig/zlib.pc
    cp zlib.h zconf.h $(CROSS_INSTALL_PREFIX)/usr/include
    chmod 644 $(CROSS_INSTALL_PREFIX)/usr/include/zlib.h $(CROSS_INSTALL_PREFIX)/usr/include/zconf.h
    
  • installed files
    $(CROSS_INSTALL_PREFIX)/usr/lib/pkgconfig/zlib.pc
    $(CROSS_INSTALL_PREFIX)/usr/lib/libz.so.1 -> libz.so.1.2.5
    $(CROSS_INSTALL_PREFIX)/usr/lib/libz.so -> libz.so.1.2.5
    $(CROSS_INSTALL_PREFIX)/usr/lib/libz.a
    $(CROSS_INSTALL_PREFIX)/usr/lib/libz.so.1.2.5
    $(CROSS_INSTALL_PREFIX)/usr/include/zlib.h
    $(CROSS_INSTALL_PREFIX)/usr/include/zconf.h
    $(CROSS_INSTALL_PREFIX)/usr/share/man/man3/zlib.3
    



/*

[ FrontPage | PrintView | RawView | RSS ]

Copyright ⓒ MINZKN.COM
All Rights Reserved.

MINZKN

----

*/