Rusky wrote:
It would be more for other types of sources...
Those can easily be added to the RULES_template. The finished tutorial will give some more examples.
Rusky wrote:
...or for simple third-party sources like glew.c that don't need their own library.
You'd put it in a linker lib/archive, then, and link that as needed...? (Sorry, I don't know about glew.c or how it is commonly used.)
Rusky wrote:
...another nice thing to have would be command-line overrides of build flags...
Of course. I have this nasty habit of defining CFLAGS myself; that would have to be edited for the tutorial.
Love4Boobies wrote:
For the record, POSIX:2008 TC1 will enhance standard make a great deal (enough to finally make it useful) so this time it might actually be worth waiting until it comes out or at least refactoring the tutorial so that it covers portable makefiles instead.
We had this discussion before. I don't much care for making Makefiles any more "portable" than using the ubiquitous GNU make. Building GNU make on
any machine that doesn't have it is
dead easy, and certainly an improvement over other incarnations of make that I have seen so far. It is easier, for example, than building a cross-compiler. Do binutils / gcc even
build without an available GNU make?
Moreover, having a
standard doesn't help anyone unless you also have the
tools that
implement the standard... until that day, there are gazillions of machines with GNU make installed.
If you feel like it, you can take my tutorial and make it "portable" when and if a workable "standard" make emerges...