1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
APPNAME=hello_ordered_wait
$(APPNAME): $(APPNAME).c
cc -g -std=c11 -Wall -Wextra $(APPNAME).c -o $(APPNAME) -pthread
all: $(APPNAME) lint memcheck helgrind
.PHONY: lint
lint:
cpplint --filter=-readability/casting $(APPNAME).c
.PHONY: memcheck
memcheck:
valgrind --tool=memcheck ./$(APPNAME)
.PHONY: helgrind
helgrind:
valgrind --quiet --tool=helgrind ./$(APPNAME)
.PHONY: clean
clean:
rm -f $(APPNAME)