From bbabeb56fac38347b976e7b84639de53306e4bf2 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 28 Aug 2012 10:16:53 +0200 Subject: [PATCH 1/2] Add reminders to update the codec descriptor list with new codec IDs. --- doc/developer.texi | 2 ++ libavcodec/avcodec.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/doc/developer.texi b/doc/developer.texi index ae9609dae6..aff28b845e 100644 --- a/doc/developer.texi +++ b/doc/developer.texi @@ -404,6 +404,8 @@ send a reminder by email. Your patch should eventually be dealt with. Did you register it in @file{allcodecs.c} or @file{allformats.c}? @item Did you add the AVCodecID to @file{avcodec.h}? + When adding new codec IDs, also add an entry to the codec descriptor + list in @file{libavcodec/codec_desc.c}. @item If it has a fourcc, did you add it to @file{libavformat/riff.c}, even if it is only a decoder? diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 9658b67ab6..07d75c2692 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -88,6 +88,9 @@ * If you add a codec ID to this list, add it so that * 1. no value of a existing codec ID changes (that would break ABI), * 2. it is as close as possible to similar codecs. + * + * After adding new codec IDs, do not forget to add an entry to the codec + * descriptor list and bump libavcodec minor version. */ enum AVCodecID { AV_CODEC_ID_NONE, From 8db73c61a7b24bc4f4d3d415bea2990d17d16354 Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Tue, 28 Aug 2012 16:06:56 +0100 Subject: [PATCH 2/2] build: allow non-standard variations of linker -l/-L flags This enables replacing the -l and -L flags used to specify the just-built libraries when linking the tools and shared libs with non-standard syntaxes. System library flags are already handled by the filtering mechanism in configure. Signed-off-by: Mans Rullgard --- Makefile | 2 +- common.mak | 3 ++- configure | 9 ++++++++- libavformat/Makefile | 2 +- library.mak | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index b766e6d00d..77d51eb8d5 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ CCFLAGS = $(CPPFLAGS) $(CFLAGS) ASFLAGS := $(CPPFLAGS) $(ASFLAGS) YASMFLAGS += $(IFLAGS:%=%/) -I$(SRC_PATH)/libavutil/x86/ -Pconfig.asm HOSTCCFLAGS = $(IFLAGS) $(HOSTCFLAGS) -LDFLAGS := $(ALLFFLIBS:%=-Llib%) $(LDFLAGS) +LDFLAGS := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS) define COMPILE $(call $(1)DEP,$(1)) diff --git a/common.mak b/common.mak index 01adfeca41..d866ef1eef 100644 --- a/common.mak +++ b/common.mak @@ -11,7 +11,8 @@ OBJS += $(OBJS-yes) FFLIBS := $(FFLIBS-yes) $(FFLIBS) TESTPROGS += $(TESTPROGS-yes) -FFEXTRALIBS := $(FFLIBS:%=-l%$(BUILDSUF)) $(EXTRALIBS) +LDLIBS = $(FFLIBS:%=%$(BUILDSUF)) +FFEXTRALIBS := $(LDLIBS:%=$(LD_LIB)) $(EXTRALIBS) EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF)) OBJS := $(sort $(OBJS:%=$(SUBDIR)%)) diff --git a/configure b/configure index 32118d0140..5e0d76ef5b 100755 --- a/configure +++ b/configure @@ -1785,6 +1785,8 @@ CC_C='-c' CC_E='-E -o $@' CC_O='-o $@' LD_O='-o $@' +LD_LIB='-l%' +LD_PATH='-L' HOSTCC_C='-c' HOSTCC_O='-o $@' HOSTLD_O='-o $@' @@ -2132,7 +2134,8 @@ probe_cc(){ pfx=$1 _cc=$2 - unset _type _ident _cc_c _cc_e _cc_o _ld_o _flags _cflags _ldflags + unset _type _ident _cc_c _cc_e _cc_o _flags _cflags + unset _ld_o _ldflags _ld_lib _ld_path unset _depflags _DEPCMD _DEPFLAGS _flags_filter=echo @@ -2294,6 +2297,8 @@ ldflags_filter=$_flags_filter add_ldflags $_flags $_ldflags test "$cc_type" != "$ld_type" && add_ldflags $cc_ldflags LD_O=${_ld_o-$LD_O} +LD_LIB=${_ld_lib-$LD_LIB} +LD_PATH=${_ld_path-$LD_PATH} probe_cc hostld "$host_ld" host_ldflags_filter=$_flags_filter @@ -3523,6 +3528,8 @@ AS_O=$AS_O CC_C=$CC_C CC_O=$CC_O LD_O=$LD_O +LD_LIB=$LD_LIB +LD_PATH=$LD_PATH DLLTOOL=$dlltool LDFLAGS=$LDFLAGS LDFLAGS-avserver=$AVSERVERLDFLAGS diff --git a/libavformat/Makefile b/libavformat/Makefile index 82dc1c1470..61e1fa12da 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -379,4 +379,4 @@ TOOLS = aviocat \ pktdumper \ probetest \ -$(SUBDIR)output-example$(EXESUF): ELIBS = -lswscale +$(SUBDIR)output-example$(EXESUF): ELIBS = $(patsubst %,$(LD_LIB),swscale) diff --git a/library.mak b/library.mak index 165a78204f..d89050e84a 100644 --- a/library.mak +++ b/library.mak @@ -35,7 +35,7 @@ install-libs-$(CONFIG_SHARED): install-lib$(NAME)-shared define RULES $(EXAMPLES) $(TESTPROGS) $(TOOLS): %$(EXESUF): %.o - $$(LD) $(LDFLAGS) $$(LD_O) $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS) + $$(LD) $(LDFLAGS) $$(LD_O) $$^ $(FULLNAME:%=$(LD_LIB)) $(FFEXTRALIBS) $$(ELIBS) $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) $(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)