summaryrefslogtreecommitdiff
path: root/common.mak
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2006-05-11 20:36:00 +0000
committerMåns Rullgård <mans@mansr.com>2006-05-11 20:36:00 +0000
commitbaa3a937815c8bcd47b84cd4a3b450705197b27a (patch)
tree27654b0c0f30e3475a9a457fde9c70763537a6fd /common.mak
parent8dcf48a8c368dff8a4bfdcd7db6aa581788a2954 (diff)
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. Originally committed as revision 5362 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'common.mak')
-rw-r--r--common.mak5
1 files changed, 4 insertions, 1 deletions
diff --git a/common.mak b/common.mak
index 24ccaedb82..94272c5813 100644
--- a/common.mak
+++ b/common.mak
@@ -31,7 +31,10 @@ $(LIB): $(STATIC_OBJS)
$(AR) rc $@ $^ $(EXTRAOBJS)
$(RANLIB) $@
-$(SLIBNAME): $(SHARED_OBJS)
+$(SLIBNAME): $(SLIBNAME_WITH_MAJOR)
+ ln -sf $^ $@
+
+$(SLIBNAME_WITH_MAJOR): $(SHARED_OBJS)
$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $^ $(EXTRALIBS) $(EXTRAOBJS)
ifeq ($(CONFIG_WIN32),yes)
-lib /machine:i386 /def:$(@:.dll=.def)