-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
63 lines (41 loc) · 1.77 KB
/
makefile
File metadata and controls
63 lines (41 loc) · 1.77 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
OBJ = obj
CFLAGS = --std=c++17
# tests
all_tests: pr_test sch_test waitlist_test
pr_test: pr_check
./pr_check testFiles/prereq1.txt
sch_test: sch_check
./sch_check testFiles/prereq1.txt testFiles/schedule1.txt
waitlist_test: waitlist
./waitlist 2023Fall testFiles/prereq1.txt testFiles/schedule1.txt testFiles/enroll1.txt
# pr_check targets
pr_check: ${OBJ}/pr_user.o ${OBJ}/pr_check.o
g++ ${CFLAGS} ${OBJ}/pr_user.o ${OBJ}/pr_check.o -o $@ -g
${OBJ}/pr_user.o: pr_user.cpp
g++ -c ${CFLAGS} pr_user.cpp -o $@ -g
${OBJ}/pr_check.o: pr_check.cpp pr_check.h
g++ -c ${CFLAGS} pr_check.cpp -o $@ -g
debug pr: pr_check
gdb pr_check
# sch_check targets
sch_check: ${OBJ}/sch_check.o ${OBJ}/ScheduleChecker.o ${OBJ}/pr_check.o
g++ ${CFLAGS} ${OBJ}/sch_check.o ${OBJ}/ScheduleChecker.o ${OBJ}/pr_check.o -o $@ -g
${OBJ}/sch_check.o: sch_check.cpp
g++ -c ${CFLAGS} sch_check.cpp -o $@ -g
${OBJ}/ScheduleChecker.o: ScheduleChecker.cpp ScheduleChecker.h
g++ -c ${CFLAGS} ScheduleChecker.cpp -o $@ -g
debug_sch_check: sch_check
gdb sch_check
# waitlist targets
waitlist: ${OBJ}/waitlist.o ${OBJ}/ScheduleChecker.o ${OBJ}/pr_check.o ${OBJ}/EnrollmentManager.o ${OBJ}/MaxHeap.o
g++ ${CFLAGS} ${OBJ}/waitlist.o ${OBJ}/ScheduleChecker.o ${OBJ}/pr_check.o ${OBJ}/EnrollmentManager.o ${OBJ}/MaxHeap.o -o $@ -g
${OBJ}/waitlist.o: waitlist.cpp
g++ -c ${CFLAGS} waitlist.cpp -o $@ -g
${OBJ}/EnrollmentManager.o: EnrollmentManager.cpp EnrollmentManager.h pr_check.h ScheduleChecker.h MaxHeap.h
g++ -c ${CFLAGS} EnrollmentManager.cpp -o $@ -g
${OBJ}/MaxHeap.o: MaxHeap.cpp MaxHeap.h
g++ -c ${CFLAGS} MaxHeap.cpp -o $@ -g
debug_waitlist: waitlist
gdb --args waitlist Fall2023 testFiles/prereq1.txt testFiles/WLschedules1.txt testFiles/enroll1.txt
clean:
rm -f ${OBJ}/*.o pr_check sch_check waitlist