Make examples and test progs depend on libraries
authorMåns Rullgård <mans@mansr.com>
Wed, 1 Apr 2009 00:53:31 +0000 (00:53 +0000)
committerMåns Rullgård <mans@mansr.com>
Wed, 1 Apr 2009 00:53:31 +0000 (00:53 +0000)
Originally committed as revision 18297 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/Makefile
subdir.mak

index c82d2db..00e1ae5 100644 (file)
@@ -247,5 +247,3 @@ EXAMPLES  = output
 TESTPROGS = timefilter
 
 include $(SUBDIR)../subdir.mak
-
-$(SUBDIR)output-example$(EXESUF) $(SUBDIR)timefilter-test$(EXESUF): $(FF_DEP_LIBS)
index 03c852a..7343f54 100644 (file)
@@ -18,6 +18,8 @@ endif
 
 INCINSTDIR := $(INCDIR)/lib$(NAME)
 
+THIS_LIB := $(SUBDIR)$($(BUILD_SHARED:yes=S)LIBNAME)
+
 define RULES
 $(SUBDIR)%$(EXESUF): $(SUBDIR)%.o
        $(CC) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS)
@@ -96,5 +98,7 @@ endef
 
 $(eval $(RULES))
 
+$(EXAMPLES) $(TESTPROGS): $(THIS_LIB) $(DEP_LIBS)
+
 examples: $(EXAMPLES)
 testprogs: $(TESTPROGS)