# Zlib-&zlib-version;

The Zlib package contains compression and decompression routines used by some programs.

## Installation of Zlib

Prepare Zlib for compilation and set to optimize for size:

    CFLAGS="-Os" ./configure --shared

## The meaning of the configure options:

`--shared`

- Tells Zlib to build its shared library.

Compile the package:

    make

Install the package into the cross-tools:

    make prefix=${CLFS}/cross-tools/${CLFS_TARGET} install

Copy only the shared library into the target file system and ensure that its symlink is present so the runtime loader can find it:

    cp -v ${CLFS}/cross-tools/${CLFS_TARGET}/lib/libz.so.&zlib-version; ${CLFS}/targetfs/lib/
    ln -sv libz.so.&zlib-version; ${CLFS}/targetfs/lib/libz.so.1

## Contents of Zlib

Installed libraries
- libz.[a,so]

Short Descriptions

`libz`

- Contains compression and decompression functions used by some programs