I see what happened here. I've been trying to figure out why OP is talking about compiler or linker generating
garbage or not creating a binary that does something
useful. Looking at the other thread,
http://forum.6502.org/viewtopic.php?f=2&t=6540#p82957 I see that Agumander mentiones that his compiler generated garbage and code that does not do anything useful, presumably due to a missing initialization file.
Just to be clear, a Makefile just
invokes the compiler and the linker. Before creating a Makefile, compile and link by hand, from the command line. If your compiler or linker silently generates garbage, wipe it from your drive and get a different one. Do not automate the process of miscompiling your code - it will not help.
So before debugging a Makefile (it took some discipline on my part to actually not look at it), confirm that the compiler/linker actually work.
And have some dignity - do not use half-assed tools designed by corporate teams explicitly not to work on your chosen architecture; by corporate teams who will not opensource their code (for fear of embarrassment or 'legal' reasons), license under reasonable terms, or support it adequately (such as answering 'why does hello-world not compile?'). Life is short, and there is other fish in the sea.