Make

Automate builds from a description of file dependencies

About

Make reads a description of targets and their dependencies. It runs only the commands needed to bring things up to date. The classic way to build from source or script repetitive tasks.

Install it

pkg install make

Run this inside Termux. If the package is already present, pkg will say so and do nothing.

Commands worth knowing

6 of the invocations you will actually reach for. Tap the copy button to put one on your clipboard.

make all Run a named target. Here, the conventional one that builds everything.
make install Run the install target, which copies built files to their destinations.
make clean Run a target that deletes build products, giving you a fresh start.
make -n Print the commands a target would run without running them. A dry run.
make -j4 Run up to four jobs at once. Speeds up builds on multi-core devices.
make -f custom.mk Read a description file that has a non-default name.

Worked example

Run make -n all and this is what you should see.

termux
$ make -n all
clang -Wall -O2 -c main.c -o main.o
clang -Wall -O2 -c util.c -o util.o
clang main.o util.o -o app

The dry run lists the compiler commands in the order they would run.

Developed by

The GNU Project .