aboutsummaryrefslogtreecommitdiffstats
path: root/common.mak
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-01-16 04:49:02 +0000
committerMåns Rullgård <mans@mansr.com>2010-01-16 04:49:02 +0000
commita482e61bd624c71e39c1a06367e303364b3ba153 (patch)
treebf44a006a8d66834106256afdf2af57c6aec413f /common.mak
parent2ed46eeab33d30cdfb5adf97dd7266931acde0ed (diff)
downloadffmpeg-a482e61bd624c71e39c1a06367e303364b3ba153.tar.gz
Add symbol versioning for shared libraries
Based on patch by Reinhard Tartler <siretart tauware de> Originally committed as revision 21236 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'common.mak')
-rw-r--r--common.mak6
1 files changed, 5 insertions, 1 deletions
diff --git a/common.mak b/common.mak
index 8ce464827c..deb3e782c5 100644
--- a/common.mak
+++ b/common.mak
@@ -9,6 +9,7 @@ vpath %.c $(SRC_DIR)
vpath %.h $(SRC_DIR)
vpath %.S $(SRC_DIR)
vpath %.asm $(SRC_DIR)
+vpath %.v $(SRC_DIR)
ifeq ($(SRC_DIR),$(SRC_PATH_BARE))
BUILD_ROOT_REL = .
@@ -33,6 +34,9 @@ CPPFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS)
%$(EXESUF): %.c
+%.ver: %.v
+ sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
+
SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries
ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES))
$(BUILD_ROOT_REL)/version.h: $(SVN_ENTRIES)
@@ -77,7 +81,7 @@ $(HOSTPROGS): %$(HOSTEXESUF): %.o
DEPS := $(OBJS:.o=.d)
depend dep: $(DEPS)
-CLEANSUFFIXES = *.d *.o *~ *.ho *.map
+CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
DISTCLEANSUFFIXES = *.pc
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp