]> git.sesse.net Git - ffmpeg/commitdiff
build: improve rules for test programs
authorMans Rullgard <mans@mansr.com>
Sat, 25 Jun 2011 10:51:09 +0000 (11:51 +0100)
committerMans Rullgard <mans@mansr.com>
Sun, 26 Jun 2011 22:07:40 +0000 (23:07 +0100)
This generates dependencies for the *-test.o files ensuring
rebuilds when necessary.

Signed-off-by: Mans Rullgard <mans@mansr.com>
subdir.mak

index e4d7377fcb045d16d2b49b18663c596fddac4171..f5447960228413a7061b903fc34711730c172736 100644 (file)
@@ -11,16 +11,17 @@ all-$(CONFIG_STATIC): $(SUBDIR)$(LIBNAME)
 all-$(CONFIG_SHARED): $(SUBDIR)$(SLIBNAME)
 
 $(SUBDIR)%-test.o: $(SUBDIR)%-test.c
-       $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $(CC_O) $^
+       $(COMPILE_C)
 
 $(SUBDIR)%-test.o: $(SUBDIR)%.c
-       $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $(CC_O) $^
+       $(COMPILE_C)
 
 $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm
        $(YASMDEP) $(YASMFLAGS) -I $(<D)/ -M -o $@ $< > $(@:.o=.d)
        $(YASM) $(YASMFLAGS) -I $(<D)/ -o $@ $<
 
-$(OBJS) $(SUBDIR)%.ho $(SUBDIR)%-test.o $(TESTOBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H
+$(OBJS) $(SUBDIR)%.ho $(TESTOBJS): CPPFLAGS += -DHAVE_AV_CONFIG_H
+$(TESTOBJS): CPPFLAGS += -DTEST
 
 $(SUBDIR)$(LIBNAME): $(OBJS)
        $(RM) $@