tldr/pages/common/make.md

29 lines
579 B
Markdown
Raw Normal View History

2016-01-04 10:23:09 +00:00
# make
> Task runner for targets described in Makefile.
2016-01-04 10:23:09 +00:00
> Mostly used to control the compilation of an executable from source code.
- Call the first target specified in the Makefile (usually named "all"):
2016-01-04 10:23:09 +00:00
`make`
- Call a specific target:
2016-01-04 10:23:09 +00:00
`make {{target}}`
2016-01-04 10:23:09 +00:00
2017-06-06 19:56:14 +01:00
- Call a specific target, executing 4 jobs at a time in parallel:
`make -J{{4}} {{target}}`
- Use a specific Makefile:
2016-01-04 10:23:09 +00:00
`make --file {{file}}`
2016-01-04 10:23:09 +00:00
- Execute make from another directory:
2016-01-04 10:23:09 +00:00
`make --directory {{directory}}`
2016-07-05 15:21:56 +01:00
- Force making of a target, even if source files are unchanged:
2016-07-05 15:21:56 +01:00
`make --always-make {{target}}`