lots of makefile improvements (mostly linux)