aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2008-03-07 19:27:17 +0000
committerMåns Rullgård <mans@mansr.com>2008-03-07 19:27:17 +0000
commit0e32c8c65a1c42d9f6489eca2231dde17716d139 (patch)
tree54e899e3dd02ab3ad510e8628385085e3ff3fe5b
parent88b5db9f0881b8d22dc9a5f9e824ed1d22b375a0 (diff)
downloadffmpeg-0e32c8c65a1c42d9f6489eca2231dde17716d139.tar.gz
simplify library version handling
Originally committed as revision 12362 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--common.mak3
-rwxr-xr-xconfigure17
-rw-r--r--libavcodec/Makefile2
-rw-r--r--libavdevice/Makefile2
-rw-r--r--libavfilter/Makefile2
-rw-r--r--libavformat/Makefile2
-rw-r--r--libavutil/Makefile2
-rw-r--r--libpostproc/Makefile2
8 files changed, 6 insertions, 26 deletions
diff --git a/common.mak b/common.mak
index 58f6d7ef69..780f61e8d0 100644
--- a/common.mak
+++ b/common.mak
@@ -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)
diff --git a/configure b/configure
index ad127f4f2b..52a31f5d44 100755
--- 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
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 22b2f48a6a..4c9a53ec64 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -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)
diff --git a/libavdevice/Makefile b/libavdevice/Makefile
index be7bc9d55b..aef30c0210 100644
--- a/libavdevice/Makefile
+++ b/libavdevice/Makefile
@@ -1,8 +1,6 @@
include ../config.mak
NAME=avdevice
-LIBVERSION=$(LAVDVERSION)
-LIBMAJOR=$(LAVDMAJOR)
FFLIBS = avformat avcodec avutil
diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index eca5654986..38bd9fa409 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -15,7 +15,5 @@ FFLIBS-$(CONFIG_SWSCALER) += swscale
FFLIBS-$(CONFIG_AVFILTER_LAVF) += avformat
NAME=avfilter
-LIBVERSION=$(LAVFIVERSION)
-LIBMAJOR=$(LAVFIMAJOR)
include ../common.mak
diff --git a/libavformat/Makefile b/libavformat/Makefile
index c1aabfa80b..3870986d42 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -193,7 +193,5 @@ OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o
FFLIBS = avcodec avutil
NAME=avformat
-LIBVERSION=$(LAVFVERSION)
-LIBMAJOR=$(LAVFMAJOR)
include ../common.mak
diff --git a/libavutil/Makefile b/libavutil/Makefile
index 0cf55f50fa..91b437ea87 100644
--- a/libavutil/Makefile
+++ b/libavutil/Makefile
@@ -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)
diff --git a/libpostproc/Makefile b/libpostproc/Makefile
index ff15ad0379..26bb5a0922 100644
--- a/libpostproc/Makefile
+++ b/libpostproc/Makefile
@@ -4,8 +4,6 @@ include ../config.mak
FFLIBS = avutil
NAME=postproc
-LIBVERSION=$(SPPVERSION)
-LIBMAJOR=$(SPPMAJOR)
HEADERS = postprocess.h