Updated library file processing so that libraries appear in the correct order within the Makefile.