- 🌱 Maintainable: minimal possible complexity for ease of troubleshooting.
- 📜 First-class build system: implemented in pure make.
- 🔧 Portabile: minimal dependence on external tooling.
- 🏗️ Builds on demand: dependency tracking enables fast incremental builds.
- 🧩 Modular: incorporate internal dependencies for build-together libraries.
- 🚚 Deployment automation friendly: installs according GNU Makefile Conventions for ease of packaging automation.
- ✨ Shiny: adds terminal coloring and hides build details for better readability.
- 🔬 Test support: implements test coverage analysis for check target.
It is supposed to be used like this:
- Add ultimate-makefile repo as submodule;
- Create application Makefile - for each output artifact (e.g. based on the provided example);
- Fill in the parameters and provide overrides in the application Makefile;
- Include Makefile.ultimate from the application Makefile.
The following well-known make targets are provided.
Executes an incremental build aided by the dependency extraction mechanisms provided by the compiler. It is also the default target, thus invoking make without any arguments builds the main product (as it should).
Run the output application with coverage analisys. Generates the report in HTML. It is mainly useful then the output is a test application.
The install and uninstall targets provide means for system-wide deployment and removal of the program/library. They behave as expected:
- The used commands can be defined externally as variables (CC, CXX, LD, AS, INSTALL, etc...)
- The DESTDIR variable is prepended to install destinations to enable staged install (needed for packaging automation)
- Determines the installation target directories based on the commonly used variables bindir, libdir, datadir, etc...
- The *_INSTALL and *_UNINSTALL variables are used properly to enable pre- and post-install and uninstall operation extraction.
- Recipies for the {pre,post}-{install,uninstall} targets can be provided by the application to carry out their respective tasks.
The mostlyclean target removes all intermediate products, the clean target also removes the main product (the application or library).