@@ -1,32 +1,32 @@
|
|
1 |
APPNAME=$(shell basename $(shell pwd))
|
2 |
-
APPARGS=
|
3 |
|
4 |
CC=cc
|
5 |
CFLAGS=-g -std=gnu11 -Wall -Wextra
|
6 |
LIBS=-pthread
|
7 |
|
8 |
|
9 |
$(APPNAME): $(APPNAME).c
|
10 |
$(CC) $(CFLAGS) $(APPNAME).c -o $(APPNAME) $(LIBS)
|
11 |
|
12 |
all: $(APPNAME) lint memcheck helgrind
|
13 |
|
14 |
.PHONY: lint
|
15 |
lint:
|
16 |
cpplint --filter=-readability/casting $(APPNAME).c
|
17 |
|
18 |
.PHONY: memcheck
|
19 |
memcheck:
|
20 |
valgrind --tool=memcheck ./$(APPNAME) $(APPARGS)
|
21 |
|
22 |
.PHONY: helgrind
|
23 |
helgrind:
|
24 |
valgrind --quiet --tool=helgrind ./$(APPNAME) $(APPARGS)
|
25 |
|
26 |
.PHONY: gitignore
|
27 |
gitignore:
|
28 |
echo $(APPNAME) > .gitignore
|
29 |
|
30 |
.PHONY: clean
|
31 |
clean:
|
32 |
rm -f $(APPNAME)
|
1 |
APPNAME=$(shell basename $(shell pwd))
|
2 |
+
APPARGS=5 2 3 0 100 0 750
|
3 |
|
4 |
CC=cc
|
5 |
CFLAGS=-g -std=gnu11 -Wall -Wextra
|
6 |
LIBS=-pthread
|
7 |
|
8 |
|
9 |
$(APPNAME): $(APPNAME).c
|
10 |
$(CC) $(CFLAGS) $(APPNAME).c -o $(APPNAME) $(LIBS)
|
11 |
|
12 |
all: $(APPNAME) lint memcheck helgrind
|
13 |
|
14 |
.PHONY: lint
|
15 |
lint:
|
16 |
cpplint --filter=-readability/casting $(APPNAME).c
|
17 |
|
18 |
.PHONY: memcheck
|
19 |
memcheck:
|
20 |
valgrind --tool=memcheck ./$(APPNAME) $(APPARGS)
|
21 |
|
22 |
.PHONY: helgrind
|
23 |
helgrind:
|
24 |
valgrind --quiet --tool=helgrind ./$(APPNAME) $(APPARGS)
|
25 |
|
26 |
.PHONY: gitignore
|
27 |
gitignore:
|
28 |
echo $(APPNAME) > .gitignore
|
29 |
|
30 |
.PHONY: clean
|
31 |
clean:
|
32 |
rm -f $(APPNAME)
|