More fixes to use-cc-for-linking

The LIBS arguments weren't at the end and ended up being ignored.
Restructure the Makefile some more.