[FFmpeg-cvslog] build: improve rules for test programs

Mans Rullgard git at videolan.org
Mon Jun 27 03:46:17 CEST 2011


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Sat Jun 25 11:51:09 2011 +0100| [659aa20e56de03b461afdaa6ae7e5d4be6e0d5fc] | committer: Mans Rullgard

build: improve rules for test programs

This generates dependencies for the *-test.o files ensuring
rebuilds when necessary.

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=659aa20e56de03b461afdaa6ae7e5d4be6e0d5fc
---

 subdir.mak |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/subdir.mak b/subdir.mak
index e4d7377..f544796 100644
--- a/subdir.mak
+++ b/subdir.mak
@@ -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) $@



More information about the ffmpeg-cvslog mailing list