There is something wrong with your makefile then. You shouldn't need to delete outdated files yourself. You rely on .o files for linking, not on the targets that build these .o files so these targets can't replace outdated .o files to link the app. Maybe you should have src/ in names of the .o targets too?