-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
77 lines (57 loc) · 1.42 KB
/
Makefile.in
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.PHONY: analysis full-analysis format tags purge test fuzz coverage html-coverage fuzz-coverage fuzz-html-coverage
bindir=@bindir@
TARGET_SYS=@TARGET_SYS@
ifeq (Darwin,$(TARGET_SYS))
ifeq (,$(MACOSX_DEPLOYMENT_TARGET))
export MACOSX_DEPLOYMENT_TARGET=10.5
endif
endif
PWD=$(shell pwd)
BIN=$(PWD)/bin
INCLUDE=$(PWD)/include
LIB=$(PWD)/lib
TEST=$(PWD)/test
SRC=$(PWD)/src
DEPS=$(PWD)/deps
default: build
$(LIB) $(BIN) $(INCLUDE):
@ mkdir -p $@
build-deps: $(LIB) $(BIN) $(INCLUDE)
@ git submodule update --init --recursive
@ $(MAKE) -C $(DEPS)
build: build-deps
@ $(MAKE) -C $(SRC)
analysis: clean
@ scan-build $(MAKE)
# run clang-analyzer on deps + src
full-analysis: purge
@ scan-build $(MAKE) -s
test: build
@ $(MAKE) $@ -C $(TEST)
fuzz: build
@ $(MAKE) $@ -C $(TEST)
coverage: build
@ $(MAKE) $@ -C $(TEST)
html-coverage: build
@ $(MAKE) $@ -C $(TEST)
fuzz-coverage: build
@ $(MAKE) $@ -C $(TEST)
fuzz-html-coverage: build
@ $(MAKE) $@ -C $(TEST)
format:
@ find $(SRC) -name \*.h -o -name \*.c | xargs clang-format -i
@ find $(TEST) -name \*.h -o -name \*.c | xargs clang-format -i
tags:
@ ctags -R
clean:
@ rm -rf $(BIN) $(LIB) $(INCLUDE)
@ $(MAKE) $@ -C $(SRC)
@ $(MAKE) $@ -C $(TEST)
@ rm -f *.profraw
purge: clean
@ rm -rf autom4te.cache config.status config.log
@ $(MAKE) -C $(DEPS) clean
@ git submodule deinit --all -f
@ rm -f tags
install:
@ install -m 0755 $(BIN)/sonic $(bindir)/sonic