diff --git a/libavcodec/Makefile b/libavcodec/Makefile index aae75fc869..1fa4254058 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -652,8 +652,8 @@ else $(SUBDIR)%_tablegen$(HOSTEXESUF): HOSTCFLAGS += -DCONFIG_SMALL=0 endif -$(SUBDIR)%_tablegen$(HOSTEXESUF): $(SUBDIR)%_tablegen.c $(SUBDIR)tableprint.c - $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^ $(HOSTLIBS) +$(SUBDIR)%_tablegen$(HOSTEXESUF): $(SUBDIR)%_tablegen.c $(SUBDIR)%_tablegen.h $(SUBDIR)tableprint.c + $(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $(filter %.c,$^) $(HOSTLIBS) $(SUBDIR)%_tables.h: $(SUBDIR)%_tablegen$(HOSTEXESUF) $(M)./$< > $@