[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec/libpostproc Makefile, 1.25, 1.26

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


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

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/libavcodec/libpostproc/Makefile,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- Makefile	27 Jun 2005 00:55:29 -0000	1.25
+++ Makefile	26 Sep 2005 10:05:13 -0000	1.26
@@ -4,9 +4,16 @@
 VPATH=$(SRC_PATH)/libavcodec/libpostproc
 
 ifeq ($(SHARED_PP),yes)
-SPPLIB = $(SLIBPREF)postproc$(SLIBSUF)
-SPPMAJOR = 0
-SPPVERSION = $(SPPMAJOR).0.1
+SPPLIBNAME = $(SLIBPREF)postproc$(SLIBSUF)
+ifeq ($(CONFIG_DARWIN),yes)
+SPPLIBMAJOR = $(SLIBPREF)postproc.$(SPPMAJOR)$(SLIBSUF)
+SPPLIB = $(SLIBPREF)postproc.$(SPPVERSION)$(SLIBSUF)
+SHFLAGS += -Wl,-install_name,$(libdir)/$(SPPLIBNAME),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION)
+else
+SPPLIBMAJOR = $(SPPLIBNAME).$(SPPMAJOR)
+SPPLIB = $(SPPLIBNAME).$(SPPVERSION)
+SHFLAGS = -shared -Wl,-soname,$(SPPLIB)
+endif
 endif
 PPLIB = $(LIBPREF)postproc$(LIBSUF)
 
@@ -23,13 +30,13 @@
 .c.o:
 	$(CC) -c $(CFLAGS) $(LIBOBJFLAGS) -I$(SRC_PATH)/libavcodec -I../.. -o $@ $<
 
-all:    $(SWSLIB) $(PPLIB) $(SPPLIB)
+all:    $(SWSLIB) $(PPLIB) $(SPPLIBNAME)
 
 clean:
-	rm -f *.o *.a *~ *.so $(PPLIB) $(SPPLIB)
+	rm -f *.o *.a *~ *$(SLIBSUF) $(PPLIB) $(SPPLIBNAME)
 
 distclean:
-	rm -f Makefile.bak *.o *.a *~ *.so .depend
+	rm -f Makefile.bak *.o *.a *~ *$(SLIBSUF) .depend
 
 dep:    depend
 
@@ -40,9 +47,8 @@
 postprocess_pic.o: postprocess.c
 	$(CC) -c $(CFLAGS) -fomit-frame-pointer -fPIC -DPIC -I.. -I../.. -o $@ $<
 
-$(SPPLIB): $(SPPOBJS)
-	$(CC) -shared -Wl,-soname,$(SPPLIB).$(SPPMAJOR) \
-	-o $(SPPLIB) $(SPPOBJS)
+$(SPPLIBNAME): $(SPPOBJS)
+	$(CC) $(SHFLAGS) -o $(SPPLIBNAME) $(SPPOBJS)
 endif
 
 $(PPLIB): $(PPOBJS)
@@ -53,12 +59,12 @@
 install: all
 ifeq ($(SHARED_PP),yes)
 ifeq ($(CONFIG_WIN32),yes)
-	install $(INSTALLSTRIP) -m 755 $(SPPLIB) "$(prefix)"
+	install $(INSTALLSTRIP) -m 755 $(SPPLIBNAME) "$(prefix)"
 else
 	install -d $(libdir)
-	install $(INSTALLSTRIP) -m 755 $(SPPLIB) $(libdir)/$(SPPLIB).$(SPPVERSION)
-	ln -sf $(SPPLIB).$(SPPVERSION) $(libdir)/$(SPPLIB)
-	ln -sf $(SPPLIB).$(SPPVERSION) $(libdir)/$(SPPLIB).$(SPPMAJOR)
+	install $(INSTALLSTRIP) -m 755 $(SPPLIBNAME) $(libdir)/$(SPPLIB)
+	ln -sf $(SPPLIB) $(libdir)/$(SPPLIBNAME)
+	ln -sf $(SPPLIB) $(libdir)/$(SPPLIBMAJOR)
 	install -d $(libdir)/pkgconfig
 	install -m 644 ../../libpostproc.pc $(libdir)/pkgconfig
 	$(LDCONFIG) || true





More information about the ffmpeg-cvslog mailing list