diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 4765ceb413..7a9d897606 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -676,14 +676,11 @@ include $(SUBDIR)../subdir.mak $(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o -$(SUBDIR)cos_tables.c: $(SUBDIR)costablegen$(HOSTEXESUF) - $(M)./$< > $@ +TRIG_TABLES = cos cos_fixed sin +TRIG_TABLES := $(TRIG_TABLES:%=$(SUBDIR)%_tables.c) -$(SUBDIR)cos_fixed_tables.c: $(SUBDIR)costablegen$(HOSTEXESUF) - $(M)./$< cos fixed > $@ - -$(SUBDIR)sin_tables.c: $(SUBDIR)costablegen$(HOSTEXESUF) - $(M)./$< sin > $@ +$(TRIG_TABLES): $(SUBDIR)%_tables.c: $(SUBDIR)costablegen$(HOSTEXESUF) + $(M)./$< $* > $@ ifdef CONFIG_SMALL $(SUBDIR)%_tablegen$(HOSTEXESUF): HOSTCFLAGS += -DCONFIG_SMALL=1 diff --git a/libavcodec/costablegen.c b/libavcodec/costablegen.c index 6bfb8eabf2..5e52c482c6 100644 --- a/libavcodec/costablegen.c +++ b/libavcodec/costablegen.c @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) { int i, j; int do_sin = argc > 1 && !strcmp(argv[1], "sin"); - int fixed = argc > 2 && !strcmp(argv[2], "fixed"); + int fixed = argc > 1 && strstr(argv[1], "fixed"); double (*func)(double) = do_sin ? sin : cos; printf("/* This file was automatically generated. */\n");