Arvids Blog

Thoughts on programming and more

Generic Makefile

Update: Now also supports C++, see the Github repository) for the updated file.

In every single project, or even just test, I write the same simple Makefile over and over, by now I can write it without looking up anything. And if I forgot something, I would go through my old projects, to dig up the definition I need.
Today I got fed up with that, and decided to write one completely generic Makefile I can just reuse in all my projects. It only requires a reasonably new make, nothing else.

It features:

You can find the repository containing the file on GitHub. Currently it only supports C, but I might add C++ support in the feature, be sure to keep an eye on my blog to be notified about any news.