A brief Lunch & Learn about Makefiles
Clone from: https://github.com/ostera/making-makefiles
by @ostera
Make was created a long time ago. It's been around since 1976.
Before Make there used to come bundled both make
and install
shell scripts
that would help building and installing the project.
Lastly, it's ultimate purpose was to abstract out dependency tracking, allow for composability of targets, and handling of files/archives.
- It has at least 4 rewrites (bmake, pmake, fmake, nmake)
- Was created at Bell Labs by Stuart Feldman
- Fedlman got the 2003 ACM Software System Award for it
- Typically define files in the file system
- Are checked for modification time
- May have Dependencies (Other Targets)
- Can be input from the outside world
- Can have default values
- Can be exported for scripts and other makefiles
We need to know 3 things:
- We invoke a target by naming it:
make target-name
- We specify a different makefile with the flag
-f path/to/makefile
- The file extension is just a convention
Without further ado...
Questions?