-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (46 loc) · 1.09 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
60
61
62
63
64
include makerc/definitions.mk
include makerc/options.mk
# ************************************Rules*********************************** #
all: $(NAME)
.PHONY: all
$(NAME): $(OBJS)
@mkdir -p $(BUILD_DIR)/log
$(CC) $(CFLAGS) $^ $(INCLUDE_FLAGS) -o $(NAME)
-include $(DEPENDS)
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.cpp
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(DFLAGS) $(INCLUDE_FLAGS) -c $< -o $@
clean:
@$(RM) $(BUILD_DIR)
.PHONY: clean
fclean: clean
@$(RM) $(NAME)
.PHONY: fclean
re: fclean all
.PHONY: re
debug:
@$(MAKE) DEBUG=1
.PHONY: debug
rebug: fclean debug
.PHONY: rebug
fsan:
@$(MAKE) DEBUG=1 FSAN=1
.PHONY: fsan
resan: fclean fsan
.PHONY: resan
cov:
@$(RM) $(COVERAGE_GCDA) $(COVERAGE_FILES)
@$(MAKE) DEBUG=1 COV=1
@./$(NAME)
@lcov -q -d build -c --output-file build/coverage.info --rc lcov_branch_coverage=1
@genhtml -q build/coverage.info -o build/coverage_report --rc genhtml_branch_coverage=1
.PHONY: cov
run: all
@./$(NAME)
.PHONY: run
recov: fclean cov
.PHONY: recov
test:
./tests/test.sh
.PHONY: test
# **************************************************************************** #