Commit eb6ec67d authored by mru's avatar mru

Create shared libraries using versioned filenames and add -rpath-link

to LDFLAGS so linker finds them when using --as-needed (which is default
in some installations).  Using --as-needed is generally a good thing, so
add that explicitly as well.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@5362 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 179d25b3
...@@ -31,7 +31,10 @@ $(LIB): $(STATIC_OBJS) ...@@ -31,7 +31,10 @@ $(LIB): $(STATIC_OBJS)
$(AR) rc $@ $^ $(EXTRAOBJS) $(AR) rc $@ $^ $(EXTRAOBJS)
$(RANLIB) $@ $(RANLIB) $@
$(SLIBNAME): $(SHARED_OBJS) $(SLIBNAME): $(SLIBNAME_WITH_MAJOR)
ln -sf $^ $@
$(SLIBNAME_WITH_MAJOR): $(SHARED_OBJS)
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS) $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS)
ifeq ($(CONFIG_WIN32),yes) ifeq ($(CONFIG_WIN32),yes)
-lib /machine:i386 /def:$(@:.dll=.def) -lib /machine:i386 /def:$(@:.dll=.def)
......
...@@ -228,7 +228,7 @@ vhook="default" ...@@ -228,7 +228,7 @@ vhook="default"
dlfcn="no" dlfcn="no"
dlopen="no" dlopen="no"
mpegaudio_hp="yes" mpegaudio_hp="yes"
SHFLAGS='-shared -Wl,-soname,$@.$(LIBMAJOR)' SHFLAGS='-shared -Wl,-soname,$@'
netserver="no" netserver="no"
need_inet_aton="no" need_inet_aton="no"
protocols="yes" protocols="yes"
...@@ -383,7 +383,7 @@ cygwin="yes" ...@@ -383,7 +383,7 @@ cygwin="yes"
EXESUF=".exe" EXESUF=".exe"
;; ;;
Linux) Linux)
LDFLAGS="$LDFLAGS -rdynamic" LDFLAGS="$LDFLAGS -rdynamic -Wl,--as-needed -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil"
;; ;;
IRIX*) IRIX*)
ranlib="echo ignoring ranlib" ranlib="echo ignoring ranlib"
......
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