diff --git a/libavformat/Makefile b/libavformat/Makefile index 00e1ae5715..aad67cc056 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -247,3 +247,5 @@ EXAMPLES = output TESTPROGS = timefilter include $(SUBDIR)../subdir.mak + +$(SUBDIR)output-example$(EXESUF): ELIBS = -lswscale diff --git a/subdir.mak b/subdir.mak index 7343f548e0..7148ce6fcd 100644 --- a/subdir.mak +++ b/subdir.mak @@ -22,7 +22,7 @@ THIS_LIB := $(SUBDIR)$($(BUILD_SHARED:yes=S)LIBNAME) define RULES $(SUBDIR)%$(EXESUF): $(SUBDIR)%.o - $(CC) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) + $(CC) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS) $(SUBDIR)%-test.o: $(SUBDIR)%.c $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^