summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index c484804..e114da9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,10 @@
.POSIX:
.SUFFIXES:
-VERSION = 0.1.0
+VERSION = 0.2.0
+# Bumped to 1 in 0.2.0: cepis_error grew a faixa field, so a 0.1.0 binary
+# that declares one on the stack would be written past its end.
+SOVERSION = 1
PREFIX = /usr/local
LIBDIR = $(PREFIX)/lib
INCDIR = $(PREFIX)/include
@@ -75,7 +78,7 @@ $(LIB): $(OBJ)
ar rcs $@ $(OBJ)
$(SO): $(OBJ)
- $(CC) -shared -Wl,-soname,libcepis.so.0 -o $@ $(OBJ) $(LDLIBS)
+ $(CC) -shared -Wl,-soname,libcepis.so.$(SOVERSION) -o $@ $(OBJ) $(LDLIBS)
$(DRIVER): tests/test_cepis.c tests/abi_probe.S $(LIB) include/cepis.h
$(CC) $(CFLAGS) -o $@ tests/test_cepis.c tests/abi_probe.S $(LIB) \
@@ -116,6 +119,6 @@ install: build
mkdir -p $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCDIR)
cp $(LIB) $(DESTDIR)$(LIBDIR)/libcepis.a
cp $(SO) $(DESTDIR)$(LIBDIR)/libcepis.so.$(VERSION)
- ln -sf libcepis.so.$(VERSION) $(DESTDIR)$(LIBDIR)/libcepis.so.0
- ln -sf libcepis.so.0 $(DESTDIR)$(LIBDIR)/libcepis.so
+ ln -sf libcepis.so.$(VERSION) $(DESTDIR)$(LIBDIR)/libcepis.so.$(SOVERSION)
+ ln -sf libcepis.so.$(SOVERSION) $(DESTDIR)$(LIBDIR)/libcepis.so
cp include/cepis.h $(DESTDIR)$(INCDIR)/cepis.h