-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
69 lines (54 loc) · 1.3 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
CC= gcc
CFLAGS= -Wall -g -pedantic -std=c11
MODULES = ./xxshModule/xxsh.o
MODULES += ./hashTable/dataStructure.o
MODULES += ./envModule/envVariables.o
MODULES += ./linkedList/linkedList.o
MODULES += ./linkedList/linkedList.o
MODULES += ./history/history.o
MODULES += ./fileIO/fileIO.o
MODULES += ./binary/binary.o
MODULES += ./pipe/pipe.o
all: xxsh
xxsh: $(MODULES)
$(CC) $(CFLAGS) $^ -o $@
xxsh.o:
# Recursive make:
# https://www.gnu.org/software/make/manual/html_node/Recursion.html
make -C ./xxshModule/
envVariables.o:
make -C ./envModule/
linkedList.o:
make -C ./linkedList/
dataStructure.o:
make -C ./hashTable/
history.o:
make -C ./history/
fileIO.o:
make -C ./fileIO/
binary.o:
make -C ./binary/
.PHONY:
test: xxsh
make test -C ./hashTable/
make test -C ./history/
make test -C ./linkedList/
make test -C ./envModule/
make test -C ./pipe/
memCheck: xxsh
valgrind -s --leak-check=yes --show-leak-kinds=all ./xxsh
tar:
make clean
tar --exclude="lab10/.git*" -czvf ../lab10_CrushBate_DakotaDoolaege.tar.gz\
-C .. lab10
clean:
rm -f *~ *.o xxsh
make clean -C ./envModule/
make clean -C ./hashTable/
make clean -C ./history/
make clean -C ./linkedList/
make clean -C ./xxshModule/
make clean -C ./testUtils/
make clean -C ./fileIO/
make clean -C ./binary/
make clean -C ./pipe/