File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-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
+ ln -s $(INSTALL_LIBRARY_PATH ) /libsds.so.$(LIBVERSION ) $(INSTALL_LIBRARY_PATH ) /libsds.so
22
+ $(INSTALL ) sds.h $(INSTALL_INCLUDE_PATH )
23
+
24
+ sds-lib : sds.c sds.h sdsalloc.h
25
+ $(CC ) -fPIC -fstack-protector -std=c99 -pedantic -Wall -Werror -shared \
26
+ -o libsds.so.$(LIBVERSION ) -Wl,-soname=libsds.so.$(LIBVERSION ) $(SDS_SRC )
2
27
3
28
sds-test : sds.c sds.h testhelp.h
4
29
$(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