File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 1- all : sds-test
1+ LIBVERSION = 2.0.0
2+
3+ SDS_SRC = sds.c sds.h sdsalloc.h
4+
5+ PREFIX ?= /usr/local
6+ INCLUDE_PATH ?= include/sds
7+ LIBRARY_PATH ?= lib
8+
9+ INSTALL_INCLUDE_PATH = $(DESTDIR )$(PREFIX ) /$(INCLUDE_PATH )
10+ INSTALL_LIBRARY_PATH = $(DESTDIR )$(PREFIX ) /$(LIBRARY_PATH )
11+
12+ INSTALL ?= cp -a
13+
14+ .PHONY : all
15+
16+ all : sds-test sds-install
17+
18+ sds-install : sds-lib
19+ mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
20+ $(INSTALL) libsds.so.$(LIBVERSION) $(INSTALL_LIBRARY_PATH)
21+ $(INSTALL) sds.h $(INSTALL_INCLUDE_PATH)
22+
23+ sds-lib : sds.c sds.h sdsalloc.h
24+ $(CC) -fPIC -fstack-protector -std=c99 -pedantic -Wall -Werror -shared \
25+ -o libsds.so.$(LIBVERSION) -Wl,-soname=libsds.so.$(LIBVERSION) $(SDS_SRC)
226
327sds-test : sds.c sds.h testhelp.h
428 $(CC ) -o sds-test sds.c -Wall -std=c99 -pedantic -O2 -DSDS_TEST_MAIN
You can’t perform that action at this time.
0 commit comments