fixing an over-general flag.
make the makefile a bit more robust.