fix dependency issue in makefiles