Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 30 Jul 2011 22:34:34 +0000 (00:34 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 30 Jul 2011 22:34:47 +0000 (00:34 +0200)
* qatar/master:
  build: make examples build normally

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
subdir.mak

diff --combined subdir.mak
@@@ -34,21 -34,17 +34,21 @@@ install-libs-$(CONFIG_STATIC): install-
  install-libs-$(CONFIG_SHARED): install-lib$(NAME)-shared
  
  define RULES
- $(TESTPROGS) $(TOOLS): %$(EXESUF): %.o
+ $(EXAMPLES) $(TESTPROGS) $(TOOLS): %$(EXESUF): %.o
        $$(LD) $(LDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS)
  
  $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
        $(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
  
 -$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS)
 +$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver
        $(SLIB_CREATE_DEF_CMD)
        $$(LD) $(SHFLAGS) $(LDFLAGS) -o $$@ $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
        $(SLIB_EXTRA_CMD)
  
 +ifdef SUBDIR
 +$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(DEP_LIBS)
 +endif
 +
  clean::
        $(RM) $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
            $(foreach dir,$(DIRS),$(CLEANSUFFIXES:%=$(SUBDIR)$(dir)/%)) \
@@@ -61,7 -57,6 +61,7 @@@ distclean:: clea
  install-lib$(NAME)-shared: $(SUBDIR)$(SLIBNAME)
        $(Q)mkdir -p "$(SHLIBDIR)"
        $$(INSTALL) -m 755 $$< "$(SHLIBDIR)/$(SLIB_INSTALL_NAME)"
 +      $$(STRIP) "$(SHLIBDIR)/$(SLIB_INSTALL_NAME)"
        $(Q)$(foreach F,$(SLIB_INSTALL_LINKS),cd "$(SHLIBDIR)" && $(LN_S) $(SLIB_INSTALL_NAME) $(F);)
        $(if $(SLIB_INSTALL_EXTRA_SHLIB),$$(INSTALL) -m 644 $(SLIB_INSTALL_EXTRA_SHLIB:%=$(SUBDIR)%) "$(SHLIBDIR)")
        $(if $(SLIB_INSTALL_EXTRA_LIB),$(Q)mkdir -p "$(LIBDIR)")
@@@ -89,9 -84,9 +89,9 @@@ uninstall-libs:
        -$(RM) "$(LIBDIR)/$(LIBNAME)"
  
  uninstall-headers::
 -      $(RM) $(addprefix "$(INCINSTDIR)/",$(HEADERS))
 +      $(RM) $(addprefix "$(INCINSTDIR)/",$(HEADERS)) $(addprefix "$(INCINSTDIR)/",$(BUILT_HEADERS))
        $(RM) "$(LIBDIR)/pkgconfig/lib$(NAME).pc"
 -      -rmdir "$(INCDIR)"
 +      -rmdir "$(INCINSTDIR)"
  endef
  
  $(eval $(RULES))