diff options
Diffstat (limited to 'testing/libsds/02-install-target.patch')
-rw-r--r-- | testing/libsds/02-install-target.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/testing/libsds/02-install-target.patch b/testing/libsds/02-install-target.patch new file mode 100644 index 00000000000..ecf41e1af24 --- /dev/null +++ b/testing/libsds/02-install-target.patch @@ -0,0 +1,44 @@ +From cb4e94a516a8c8231407c7193ffb32d94a0d780e Mon Sep 17 00:00:00 2001 +From: rage <oxr463@gmx.us> +Date: Mon, 6 May 2019 14:43:31 -0400 +Subject: [PATCH] Add install target to Makefile + +Bug: https://github.com/antirez/sds/issues/97 +--- + Makefile | 27 ++++++++++++++++++++++++++- + 1 file changed, 26 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 045fa88..2d4f362 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,28 @@ +-all: sds-test ++LIBVERSION = 2.0.0 ++ ++SDS_SRC = sds.c sds.h sdsalloc.h ++ ++PREFIX ?= /usr/local ++INCLUDE_PATH ?= include/sds ++LIBRARY_PATH ?= lib ++ ++INSTALL_INCLUDE_PATH = $(DESTDIR)$(PREFIX)/$(INCLUDE_PATH) ++INSTALL_LIBRARY_PATH = $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH) ++ ++INSTALL ?= cp -a ++ ++.PHONY: all ++ ++all: sds-test sds-install ++ ++sds-install: sds-lib ++ mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH) ++ $(INSTALL) libsds.so.$(LIBVERSION) $(INSTALL_LIBRARY_PATH) ++ $(INSTALL) sds.h $(INSTALL_INCLUDE_PATH) ++ ++sds-lib: sds.c sds.h sdsalloc.h ++ $(CC) -fPIC -fstack-protector -std=c99 -pedantic -Wall -Werror -shared \ ++ -o libsds.so.$(LIBVERSION) -Wl,-soname=libsds.so.$(LIBVERSION) $(SDS_SRC) + + sds-test: sds.c sds.h testhelp.h + $(CC) -o sds-test sds.c -Wall -std=c99 -pedantic -O2 -DSDS_TEST_MAIN |