fix indentation
[ffmpeg.git] / subdir.mak
index 6b098cd..7148ce6 100644 (file)
@@ -18,9 +18,11 @@ endif
 
 INCINSTDIR := $(INCDIR)/lib$(NAME)
 
+THIS_LIB := $(SUBDIR)$($(BUILD_SHARED:yes=S)LIBNAME)
+
 define RULES
 $(SUBDIR)%$(EXESUF): $(SUBDIR)%.o
-       $(CC) $(FFLDFLAGS) -o $$@ $$^ $(SUBDIR)$(LIBNAME) $(FFEXTRALIBS)
+       $(CC) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS)
 
 $(SUBDIR)%-test.o: $(SUBDIR)%.c
        $(CC) $(CFLAGS) -DTEST -c -o $$@ $$^
@@ -96,5 +98,7 @@ endef
 
 $(eval $(RULES))
 
+$(EXAMPLES) $(TESTPROGS): $(THIS_LIB) $(DEP_LIBS)
+
 examples: $(EXAMPLES)
 testprogs: $(TESTPROGS)