improved makefile robustness