6.17. GNU Make 4.4.1

GNU Make provides the `make` and `gmake` build frontends needed by most target package build systems.

Input assumption: make-4.4.1.tar.gz is already present in LBI_SOURCES from the chapter 4 source staging step.

Source URL: https://gnu.mirror.constant.com/make/make-4.4.1.tar.gz

Upstream build note: GNU Make ships a generated configure script in release tarballs and documents a standard ./configure, make, make install flow.

Licenses:

Dependencies:

GNU Make is a Makefile build orchestration tool. we need it to provide the target make and gmake commands used by most package build systems in later chapters.

Extract and Enter the Source Tree

cd "$LBI_SOURCES"
tar -xf make-4.4.1.tar.gz
cd make-4.4.1

Configure GNU Make

CC="$LBI_ROOT/system/tools/bin/$LBI_TARGET-clang" \
CFLAGS="--target=$LBI_TARGET --sysroot=$LBI_ROOT $LWI_CFLAGS" \
LDFLAGS="--target=$LBI_TARGET --sysroot=$LBI_ROOT $LBI_CUSTOM_LDFLAGS" \
lbi_configure \
    --host="$LBI_TARGET" \
    --without-guile \
    --disable-nls

Build GNU Make

make $LWI_MAKE_FLAGS

Install GNU Make

make install DESTDIR="$LBI_ROOT"
ln -sf make "$LBI_ROOT/system/binaries/gmake"

Command Explanations