LinuxCommandLibrary

make

TLDR

Build default target

$ make
copy
Build specific target
$ make [target]
copy
Build with jobs
$ make -j [4]
copy
Use specific makefile
$ make -f [Makefile.custom]
copy
Dry run
$ make -n
copy
Set variable
$ make [VAR=value]
copy
Clean build
$ make clean
copy

SYNOPSIS

make [options] [target]

DESCRIPTION

make builds programs from source. It reads Makefiles defining targets, dependencies, and build commands.
The tool only rebuilds what's necessary based on file timestamps. Essential for software development.
make automates building software.

PARAMETERS

TARGET

Target to build.
-f FILE
Use specified makefile.
-j N
Parallel jobs.
-n
Dry run (don't execute).
-B
Force rebuild all.
-C DIR
Change directory first.
--help
Display help information.

CAVEATS

Tab characters required. Different make implementations. Parallel builds may have issues.

HISTORY

make was created by Stuart Feldman at Bell Labs in 1976, revolutionizing software building automation.

SEE ALSO

cmake(1), ninja(1), autoconf(1)

Copied to clipboard