Commit 0e32c8c6 authored by Måns Rullgård's avatar Måns Rullgård

simplify library version handling

Originally committed as revision 12362 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 88b5db9f
......@@ -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)
......
......@@ -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
......
......@@ -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)
......
include ../config.mak
NAME=avdevice
LIBVERSION=$(LAVDVERSION)
LIBMAJOR=$(LAVDMAJOR)
FFLIBS = avformat avcodec avutil
......
......@@ -15,7 +15,5 @@ FFLIBS-$(CONFIG_SWSCALER) += swscale
FFLIBS-$(CONFIG_AVFILTER_LAVF) += avformat
NAME=avfilter
LIBVERSION=$(LAVFIVERSION)
LIBMAJOR=$(LAVFIMAJOR)
include ../common.mak
......@@ -193,7 +193,5 @@ OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o
FFLIBS = avcodec avutil
NAME=avformat
LIBVERSION=$(LAVFVERSION)
LIBMAJOR=$(LAVFMAJOR)
include ../common.mak
......@@ -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)
......
......@@ -4,8 +4,6 @@ include ../config.mak
FFLIBS = avutil
NAME=postproc
LIBVERSION=$(SPPVERSION)
LIBMAJOR=$(SPPMAJOR)
HEADERS = postprocess.h
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment