From bbba084b4fcc36c0625368afe6e7586e4991de46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Wed, 1 Apr 2009 00:53:31 +0000 Subject: [PATCH] Make examples and test progs depend on libraries Originally committed as revision 18297 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/Makefile | 2 -- subdir.mak | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/Makefile b/libavformat/Makefile index c82d2dbbe9..00e1ae5715 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -247,5 +247,3 @@ EXAMPLES = output TESTPROGS = timefilter include $(SUBDIR)../subdir.mak - -$(SUBDIR)output-example$(EXESUF) $(SUBDIR)timefilter-test$(EXESUF): $(FF_DEP_LIBS) diff --git a/subdir.mak b/subdir.mak index 03c852a09e..7343f548e0 100644 --- a/subdir.mak +++ b/subdir.mak @@ -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)