-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (32 loc) · 1.32 KB
/
Makefile
File metadata and controls
41 lines (32 loc) · 1.32 KB
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
#------------------------------------------------------------------------------
# Makefile for CMPS 101 Programming Assignment 5
#
# make makes FindComponents
# make GraphClient makes GraphClient
# make clean removes binaries
# make checkFind tests FindComponents for memory leaks on in3
# make checkClient tests GraphClient for memory leaks
#------------------------------------------------------------------------------
BASE_SOURCES = Graph.c List.c
BASE_OBJECTS = Graph.o List.o
HEADERS = Graph.h List.h
COMPILE = gcc -c -std=c99 -Wall
LINK = gcc -o
REMOVE = rm -f
MEMCHECK = valgrind --leak-check=full
FindComponents : FindComponents.o $(BASE_OBJECTS)
$(LINK) FindComponents FindComponents.o $(BASE_OBJECTS)
GraphClient : GraphClient.o $(BASE_OBJECTS)
$(LINK) GraphClient GraphClient.o $(BASE_OBJECTS)
FindComponents.o : FindComponents.c $(HEADERS)
$(COMPILE) FindComponents.c
GraphClient.o : GraphClient.c $(HEADERS)
$(COMPILE) GraphClient.c
$(BASE_OBJECTS) : $(BASE_SOURCES) $(HEADERS)
$(COMPILE) $(BASE_SOURCES)
clean :
$(REMOVE) FindComponents GraphClient FindComponents.o GraphClient.o $(BASE_OBJECTS)
checkFind : FindComponents
$(MEMCHECK) FindComponents in3 junk3
checkClient : GraphClient
$(MEMCHECK) GraphClient