-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
54 lines (37 loc) · 1.1 KB
/
makefile
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
.PHONY: all clean install uninstall test
# config.mk doesn't exist by default. Either copy unix.mk or windows.mk to
# config.mk or symlink it.
include config.mk
OUT=crvr$(OUTEXT)
OBJS=crvr.$(OBJ) asl.$(OBJ) http.$(OBJ) utils.$(OBJ) socket_layer.$(OBJ) base_defs.$(OBJ)
all: $(OUT)
pkg: crvr.tar.xz
crvr.tar.xz: crvr asl.html asl_done.html
tar -cf crvr.tar crvr asl.html asl_done.html
xz crvr.tar
$(OUT): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS) $(LDLIBS)
analyze: crvr.c asl.c
clang-tidy crvr.c asl.c -checks=-*,cert-*,clang-analyzer-*,linuxkernel-*,performance-*,portability-*,readability-*
test: tests crvr tests/asl_done.html tests/asl.html tests/index.html tests/image.png
cd tests/ && gdb ../crvr
tests/asl_done.html: asl_done.html
cp -f $^ $@
tests/asl.html: asl.html
cp -f $^ $@
tests/index.html: index.html
cp -f $^ $@
tests/image.png:
scrot tests/image.png
tests:
mkdir tests
clean:
$(RM) $(OUT)
$(RM) *.$(OBJ)
$(RM) crvr.tar.xz
install: crvr
mkdir -p /usr/local/bin
cp crvr /usr/local/bin
uninstall:
if [ -e /usr/local/bin/crvr ]; rm /usr/local/bin/crvr
.PHONY: all clean