-
Notifications
You must be signed in to change notification settings - Fork 33
/
Makefile
59 lines (42 loc) · 1.24 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
55
56
57
58
59
EXE := enumy
SRC_DIR := src
SCAN_DIR := src/scans
OBJ_DIR := obj
OBJ_SCAN_DIR := obj
SRC := $(wildcard $(SRC_DIR)/*.c)
OBJ := $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
SRC_SCAN := $(wildcard $(SCAN_DIR)/*.c)
OBJ_SCAN := $(SRC_SCAN:$(SCAN_DIR)/%.c=$(OBJ_SCAN_DIR)/%.o)
CPPFLAGS := -Iinclude -lcap
LDFLAGS := -Llib -lcap
LDLIBS := -lpthread -lm -lcap
CFLAGS := -W
.PHONY: all clean
all: $(EXE)
$(EXE): $(OBJ) $(OBJ_SCAN)
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ -lpthread $(STATIC) $(ARCH) -g -Wall -Wextra -Wl,-rpath='.'
$(EXE_SCAN): $(OBJ_SCAN)
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ -lpthread $(STATIC) $(ARCH) -g -Wall -Wextra -Wl,-rpath='.'
$(OBJ_SCAN_DIR)/%.o: $(SCAN_DIR)/%.c | $(OBJ_SCAN_DIR)
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ -lpthread $(STATIC) $(ARCH) -g -Wall -Wextra -Wl,-rpath='.'
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c | $(OBJ_DIR)
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ -lpthread $(STATIC) $(ARCH) -g -Wall -Wextra -Wl,-rpath='.'
$(OBJ_DIR):
mkdir $@
clean:
$(RM) $(OBJ) $(OBJ_SCAN)
.PHONY: cov
cov:
make clean
cov-build --dir cov-int make
tar czvf enumy-cov.tgz cov-int
cppcheck:
cppcheck --enable=all src/* -I include
.PHONY: asci
release:
./build.sh all
make clean
make
make cppcheck
make cov
python3 scripts/benchmark.py