-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (41 loc) · 985 Bytes
/
Copy pathMakefile
File metadata and controls
52 lines (41 loc) · 985 Bytes
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
# Makefile for 'Nuggets'
#
# Team 17, May 2023
S = support
L = libcs50
P = player
OBJS =
LIBS =
LLIBS = $S/support.a $P/player.a $L/libcs50.a -lm
# uncomment the following to turn on verbose memory logging
#TESTING=-DMEMTEST
CFLAGS = -Wall -pedantic -std=c11 -ggdb -I$L -I$S -I$P
CC = gcc
MAKE = make
# for memory-leak tests
VALGRIND = valgrind --leak-check=full --show-leak-kinds=all
all:
make -C support
make -C libcs50
make -C player
make server
make client
# executable depends on object files
server: server.o $(LLIBS)
$(CC) $(CFLAGS) $^ $(LIBS) -o $@
client: client.o $(LLIBS)
$(CC) $(CFLAGS) $^ $(LIBS) -lcurses -o $@
# object files depend on include files
server.o: $S/message.h $L/file.h $L/mem.h $P/player.h $P/grid.h $P/gridcell.h
client.o: $S/message.h
test:
valgrind:
$(VALGRIND) ./server maps/visdemo.txt 5
clean:
rm -f core
rm -rf *~ *.o *.dSYM
rm -f client
rm -f server
make -C support clean
make -C libcs50 clean
make -C player clean