Create symbolic links for all library sonames and clean up Makefiles.

based on a patch by Luca Barbato < lu_zero -- at -- gentoo -- dot -- org >

Originally committed as revision 4851 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Diego Biurrun 19 years ago
parent e03c822afd
commit f3b6010916
  1. 8
      configure
  2. 12
      libavcodec/Makefile
  3. 11
      libavcodec/libpostproc/Makefile
  4. 12
      libavformat/Makefile
  5. 12
      libavutil/Makefile

8
configure vendored

@ -219,7 +219,7 @@ vhook="default"
dlfcn="no" dlfcn="no"
dlopen="no" dlopen="no"
mpegaudio_hp="yes" mpegaudio_hp="yes"
SHFLAGS='-shared -Wl,-soname,$@.$(LIBVERSION)' SHFLAGS='-shared -Wl,-soname,$@.$(LIBMAJOR)'
netserver="no" netserver="no"
need_inet_aton="no" need_inet_aton="no"
ffserver="yes" ffserver="yes"
@ -232,6 +232,8 @@ LIBPREF="lib"
LIBSUF=".a" LIBSUF=".a"
SLIBPREF="lib" SLIBPREF="lib"
SLIBSUF=".so" SLIBSUF=".so"
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)'
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBMAJOR)'
EXESUF="" EXESUF=""
BUILDSUF="" BUILDSUF=""
amr_nb="no" amr_nb="no"
@ -343,6 +345,8 @@ strip="strip -x"
installstrip="" installstrip=""
LDFLAGS="-Wl,-dynamic,-search_paths_first" LDFLAGS="-Wl,-dynamic,-search_paths_first"
SLIBSUF=".dylib" SLIBSUF=".dylib"
SLIBNAME_WITH_FULLVERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)'
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)'
FFSLDFLAGS=-Wl,-bind_at_load FFSLDFLAGS=-Wl,-bind_at_load
;; ;;
MINGW32*) MINGW32*)
@ -1504,6 +1508,8 @@ if test "$lshared" = "yes" ; then
echo "LAVFVERSION=$lavf_version" >> config.mak echo "LAVFVERSION=$lavf_version" >> config.mak
echo "LAVUMAJOR=${lavu_version%%.*}" >> config.mak echo "LAVUMAJOR=${lavu_version%%.*}" >> config.mak
echo "LAVUVERSION=$lavu_version" >> config.mak echo "LAVUVERSION=$lavu_version" >> config.mak
echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
fi fi
echo "EXTRALIBS=$extralibs" >> config.mak echo "EXTRALIBS=$extralibs" >> config.mak
version=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" | version=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" |

@ -399,6 +399,9 @@ OBJS := $(OBJS) $(ASM_OBJS)
LIB= $(LIBPREF)avcodec$(LIBSUF) LIB= $(LIBPREF)avcodec$(LIBSUF)
LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF) LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF)
ifeq ($(BUILD_SHARED),yes) ifeq ($(BUILD_SHARED),yes)
LIBVERSION=$(LAVCVERSION)
LIBMAJOR=$(LAVCMAJOR)
NAME=avcodec
SLIBNAME= $(SLIBPREF)avcodec$(SLIBSUF) SLIBNAME= $(SLIBPREF)avcodec$(SLIBSUF)
endif endif
TESTS= imgresample-test dct-test motion-test fft-test TESTS= imgresample-test dct-test motion-test fft-test
@ -490,14 +493,17 @@ fft-test: fft-test.o $(LIB)
$(CC) -o $@ $^ $(LIBAVUTIL) -lm $(CC) -o $@ $^ $(LIBAVUTIL) -lm
ifeq ($(BUILD_SHARED),yes) ifeq ($(BUILD_SHARED),yes)
LIBVERSION=$(LAVCMAJOR)
install: all install-headers install: all install-headers
ifeq ($(CONFIG_WIN32),yes) ifeq ($(CONFIG_WIN32),yes)
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
else else
install -d $(libdir) install -d $(libdir)
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libavcodec-$(VERSION)$(SLIBSUF) install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
ln -sf $(SLIBPREF)avcodec-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME) $(libdir)/$(SLIBNAME_WITH_VERSION)
ln -sf $(SLIBNAME_WITH_VERSION) \
$(libdir)/$(SLIBNAME_WITH_MAJOR)
ln -sf $(SLIBNAME_WITH_VERSION) \
$(libdir)/$(SLIBNAME)
$(LDCONFIG) || true $(LDCONFIG) || true
endif endif
ifeq ($(CONFIG_PP),yes) ifeq ($(CONFIG_PP),yes)

@ -5,6 +5,9 @@ VPATH=$(SRC_PATH)/libavcodec/libpostproc
LIB = $(LIBPREF)postproc$(LIBSUF) LIB = $(LIBPREF)postproc$(LIBSUF)
ifeq ($(SHARED_PP),yes) ifeq ($(SHARED_PP),yes)
LIBVERSION=$(SPPVERSION)
LIBMAJOR=$(SPPMAJOR)
NAME=postproc
SLIBNAME = $(SLIBPREF)postproc$(SLIBSUF) SLIBNAME = $(SLIBPREF)postproc$(SLIBSUF)
endif endif
@ -53,8 +56,12 @@ ifeq ($(CONFIG_WIN32),yes)
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
else else
install -d $(libdir) install -d $(libdir)
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libpostproc-$(VERSION)$(SLIBSUF) install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
ln -sf $(SLIBPREF)postproc-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME) $(libdir)/$(SLIBNAME_WITH_VERSION)
ln -sf $(SLIBNAME_WITH_VERSION) \
$(libdir)/$(SLIBNAME_WITH_MAJOR)
ln -sf $(SLIBNAME_WITH_VERSION) \
$(libdir)/$(SLIBNAME)
$(LDCONFIG) || true $(LDCONFIG) || true
endif endif
endif endif

@ -80,7 +80,9 @@ endif
LIB= $(LIBPREF)avformat$(LIBSUF) LIB= $(LIBPREF)avformat$(LIBSUF)
ifeq ($(BUILD_SHARED),yes) ifeq ($(BUILD_SHARED),yes)
LIBVERSION=$(LAVFMAJOR) LIBVERSION=$(LAVFVERSION)
LIBMAJOR=$(LAVFMAJOR)
NAME=avformat
SLIBNAME= $(SLIBPREF)avformat$(SLIBSUF) SLIBNAME= $(SLIBPREF)avformat$(SLIBSUF)
AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
endif endif
@ -111,8 +113,12 @@ ifeq ($(CONFIG_WIN32),yes)
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
else else
install -d $(libdir) install -d $(libdir)
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/$(SLIBPREF)avformat-$(VERSION)$(SLIBSUF) install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
ln -sf $(SLIBPREF)avformat-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME) $(libdir)/$(SLIBNAME_WITH_VERSION)
ln -sf $(SLIBNAME_WITH_VERSION) \
$(libdir)/$(SLIBNAME_WITH_MAJOR)
ln -sf $(SLIBNAME_WITH_VERSION) \
$(libdir)/$(SLIBNAME)
$(LDCONFIG) || true $(LDCONFIG) || true
endif endif
else else

@ -22,7 +22,9 @@ SRCS := $(OBJS:.o=.c)
LIB= $(LIBPREF)avutil$(LIBSUF) LIB= $(LIBPREF)avutil$(LIBSUF)
ifeq ($(BUILD_SHARED),yes) ifeq ($(BUILD_SHARED),yes)
LIBVERSION=$(LAVUMAJOR) LIBVERSION=$(LAVUVERSION)
LIBMAJOR=$(LAVUMAJOR)
NAME=avutil
SLIBNAME= $(SLIBPREF)avutil$(SLIBSUF) SLIBNAME= $(SLIBPREF)avutil$(SLIBSUF)
endif endif
@ -62,8 +64,12 @@ ifeq ($(CONFIG_WIN32),yes)
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
else else
install -d $(libdir) install -d $(libdir)
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libavutil-$(VERSION)$(SLIBSUF) install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
ln -sf libavutil-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME) $(libdir)/$(SLIBNAME_WITH_VERSION)
ln -sf $(SLIBNAME_WITH_VERSION) \
$(libdir)/$(SLIBNAME_WITH_MAJOR)
ln -sf $(SLIBNAME_WITH_VERSION) \
$(libdir)/$(SLIBNAME)
$(LDCONFIG) || true $(LDCONFIG) || true
endif endif
else else

Loading…
Cancel
Save