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