8.30. zlib-ng stage 2 2.3.3

zlib-ng provides zlib-compatible compression and decompression libraries

Input assumption: zlib-ng-2.3.3.tar.gz is already present in LBI_SOURCES from the chapter 4 source staging step.

Licenses:

Dependencies:

zlib-ng is a deflate compression library with a zlib-compatible API mode. This is the final build of zlib-ng.

Extract and Enter the Source Tree

cd "$LBI_SOURCES"
tar -xf zlib-ng-2.3.3.tar.gz
cd zlib-ng-2.3.3

Configure zlib-ng

lbi_cmake build \
    -DCMAKE_C_COMPILER="clang" \
    -DCMAKE_C_FLAGS="$LWI_CFLAGS" \
    -DCMAKE_SHARED_LINKER_FLAGS="$LBI_CUSTOM_LDFLAGS" \
    -DCMAKE_EXE_LINKER_FLAGS="$LBI_CUSTOM_LDFLAGS" \
    -DZLIB_COMPAT=ON \
    -DBUILD_TESTING=OFF \
    -DINSTALL_UTILS=ON \
    -G Ninja

Build zlib-ng

cmake --build build $LWI_MAKE_FLAGS

Install zlib-ng

cmake --install build

Remove static library

rm -f /system/libraries/libz.a

Command Explanations