Merge pull request #49 from mweshahy/patch-1

Add proper SONAME to TOML shared library
This commit is contained in:
CK Tan 2021-02-16 17:12:38 -08:00 committed by GitHub
commit 1cfa8e42c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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)