Revision 4e159595 libavutil/Makefile

View differences:

libavutil/Makefile
22 22

  
23 23
LIB= $(LIBPREF)avutil$(LIBSUF)
24 24
ifeq ($(BUILD_SHARED),yes)
25
SLIB= $(SLIBPREF)avutil$(SLIBSUF)
25
SLIBNAME= $(SLIBPREF)avutil$(SLIBSUF)
26
ifeq ($(CONFIG_DARWIN),yes)
27
SHFLAGS += -Wl,-install_name,$(libdir)/$(SLIBNAME),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION)
28
endif
26 29
endif
27 30

  
28
all: $(LIB) $(SLIB)
31
all: $(LIB) $(SLIBNAME)
29 32

  
30 33
$(LIB): $(OBJS)
31 34
	rm -f $@
32 35
	$(AR) rc $@ $(OBJS)
33 36
	$(RANLIB) $@
34 37

  
35
$(SLIB): $(OBJS)
38
$(SLIBNAME): $(OBJS)
36 39
ifeq ($(CONFIG_WIN32),yes)
37 40
	$(CC) $(SHFLAGS) -Wl,--output-def,$(@:.dll=.def) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
38 41
	-lib /machine:i386 /def:$(@:.dll=.def)
39 42
else
40
	$(CC) $(SHFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS) $(LDFLAGS)
43
	$(CC) $(SHFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(AMREXTRALIBS)
41 44
endif
42 45

  
43 46
%.o: %.c
......
49 52
dep:	depend
50 53

  
51 54
clean:
52
	rm -f *.o *.d *~ .depend $(LIB) $(SLIB) *.so
55
	rm -f *.o *.d *~ .depend $(LIB) $(SLIBNAME) *$(SLIBSUF)
53 56

  
54 57
distclean: clean
55 58
	rm -f Makefile.bak .depend
......
58 61
ifeq ($(BUILD_SHARED),yes)
59 62
install: all install-headers
60 63
ifeq ($(CONFIG_WIN32),yes)
61
	install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)"
64
	install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
62 65
else
63 66
	install -d $(libdir)
64
	install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavutil-$(VERSION).so
65
	ln -sf libavutil-$(VERSION).so $(libdir)/libavutil.so
67
	install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libavutil-$(VERSION)$(SLIBSUF)
68
	ln -sf libavutil-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME)
66 69
	$(LDCONFIG) || true
67 70
endif
68 71
else

Also available in: Unified diff