-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (22 loc) · 696 Bytes
/
Makefile
File metadata and controls
30 lines (22 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
CFLAGS += -W -Wall -Wextra -Werror -L. -finline-small-functions
INCLUDE_DIR = /usr/local/include
LIB_DIR = /usr/local/lib
main: shared tst-libstring
tst-libstring: CFLAGS += -ggdb3 -fsanitize=address
tst-libstring: libstring.c
shared: CFLAGS += -O3 -fstack-protector-all -fPIC -s -D_FORTIFY_SOURCE=2 -z now
shared: libstring.so
libstring.so: libstring.c
$(CC) $(CFLAGS) -shared -o $@ $<
chmod -x $@
install: libstring.so
install -m 644 libstring.so $(LIB_DIR)
install -m 644 libstring.h $(INCLUDE_DIR)
uninstall:
$(RM) $(LIB_DIR)/libstring.so
$(RM) $(INCLUDE_DIR)/libstring.h
html:
doxygen doxygen.conf
clean:
$(RM) test-string *~ libstring.so tst-libstring
$(RM) -r html/