Fix makefile handling