From 9df0309a78c85f354f96a01c2f192c6281057a05 Mon Sep 17 00:00:00 2001 From: Taylor Holberton Date: Thu, 1 Dec 2016 21:28:32 -0800 Subject: added soversion with minor and patch number --- src/Makefile | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index da19c54..cde8267 100644 --- a/src/Makefile +++ b/src/Makefile @@ -19,7 +19,7 @@ VPATH = ../include/tinyalsa OBJECTS = mixer.o pcm.o .PHONY: all -all: libtinyalsa.a libtinyalsa.so.1 +all: libtinyalsa.a libtinyalsa.so pcm.o: pcm.c pcm.h @@ -28,19 +28,28 @@ mixer.o: mixer.c mixer.h libtinyalsa.a: $(OBJECTS) $(AR) $(ARFLAGS) $@ $^ -libtinyalsa.so.1: $(OBJECTS) - $(LD) $(LDFLAGS) -shared $^ -o $@ +libtinyalsa.so: libtinyalsa.so.1 + ln -sf $< $@ + +libtinyalsa.so.1: libtinyalsa.so.1.1.0 + ln -sf $< $@ + +libtinyalsa.so.1.1.0: $(OBJECTS) + $(LD) $(LDFLAGS) -shared -Wl,-soname,libtinyalsa.so.1 $^ -o $@ .PHONY: clean clean: rm -f libtinyalsa.a + rm -f libtinyalsa.so rm -f libtinyalsa.so.1 + rm -f libtinyalsa.so.1.1.0 rm -f $(OBJECTS) .PHONY: install install: libtinyalsa.a libtinyalsa.so.1 install -d $(DESTDIR)$(LIBDIR)/ - ln -sf libtinyalsa.so.1 $(DESTDIR)$(LIBDIR)/libtinyalsa.so install libtinyalsa.a $(DESTDIR)$(LIBDIR)/ - install libtinyalsa.so.1 $(DESTDIR)$(LIBDIR)/ + install libtinyalsa.so.1.1.0 $(DESTDIR)$(LIBDIR)/ + ln -sf libtinyalsa.so.1.1.0 $(DESTDIR)$(LIBDIR)/libtinyalsa.so.1 + ln -sf libtinyalsa.so.1 $(DESTDIR)$(LIBDIR)/libtinyalsa.so -- cgit v1.2.3