diff options
author | Diego Biurrun <diego@biurrun.de> | 2005-09-26 10:05:13 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2005-09-26 10:05:13 +0000 |
commit | 4e159595b51af5edcf87aeb91359cb97485ef3df (patch) | |
tree | 61482ac1fdce94f505e4330510c57591047036f1 /libavutil/Makefile | |
parent | 399d84012fec13529e191b6f9d659b977ebfd035 (diff) | |
download | ffmpeg-4e159595b51af5edcf87aeb91359cb97485ef3df.tar.gz |
support for building dynamic libraries on Mac OS X
based on a patch by Lina Pezzella <J4rg0n -- at -- gentoo -- dot -- org>
Originally committed as revision 4616 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/Makefile')
-rw-r--r-- | libavutil/Makefile | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/libavutil/Makefile b/libavutil/Makefile index 7594ab2c6b..6765cc7ea1 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -22,22 +22,25 @@ SRCS := $(OBJS:.o=.c) LIB= $(LIBPREF)avutil$(LIBSUF) ifeq ($(BUILD_SHARED),yes) -SLIB= $(SLIBPREF)avutil$(SLIBSUF) +SLIBNAME= $(SLIBPREF)avutil$(SLIBSUF) +ifeq ($(CONFIG_DARWIN),yes) +SHFLAGS += -Wl,-install_name,$(libdir)/$(SLIBNAME),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION) +endif endif -all: $(LIB) $(SLIB) +all: $(LIB) $(SLIBNAME) $(LIB): $(OBJS) rm -f $@ $(AR) rc $@ $(OBJS) $(RANLIB) $@ -$(SLIB): $(OBJS) +$(SLIBNAME): $(OBJS) ifeq ($(CONFIG_WIN32),yes) $(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) -lib /machine:i386 /def:$(@:.dll=.def) else - $(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) $(LDFLAGS) + $(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) endif %.o: %.c @@ -49,7 +52,7 @@ depend: $(SRCS) dep: depend clean: - rm -f *.o *.d *~ .depend $(LIB) $(SLIB) *.so + rm -f *.o *.d *~ .depend $(LIB) $(SLIBNAME) *$(SLIBSUF) distclean: clean rm -f Makefile.bak .depend @@ -58,11 +61,11 @@ distclean: clean 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)/libavutil-$(VERSION).so - ln -sf libavutil-$(VERSION).so $(libdir)/libavutil.so + install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libavutil-$(VERSION)$(SLIBSUF) + ln -sf libavutil-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME) $(LDCONFIG) || true endif else |