Use $< automatic variable to simplify some commands.
[ffmpeg.git] / subdir.mak
index 448d064..997f552 100644 (file)
@@ -27,11 +27,9 @@ install-libs: install-lib$(NAME)-shared
 $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
        cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
 
-$(SUBDIR)$(SLIB_EXTRA_OBJS): $(SLIB_EXTRA_DEP)
-
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)$(SLIB_EXTRA_OBJS)
+$(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)
 
 ifdef SUBDIR
@@ -41,7 +39,7 @@ endif
 
 install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
        install -d "$(SHLIBDIR)"
-       install -m 755 $(SUBDIR)$(SLIBNAME) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
+       install -m 755 $$< "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
        $(STRIP) "$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
        cd "$(SHLIBDIR)" && \
                $(LN_S) $(SLIBNAME_WITH_VERSION) $(SLIBNAME_WITH_MAJOR)
@@ -51,14 +49,14 @@ install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
 
 install-lib$(NAME)-static: $(SUBDIR)$(LIBNAME)
        install -d "$(LIBDIR)"
-       install -m 644 $(SUBDIR)$(LIBNAME) "$(LIBDIR)"
+       install -m 644 $$< "$(LIBDIR)"
        $(LIB_INSTALL_EXTRA_CMD)
 
 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)" \