Merge pull request #512 from ndawe/master

[MRG] Makefile improvements