[lxc-devel] [libresource/master] Add abi version
hallyn on Github
lxc-bot at linuxcontainers.org
Thu Aug 1 05:14:18 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 641 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190731/4d6ed8d1/attachment.bin>
-------------- next part --------------
From 5e79be7b476fa149f6ba32155afcf940352c3c5a Mon Sep 17 00:00:00 2001
From: Serge Hallyn <shallyn at cisco.com>
Date: Thu, 1 Aug 2019 00:07:44 -0500
Subject: [PATCH] Add abi version
Closes #8
1. add abi version with -soname link option
2. name the built library libresource.so.$(abi) (where of course
abi is major.minor.releaseno)
3. Call this 0.1.1. Is there a different number we want to start at?
Tried to do this the simplest, least obtrusive way.
Signed-off-by: Serge Hallyn <shallyn at cisco.com>
---
Makefile | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index dcfd226..fd3b897 100644
--- a/Makefile
+++ b/Makefile
@@ -2,16 +2,20 @@ CC = gcc
CFLAGS = -g -Wall -Werror -fPIC
DEPS = resource.h res_impl.h resmem.h resnet.h resproc.h
OBJ = resource.o resmem.o resnet.o resproc.o
-LIB = libresource.so
TEST = test
RM = rm -rf
CP = cp
+ABI_MAJOR=0
+ABI_MINOR=1
+ABI_MICRO=1
+ABI=$(ABI_MAJOR).$(ABI_MINOR).$(ABI_MICRO)
+LIB = libresource.so.$(ABI)
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
all: $(OBJ)
- $(CC) -shared -o $(LIB) $^ $(CFLAGS)
+ $(CC) -shared -Wl,-soname,libresource.so.$(ABI_MAJOR) -o $(LIB) $^ $(CFLAGS)
.PHONY : clean
clean:
More information about the lxc-devel
mailing list