Permalink
Browse files

simplify library version handling

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12362 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
  • Loading branch information...
1 parent c7d7ab6 commit 14edbf1b306dcf5de72ea9981f4ae4713b0a597b mru committed Mar 7, 2008
Showing with 6 additions and 26 deletions.
  1. +3 −0 common.mak
  2. +3 −14 configure
  3. +0 −2 libavcodec/Makefile
  4. +0 −2 libavdevice/Makefile
  5. +0 −2 libavfilter/Makefile
  6. +0 −2 libavformat/Makefile
  7. +0 −2 libavutil/Makefile
  8. +0 −2 libpostproc/Makefile
View
@@ -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)
View
@@ -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
@@ -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)
@@ -1,8 +1,6 @@
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
View
@@ -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

0 comments on commit 14edbf1

Please sign in to comment.