simplify library version handling
authorMåns Rullgård <mans@mansr.com>
Fri, 7 Mar 2008 19:27:17 +0000 (19:27 +0000)
committerMåns Rullgård <mans@mansr.com>
Fri, 7 Mar 2008 19:27:17 +0000 (19:27 +0000)
Originally committed as revision 12362 to svn://svn.ffmpeg.org/ffmpeg/trunk

common.mak
configure
libavcodec/Makefile
libavdevice/Makefile
libavfilter/Makefile
libavformat/Makefile
libavutil/Makefile
libpostproc/Makefile

index 58f6d7e..780f61e 100644 (file)
@@ -4,6 +4,9 @@
 
 LIBSRC = $(SRC_PATH_BARE)/lib$(NAME)
 
+LIBVERSION = $(lib$(NAME)_VERSION)
+LIBMAJOR   = $(lib$(NAME)_VERSION_MAJOR)
+
 vpath %.c $(LIBSRC)
 vpath %.h $(LIBSRC)
 vpath %.S $(LIBSRC)
index ad127f4..52a31f5 100755 (executable)
--- a/configure
+++ b/configure
@@ -2006,6 +2006,9 @@ get_version(){
     file=$source_path/$2
     eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')
     eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
+    lcname=$(tolower $name)
+    eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
+    eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
 }
 
 get_version LIBSWSCALE  libswscale/swscale.h
@@ -2019,20 +2022,6 @@ get_version LIBAVFILTER libavfilter/avfilter.h
 if enabled shared; then
     echo "BUILD_SHARED=yes" >> config.mak
     echo "PIC=-fPIC -DPIC" >> config.mak
-    echo "SPPMAJOR=$LIBPOSTPROC_VERSION_MAJOR" >> config.mak
-    echo "SPPVERSION=$LIBPOSTPROC_VERSION" >> config.mak
-    echo "LAVCMAJOR=$LIBAVCODEC_VERSION_MAJOR" >> config.mak
-    echo "LAVCVERSION=$LIBAVCODEC_VERSION" >> config.mak
-    echo "LAVDMAJOR=$LIBAVDEVICE_VERSION_MAJOR" >> config.mak
-    echo "LAVDVERSION=$LIBAVDEVICE_VERSION" >> config.mak
-    echo "LAVFMAJOR=$LIBAVFORMAT_VERSION_MAJOR" >> config.mak
-    echo "LAVFVERSION=$LIBAVFORMAT_VERSION" >> config.mak
-    echo "LAVUMAJOR=$LIBAVUTIL_VERSION_MAJOR" >> config.mak
-    echo "LAVUVERSION=$LIBAVUTIL_VERSION" >> config.mak
-    echo "LAVFIMAJOR=$LIBAVFILTER_VERSION_MAJOR" >> config.mak
-    echo "LAVFIVERSION=$LIBAVFILTER_VERSION" >> config.mak
-    echo "SWSMAJOR=$LIBSWSCALE_VERSION_MAJOR" >> config.mak
-    echo "SWSVERSION=$LIBSWSCALE_VERSION" >> config.mak
     echo "SLIBNAME=${SLIBNAME}" >> config.mak
     echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
     echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
index 22b2f48..4c9a53e 100644 (file)
@@ -457,8 +457,6 @@ ASM_OBJS-$(ARCH_BFIN)                  += bfin/pixels_bfin.o \
 FFLIBS = avutil
 
 NAME=avcodec
-LIBVERSION=$(LAVCVERSION)
-LIBMAJOR=$(LAVCMAJOR)
 
 TESTS = $(addsuffix -test$(EXESUF), cabac dct eval fft h264 imgresample rangecoder snow)
 ifeq ($(ARCH_X86),yes)
index be7bc9d..aef30c0 100644 (file)
@@ -1,8 +1,6 @@
 include ../config.mak
 
 NAME=avdevice
-LIBVERSION=$(LAVDVERSION)
-LIBMAJOR=$(LAVDMAJOR)
 
 FFLIBS = avformat avcodec avutil
 
index eca5654..38bd9fa 100644 (file)
@@ -15,7 +15,5 @@ FFLIBS-$(CONFIG_SWSCALER)      += swscale
 FFLIBS-$(CONFIG_AVFILTER_LAVF) += avformat
 
 NAME=avfilter
-LIBVERSION=$(LAVFIVERSION)
-LIBMAJOR=$(LAVFIMAJOR)
 
 include ../common.mak
index c1aabfa..3870986 100644 (file)
@@ -193,7 +193,5 @@ OBJS-$(CONFIG_UDP_PROTOCOL)              += udp.o
 FFLIBS = avcodec avutil
 
 NAME=avformat
-LIBVERSION=$(LAVFVERSION)
-LIBMAJOR=$(LAVFMAJOR)
 
 include ../common.mak
index 0cf55f5..91b437e 100644 (file)
@@ -38,8 +38,6 @@ HEADERS = adler32.h \
           sha1.h
 
 NAME=avutil
-LIBVERSION=$(LAVUVERSION)
-LIBMAJOR=$(LAVUMAJOR)
 
 TESTS = $(addsuffix -test$(EXESUF), adler32 aes crc des lls md5 sha1 softfloat tree)
 
index ff15ad0..26bb5a0 100644 (file)
@@ -4,8 +4,6 @@ include ../config.mak
 FFLIBS = avutil
 
 NAME=postproc
-LIBVERSION=$(SPPVERSION)
-LIBMAJOR=$(SPPMAJOR)
 
 HEADERS = postprocess.h