Build: Fix ordering of LIBADD and LDADD libraries in Makefiles.
Libraries should be listed before anything they require. Additionally,
change how libraries are listed to be one per line using the += syntax
and clean up the spacing. I think this makes it easier to read.