Fix Makefile issues

Gcc4.6 and later evaluate linked libraries in different ordering,
so -l* goes after the target object file.
CC=cc sets the compiler to cc _in every case_, even if the user
has defined an environment variable CC. =? fixes this