There are next to none good learning resources on Makefiles. Most are extremely tersely written, have next to no description of how various parts tie together and assume everyone builds C/C++.
That is only true if one does not believe in reading, or makes no effort at all to look for such resources. There are entire books on this subject.
* Clovis L. Tondo, Andrew Nathanson, and Eden Yount (1994). Mastering MAKE: a guide to building programs on DOS, OS/2, and UNIX systems. Prentice Hall.
* Robert Mecklenburg (2004). Managing Projects with GNU Make. Nutshell Handbooks. O'Reilly Media. ISBN 9780596552541.
* John Graham-Cumming (2015). The GNU Make Book. No Starch Press. ISBN 9781593276492.
The GNU make manual is a good place to start. It's not a tutorial, but it is fairly short. If you're on a different platform it's not exact, but most of the important material applies to POSIX make implementations.
Replace your own toolchain for the CC and related commands... really anything that takes multiple files as input and emits one file as output should fit the paradigm.
> If you're on a different platform it's not exact, but most of the important material applies to POSIX make implementations.
Which parts are "most of the material" though? ;)
> Replace your own toolchain for the CC and related commands... really anything that takes multiple files as input and emits one file as output should fit the paradigm.
I tried to. It's messy and undebuggable if you run into problems. Especially with tools that already look at the whole project (such as Typescript).
We ended up using Makefiles as just "command launchers" with targets that basically look like