-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (26 loc) · 661 Bytes
/
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
# Pizza server project makefile 2012-2013
# `make` to compile all
# `make test` to run tests
# `make clean` to clean
# `make kill` to kill the server processes
# Options
COMP=gcc
WARN=-w
FLAGS=-pthread
all: server client
echo > logfile
server: pizza_server.c pizza.h
$(COMP) $(WARN) pizza_server.c -o server $(FLAGS)
client: client.c pizza.h
$(COMP) $(WARN) client.c -o client
clean:
-@rm server a.out client 2>/dev/null || true
test:
# Running run_tests.sh
./run_tests.sh
kill:
-@echo "Number of server processes: (correct: 2)"
-@pgrep -u `whoami` server | wc -l
-@echo "Killing them..."
-@pgrep -u `whoami` server | xargs kill
.PHONY: clean