handle more cases in the makefile.