clean up the makefile to be more flexible
(thanks frans!)