[Ffmpeg-cvslog] CVS: ffmpeg/libavformat Makefile,1.99,1.100

Diego Biurrun CVS diego
Mon Sep 26 12:05:15 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv18838/libavformat

Modified Files:
	Makefile 
Log Message:
support for building dynamic libraries on Mac OS X
based on a patch by Lina Pezzella <J4rg0n -- at -- gentoo -- dot -- org>


Index: Makefile
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/Makefile,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- Makefile	2 Sep 2005 19:18:59 -0000	1.99
+++ Makefile	26 Sep 2005 10:05:13 -0000	1.100
@@ -81,9 +81,11 @@
 
 LIB= $(LIBPREF)avformat$(LIBSUF)
 ifeq ($(BUILD_SHARED),yes)
-SLIB= $(SLIBPREF)avformat$(SLIBSUF)
-
-AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec
+SLIBNAME= $(SLIBPREF)avformat$(SLIBSUF)
+AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil
+ifeq ($(CONFIG_DARWIN),yes)
+SHFLAGS += -Wl,-install_name,$(libdir)/$(SLIBNAME),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION)
+endif
 ifeq ($(CONFIG_MP3LAME),yes)
 AVCLIBS+=-lmp3lame
 endif
@@ -91,14 +93,14 @@
 
 SRCS := $(OBJS:.o=.c) $(PPOBJS:.o=.cpp)
 
-all: $(LIB) $(SLIB)
+all: $(LIB) $(SLIBNAME)
 
 $(LIB): $(OBJS) $(PPOBJS)
 	rm -f $@
 	$(AR) rc $@ $(OBJS) $(PPOBJS)
 	$(RANLIB) $@
 
-$(SLIB): $(OBJS)
+$(SLIBNAME): $(OBJS)
 ifeq ($(CONFIG_WIN32),yes)
 	$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(PPOBJS) $(AVCLIBS) $(EXTRALIBS)
 	-lib /machine:i386 /def:$(@:.dll=.def)
@@ -112,11 +114,11 @@
 ifeq ($(BUILD_SHARED),yes)
 install: all install-headers
 ifeq ($(CONFIG_WIN32),yes)
-	install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
+	install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
 else
 	install -d $(libdir)
-	install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavformat-$(VERSION).so
-	ln -sf libavformat-$(VERSION).so $(libdir)/libavformat.so
+	install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/$(SLIBPREF)avformat-$(VERSION)$(SLIBSUF)
+	ln -sf $(SLIBPREF)avformat-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME)
 	$(LDCONFIG) || true
 endif
 else
@@ -143,7 +145,7 @@
 	g++ $(subst -Wall,,$(CFLAGS)) -c -o $@ $< 
 
 distclean clean: 
-	rm -f *.o *.d .depend *~ *.a *.so $(LIB)
+	rm -f *.o *.d .depend *~ *.a *$(SLIBSUF) $(LIB)
 
 #
 # include dependency files if they exist





More information about the ffmpeg-cvslog mailing list