Skip to content

Asday/the-makefile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Makefile

C++ project makefile with incremental compilation, support for multiple build configurations, and multiple output executables.

Usage

For each executable required, create one .cpp file in src/cmd/, a starter main.cpp is provided.

Modify config to suit the requirements.

Run make {cmd} to compile, link, and run the named command with the default build config.

Run make all to compile and link all commands with all build configs.

Run make all-{config} to compile and link all commands with the specified build config.

Run make clean to nuke the build folder.

Limitations

ALL object files are passed to the linker regardless of dependency, so keep an eye out for ODR violations.

Directories and files

Path Description
build/ Houses all build artefacts.
build/{config}/ One directory per config listed in config.configs, under which all build artefacts for the given config live.
build/{config}/bin/ Compiled and linked executables.
build/{config}/d/ Include information emitted by the preprocessor, matching the directory layout of src/, used for incremental recompilation when a dependency changes.
build/{config}/o/ Compiled object files, matching the directory layout of src/.
src/
.gitignore Base gitignore for C++ projects, containing no useless nonsense. The idea is to use .git/info/exclude
config The user-configurable part of the makefile, useful for defining configs such as debug/release, and the switches therefor.
makefile The Makefile.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published