aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTaylor Holberton <taylorcholberton@gmail.com>2016-12-01 21:28:32 -0800
committerTaylor Holberton <taylorcholberton@gmail.com>2016-12-01 21:28:32 -0800
commit9df0309a78c85f354f96a01c2f192c6281057a05 (patch)
tree4d3e9697088e9f16a43f9c26d781bde15e2d78c1 /src
parent313c1d17f2593e1eead11bc4efd0b704c32855a3 (diff)
added soversion with minor and patch number
Diffstat (limited to 'src')
-rw-r--r--src/Makefile19
1 files changed, 14 insertions, 5 deletions
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