Template Makefile
for small- and medium-sized C/C++ projects.
This Makefile
assumes that all source files (.c or .cpp) are in the same directory, will compile each one of them separately and then link the resulting objects together in the executable.
- Put
Makefile
in the directory of your C/C++ project. - Edit the first lines (compiler to use, name of the target, list of source files).
- Hit
make
in the terminal.