-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (22 loc) · 981 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
# Makefile for Laboration 4 5DV088 HT19
# Max Malmer, c17mmr@cs.umu.se
# Version 1.0, 2019-10-17
CC = gcc
CFLAGS = -std=gnu11 -pthread -g -Wall -Wextra -Werror -Wmissing-declarations -Wmissing-prototypes -Werror-implicit-function-declaration -Wreturn-type -Wparentheses -Wunused -Wold-style-definition -Wundef -Wshadow -Wstrict-prototypes -Wswitch-default -Wunreachable-code
all: mfind
mfind: mfind.o queue.o list.o
$(CC) $(CFLAGS) list.o queue.o mfind.o -o mfind
mfind.o: mfind.c mfind.h queue.h list.h
$(CC) $(CFLAGS) -c mfind.c
queue.o: queue.c queue.h list.h
$(CC) $(CFLAGS) -c queue.c
list.o: list.c list.h
$(CC) $(CFLAGS) -c list.c
run: mfind
./mfind -p 2 /pkg/comsol/ /usr/local/bin/ comsol
valgrind: mfind
valgrind --leak-check=full --show-reachable=yes --track-origins=yes ./mfind -p 2 /pkg/comsol/ /usr/local/bin/ comsol
helgrind: mfind
valgrind --tool=helgrind ./mfind -p 2 /pkg/comsol/ /usr/local/bin/ comsol
clean:
rm -f mfind *.o core