simplify library version handling

Originally committed as revision 12362 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Måns Rullgård 2008-03-07 19:27:17 +00:00
parent 88b5db9f08
commit 0e32c8c65a
8 changed files with 6 additions and 26 deletions

View 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)

17
configure vendored
View File

@ -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

View 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)

View File

@ -1,8 +1,6 @@
include ../config.mak
NAME=avdevice
LIBVERSION=$(LAVDVERSION)
LIBMAJOR=$(LAVDMAJOR)
FFLIBS = avformat avcodec avutil

View File

@ -15,7 +15,5 @@ FFLIBS-$(CONFIG_SWSCALER) += swscale
FFLIBS-$(CONFIG_AVFILTER_LAVF) += avformat
NAME=avfilter
LIBVERSION=$(LAVFIVERSION)
LIBMAJOR=$(LAVFIMAJOR)
include ../common.mak

View File

@ -193,7 +193,5 @@ OBJS-$(CONFIG_UDP_PROTOCOL) += udp.o
FFLIBS = avcodec avutil
NAME=avformat
LIBVERSION=$(LAVFVERSION)
LIBMAJOR=$(LAVFMAJOR)
include ../common.mak

View 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)

View File

@ -4,8 +4,6 @@ include ../config.mak
FFLIBS = avutil
NAME=postproc
LIBVERSION=$(SPPVERSION)
LIBMAJOR=$(SPPMAJOR)
HEADERS = postprocess.h