-
Notifications
You must be signed in to change notification settings - Fork 11
/
makefile
53 lines (40 loc) · 1.52 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
CC = @/usr/bin/gcc
CFLAGS = -Wall -g -std=c99
ECHO = @echo
all: directories MyCopy ForkCopy PipeCopy StopWatch MyShell MoreShell DupShell Mergesort BurgerBuddies complete
clean:
@rm -rf bin
$(ECHO) "All binaries removed"
directories:
@mkdir -p bin
$(ECHO) "Output directories created"
MyCopy: directories
$(CC) $(CFLAGS) "Problem 1/MyCopy.c" -o bin/MyCopy
$(ECHO) "Build MyCopy {Problem 1}"
ForkCopy: directories MyCopy
$(CC) $(CFLAGS) "Problem 2/ForkCopy.c" -o bin/ForkCopy
$(ECHO) "Build ForkCopy {Problem 2}"
PipeCopy: directories
$(CC) $(CFLAGS) "Problem 3/PipeCopy.c" -o bin/PipeCopy
$(ECHO) "Build PipeCopy {Problem 3}"
StopWatch: directories MyCopy ForkCopy PipeCopy
$(CC) $(CFLAGS) "Problem 4/StopWatch.c" -o bin/StopWatch
$(ECHO) "Build StopWatch {Problem 4}"
MyShell: directories
$(CC) $(CFLAGS) "Problem 5/MyShell.c" -o bin/MyShell
$(ECHO) "Build MyShell {Problem 5}"
MoreShell: directories
$(CC) $(CFLAGS) "Problem 6/MoreShell.c" -o bin/MoreShell
$(ECHO) "Build MoreShell {Problem 6}"
DupShell: directories
$(CC) $(CFLAGS) "Problem 7/DupShell.c" -o bin/DupShell
$(ECHO) "Build DupShell {Problem 7}"
Mergesort: directories
$(CC) $(CFLAGS) "Problem 8/MergesortSingle.c" -o bin/MergesortSingle
$(CC) $(CFLAGS) "Problem 8/MergesortMulti.c" -lpthread -o bin/MergesortMulti
$(ECHO) "Build Mergesort {Problem 8}"
BurgerBuddies: directories
$(CC) $(CFLAGS) "Problem 9/BurgerBuddies.c" -lpthread -o bin/BBC
$(ECHO) "Build BurgerBuddies {Problem 9}"
complete:
$(ECHO) "All binaries build to directory 'bin/'"