From 970ab84baea6d596d9293a5971daf55f20dfcd3a Mon Sep 17 00:00:00 2001 From: mweshahy Date: Tue, 16 Feb 2021 12:45:18 +0100 Subject: [PATCH] Add proper SONAME to TOML shared library This patch renames the shared library output to libtoml.so.$(LIB_VERSION) instead of libtoml.so. This matches the Yocto standards so that the library can be integrated into Yocto build. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8554f35..0f1b5fa 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,9 @@ OBJ = $(CFILES:.c=.o) EXEC = toml_json toml_cat toml_sample CFLAGS = -std=c99 -Wall -Wextra -fpic +LIB_VERSION = 1.0 LIB = libtoml.a -LIB_SHARED = libtoml.so +LIB_SHARED = libtoml.so.$(LIB_VERSION) # to compile for debug: make DEBUG=1 # to compile for no debug: make @@ -23,7 +24,7 @@ all: $(LIB) $(LIB_SHARED) $(EXEC) libtoml.a: toml.o ar -rcs $@ $^ -libtoml.so: toml.o +libtoml.so.$(LIB_VERSION): toml.o $(CC) -shared -o $@ $^ toml_json: toml_json.c $(LIB)