mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
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
This commit is contained in:
parent
e03c822afd
commit
f3b6010916
8
configure
vendored
8
configure
vendored
@ -219,7 +219,7 @@ vhook="default"
|
||||
dlfcn="no"
|
||||
dlopen="no"
|
||||
mpegaudio_hp="yes"
|
||||
SHFLAGS='-shared -Wl,-soname,$@.$(LIBVERSION)'
|
||||
SHFLAGS='-shared -Wl,-soname,$@.$(LIBMAJOR)'
|
||||
netserver="no"
|
||||
need_inet_aton="no"
|
||||
ffserver="yes"
|
||||
@ -232,6 +232,8 @@ LIBPREF="lib"
|
||||
LIBSUF=".a"
|
||||
SLIBPREF="lib"
|
||||
SLIBSUF=".so"
|
||||
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)'
|
||||
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBMAJOR)'
|
||||
EXESUF=""
|
||||
BUILDSUF=""
|
||||
amr_nb="no"
|
||||
@ -343,6 +345,8 @@ strip="strip -x"
|
||||
installstrip=""
|
||||
LDFLAGS="-Wl,-dynamic,-search_paths_first"
|
||||
SLIBSUF=".dylib"
|
||||
SLIBNAME_WITH_FULLVERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)'
|
||||
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)'
|
||||
FFSLDFLAGS=-Wl,-bind_at_load
|
||||
;;
|
||||
MINGW32*)
|
||||
@ -1504,6 +1508,8 @@ if test "$lshared" = "yes" ; then
|
||||
echo "LAVFVERSION=$lavf_version" >> config.mak
|
||||
echo "LAVUMAJOR=${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
|
||||
echo "EXTRALIBS=$extralibs" >> config.mak
|
||||
version=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" |
|
||||
|
@ -399,6 +399,9 @@ OBJS := $(OBJS) $(ASM_OBJS)
|
||||
LIB= $(LIBPREF)avcodec$(LIBSUF)
|
||||
LIBAVUTIL= $(SRC_PATH)/libavutil/$(LIBPREF)avutil$(LIBSUF)
|
||||
ifeq ($(BUILD_SHARED),yes)
|
||||
LIBVERSION=$(LAVCVERSION)
|
||||
LIBMAJOR=$(LAVCMAJOR)
|
||||
NAME=avcodec
|
||||
SLIBNAME= $(SLIBPREF)avcodec$(SLIBSUF)
|
||||
endif
|
||||
TESTS= imgresample-test dct-test motion-test fft-test
|
||||
@ -490,14 +493,17 @@ fft-test: fft-test.o $(LIB)
|
||||
$(CC) -o $@ $^ $(LIBAVUTIL) -lm
|
||||
|
||||
ifeq ($(BUILD_SHARED),yes)
|
||||
LIBVERSION=$(LAVCMAJOR)
|
||||
install: all install-headers
|
||||
ifeq ($(CONFIG_WIN32),yes)
|
||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
|
||||
else
|
||||
install -d $(libdir)
|
||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libavcodec-$(VERSION)$(SLIBSUF)
|
||||
ln -sf $(SLIBPREF)avcodec-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME)
|
||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
|
||||
$(libdir)/$(SLIBNAME_WITH_VERSION)
|
||||
ln -sf $(SLIBNAME_WITH_VERSION) \
|
||||
$(libdir)/$(SLIBNAME_WITH_MAJOR)
|
||||
ln -sf $(SLIBNAME_WITH_VERSION) \
|
||||
$(libdir)/$(SLIBNAME)
|
||||
$(LDCONFIG) || true
|
||||
endif
|
||||
ifeq ($(CONFIG_PP),yes)
|
||||
|
@ -5,6 +5,9 @@ VPATH=$(SRC_PATH)/libavcodec/libpostproc
|
||||
|
||||
LIB = $(LIBPREF)postproc$(LIBSUF)
|
||||
ifeq ($(SHARED_PP),yes)
|
||||
LIBVERSION=$(SPPVERSION)
|
||||
LIBMAJOR=$(SPPMAJOR)
|
||||
NAME=postproc
|
||||
SLIBNAME = $(SLIBPREF)postproc$(SLIBSUF)
|
||||
endif
|
||||
|
||||
@ -53,8 +56,12 @@ ifeq ($(CONFIG_WIN32),yes)
|
||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
|
||||
else
|
||||
install -d $(libdir)
|
||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libpostproc-$(VERSION)$(SLIBSUF)
|
||||
ln -sf $(SLIBPREF)postproc-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME)
|
||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
|
||||
$(libdir)/$(SLIBNAME_WITH_VERSION)
|
||||
ln -sf $(SLIBNAME_WITH_VERSION) \
|
||||
$(libdir)/$(SLIBNAME_WITH_MAJOR)
|
||||
ln -sf $(SLIBNAME_WITH_VERSION) \
|
||||
$(libdir)/$(SLIBNAME)
|
||||
$(LDCONFIG) || true
|
||||
endif
|
||||
endif
|
||||
|
@ -80,7 +80,9 @@ endif
|
||||
|
||||
LIB= $(LIBPREF)avformat$(LIBSUF)
|
||||
ifeq ($(BUILD_SHARED),yes)
|
||||
LIBVERSION=$(LAVFMAJOR)
|
||||
LIBVERSION=$(LAVFVERSION)
|
||||
LIBMAJOR=$(LAVFMAJOR)
|
||||
NAME=avformat
|
||||
SLIBNAME= $(SLIBPREF)avformat$(SLIBSUF)
|
||||
AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
|
||||
endif
|
||||
@ -111,8 +113,12 @@ ifeq ($(CONFIG_WIN32),yes)
|
||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
|
||||
else
|
||||
install -d $(libdir)
|
||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/$(SLIBPREF)avformat-$(VERSION)$(SLIBSUF)
|
||||
ln -sf $(SLIBPREF)avformat-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME)
|
||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
|
||||
$(libdir)/$(SLIBNAME_WITH_VERSION)
|
||||
ln -sf $(SLIBNAME_WITH_VERSION) \
|
||||
$(libdir)/$(SLIBNAME_WITH_MAJOR)
|
||||
ln -sf $(SLIBNAME_WITH_VERSION) \
|
||||
$(libdir)/$(SLIBNAME)
|
||||
$(LDCONFIG) || true
|
||||
endif
|
||||
else
|
||||
|
@ -22,7 +22,9 @@ SRCS := $(OBJS:.o=.c)
|
||||
|
||||
LIB= $(LIBPREF)avutil$(LIBSUF)
|
||||
ifeq ($(BUILD_SHARED),yes)
|
||||
LIBVERSION=$(LAVUMAJOR)
|
||||
LIBVERSION=$(LAVUVERSION)
|
||||
LIBMAJOR=$(LAVUMAJOR)
|
||||
NAME=avutil
|
||||
SLIBNAME= $(SLIBPREF)avutil$(SLIBSUF)
|
||||
endif
|
||||
|
||||
@ -62,8 +64,12 @@ ifeq ($(CONFIG_WIN32),yes)
|
||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
|
||||
else
|
||||
install -d $(libdir)
|
||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libavutil-$(VERSION)$(SLIBSUF)
|
||||
ln -sf libavutil-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME)
|
||||
install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
|
||||
$(libdir)/$(SLIBNAME_WITH_VERSION)
|
||||
ln -sf $(SLIBNAME_WITH_VERSION) \
|
||||
$(libdir)/$(SLIBNAME_WITH_MAJOR)
|
||||
ln -sf $(SLIBNAME_WITH_VERSION) \
|
||||
$(libdir)/$(SLIBNAME)
|
||||
$(LDCONFIG) || true
|
||||
endif
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user