Fix probing of files with ID3v2 tags. Discussed at
[ffmpeg.git] / subdir.mak
index 6384d8b..df5bb8a 100644 (file)
@@ -19,7 +19,7 @@ endif
 INCINSTDIR := $(INCDIR)/lib$(NAME)
 
 define RULES
-ifeq ($(BUILD_SHARED),yes)
+ifdef BUILD_SHARED
 all: $(SUBDIR)$(SLIBNAME)
 
 install-libs: install-lib$(NAME)-shared
@@ -29,12 +29,11 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
 
 $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS)
        $(SLIB_CREATE_DEF_CMD)
-       $(CC) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$^ $(FFEXTRALIBS) $(EXTRAOBJS)
+       $(CC) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$(filter-out $(DEP_LIBS),$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
        $(SLIB_EXTRA_CMD)
 
-ifneq ($(SUBDIR),)
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): \
-    $(foreach L,$(FFLIBS),lib$(L)/$(SLIBPREF)$(L)$(SLIBSUF))
+ifdef SUBDIR
+$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(DEP_LIBS)
 endif
 endif
 
@@ -57,7 +56,7 @@ install-headers::
        install -d "$(INCINSTDIR)"
        install -d "$(LIBDIR)/pkgconfig"
        install -m 644 $(addprefix "$(SRC_DIR)"/,$(HEADERS)) "$(INCINSTDIR)"
-       install -m 644 $(BUILD_ROOT)/lib$(NAME).pc "$(LIBDIR)/pkgconfig"
+       install -m 644 $(BUILD_ROOT)/lib$(NAME)/lib$(NAME).pc "$(LIBDIR)/pkgconfig"
 
 uninstall-libs::
        -rm -f "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \