Make is a build automation tool that automatically builds executable programs and libraries from source code by reading files called Makefiles, which specify how to derive the target program.
By using this Makefile template one can create main.cpp
as an entiry point, src
directory for source files and include
directory for header files
To start on your project:
- First make sure that you are in a
⚠️ empty directory⚠️ otherwise runningmake setup
will cause the deletion of all files in the current direcotry. - Clone the repo.
- Run
make setup
which removes both the connection to this repo and the README.md file, then it createsmain.cpp
file +src
,include
andbuild
directories which are the defualt directory struture for this build system.
By adding the main function into main.cpp
and (if needed) source files into src
one can run make
which will creates an executable named app
this name (eg app) could be changed by assign diffrante value for the MAIN varibale in the Makefile