diff --git a/Makefile b/Makefile
index 6c01a824f0f470ab0a18496de6c338402a2cd3c3..344cfbc42dbe76d5b11f53475e7bf9050e805e5a 100644
--- a/Makefile
+++ b/Makefile
@@ -208,7 +208,7 @@ ifeq ($(CONFIG_VHOOK),yes)
 endif
 
 .depend: $(SRCS) version.h
-	$(CC) -MM $(CFLAGS) $(SDL_CFLAGS) $^ 1>.depend
+	$(CC) -MM $(CFLAGS) $(SDL_CFLAGS) $(filter-out %.h,$^) 1>.depend
 
 .libs: lib
 	@test -f .libs || touch .libs