News for hackers. Stuff that matters.
Re:A Simple Makefile for Medium-Sized C/C++ Projects by oso2k on Friday August 26, 2016 @12:07PM (#12367171)
This is a good start. Could be made a bit more minimal.

I'll throw my base Makefile into the fray [0].

It supports cross compilation, CFLAGS & LDFLAGS usage, dependency file generation, source file autodetection (add the file to right folder and it's automatically included in the build), library building (`make lib`), Continuous Integration (`make start_ci/stop_ci`), Continuous Testing (`make start_ct/stop_ct`), Continuous Deployment (`make start_cd/stop_cd`), Installation (`make install`), Uninstallation (`make uninstall`), parallel compilation (`make -j4`), there's some build machine detecting/autoconfiguration support, build artifact generation, and even some git shortcuts (`make gstat/make make gpush`).

All in about 190 lines of Makefile (including some comments, and lots of blank space lines). It does depend on GNU watch if you use any of the `start_/stop_` targets. I'm about to add self-documentation to it as well.

For more minimal, comprehensible approaches, see the work of the suckless people [1][2][3].

[0] https://github.com/lpsantil/NewProj

[1] http://git.suckless.org/dwm/tree/Makefile

[2] http://git.suckless.org/sbase/tree/Makefile

[3] http://git.suckless.org/ii/tree/Makefile

Re:A Simple Makefile for Medium-Sized C/C++ Projects by posterboy on Friday August 26, 2016 @12:25PM (#12367310)
> a bit more minimal

ie. smaller, which is ironically smaller than the quote

edit: compared to 'gcc $CFLAGS $LDFLAGs <...> *.c' it's all rather bloated