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

View file

@ -4,8 +4,9 @@ OBJ = $(CFILES:.c=.o)
EXEC = toml_json toml_cat toml_sample EXEC = toml_json toml_cat toml_sample
CFLAGS = -std=c99 -Wall -Wextra -fpic CFLAGS = -std=c99 -Wall -Wextra -fpic
LIB_VERSION = 1.0
LIB = libtoml.a LIB = libtoml.a
LIB_SHARED = libtoml.so LIB_SHARED = libtoml.so.$(LIB_VERSION)
# to compile for debug: make DEBUG=1 # to compile for debug: make DEBUG=1
# to compile for no debug: make # to compile for no debug: make
@ -23,7 +24,7 @@ all: $(LIB) $(LIB_SHARED) $(EXEC)
libtoml.a: toml.o libtoml.a: toml.o
ar -rcs $@ $^ ar -rcs $@ $^
libtoml.so: toml.o libtoml.so.$(LIB_VERSION): toml.o
$(CC) -shared -o $@ $^ $(CC) -shared -o $@ $^
toml_json: toml_json.c $(LIB) toml_json: toml_json.c $(LIB)