diff options
author | Taylor Holberton <tay10r@protonmail.com> | 2019-04-13 23:14:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-13 23:14:34 -0400 |
commit | 1d2302a566935bf213f4f110a7f98c8f8a655d07 (patch) | |
tree | 33e7f868a859786b89a64d8372016d063b3f015f /src/Makefile | |
parent | 4ea3cdf179e01e3d462b6f5d51ed0e07215766f0 (diff) | |
parent | 1830893d7b0c43e53da0e4c50449cf7826101614 (diff) |
Merge pull request #128 from alexonea/master
Easier Version Specification
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/Makefile b/src/Makefile index d33c9f1..fde31e4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -18,6 +18,9 @@ override CFLAGS := $(WARNINGS) $(INCLUDE_DIRS) -fPIC $(CFLAGS) VPATH = ../include/tinyalsa OBJECTS = limits.o mixer.o pcm.o +LIBVERSION_MAJOR = $(TINYALSA_VERSION_MAJOR) +LIBVERSION = $(TINYALSA_VERSION) + .PHONY: all all: libtinyalsa.a libtinyalsa.so @@ -30,28 +33,28 @@ mixer.o: mixer.c mixer.h libtinyalsa.a: $(OBJECTS) $(AR) $(ARFLAGS) $@ $^ -libtinyalsa.so: libtinyalsa.so.1 +libtinyalsa.so: libtinyalsa.so.$(LIBVERSION_MAJOR) ln -sf $< $@ -libtinyalsa.so.1: libtinyalsa.so.1.1.1 +libtinyalsa.so.$(LIBVERSION_MAJOR): libtinyalsa.so.$(LIBVERSION) ln -sf $< $@ -libtinyalsa.so.1.1.1: $(OBJECTS) - $(LD) $(LDFLAGS) -shared -Wl,-soname,libtinyalsa.so.1 $^ -o $@ +libtinyalsa.so.$(LIBVERSION): $(OBJECTS) + $(LD) $(LDFLAGS) -shared -Wl,-soname,libtinyalsa.so.$(LIBVERSION_MAJOR) $^ -o $@ .PHONY: clean clean: rm -f libtinyalsa.a rm -f libtinyalsa.so - rm -f libtinyalsa.so.1 - rm -f libtinyalsa.so.1.1.1 + rm -f libtinyalsa.so.$(LIBVERSION_MAJOR) + rm -f libtinyalsa.so.$(LIBVERSION) rm -f $(OBJECTS) .PHONY: install -install: libtinyalsa.a libtinyalsa.so.1 +install: libtinyalsa.a libtinyalsa.so.$(LIBVERSION_MAJOR) install -d $(DESTDIR)$(LIBDIR)/ install libtinyalsa.a $(DESTDIR)$(LIBDIR)/ - install libtinyalsa.so.1.1.1 $(DESTDIR)$(LIBDIR)/ - ln -sf libtinyalsa.so.1.1.1 $(DESTDIR)$(LIBDIR)/libtinyalsa.so.1 - ln -sf libtinyalsa.so.1 $(DESTDIR)$(LIBDIR)/libtinyalsa.so + install libtinyalsa.so.$(LIBVERSION) $(DESTDIR)$(LIBDIR)/ + ln -sf libtinyalsa.so.$(LIBVERSION) $(DESTDIR)$(LIBDIR)/libtinyalsa.so.$(LIBVERSION_MAJOR) + ln -sf libtinyalsa.so.$(LIBVERSION_MAJOR) $(DESTDIR)$(LIBDIR)/libtinyalsa.so |