This repository was archived by the owner on Jun 24, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (44 loc) · 1.43 KB
/
Copy pathMakefile
File metadata and controls
68 lines (44 loc) · 1.43 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
64
65
66
67
68
CC = gcc
CFLAGS = -Wall -g -Iinclude
LDFLAGS =
.PHONY: all clean folders
all: folders controller runner
controller: bin/controller
runner: bin/runner
folders:
@mkdir -p obj bin tmp
bin/controller: obj/controller_main.o obj/controller.o obj/queue.o obj/protocol.o obj/utils.o
$(CC) $(LDFLAGS) $^ -o $@
bin/runner: obj/runner_main.o obj/parser.o obj/executor.o obj/requests.o obj/protocol.o obj/utils.o
$(CC) $(LDFLAGS) $^ -o $@
obj/runner_main.o: src/runner/main.c
$(CC) $(CFLAGS) -c $< -o $@
obj/parser.o: src/runner/parser.c
$(CC) $(CFLAGS) -c $< -o $@
obj/executor.o: src/runner/executor.c
$(CC) $(CFLAGS) -c $< -o $@
obj/requests.o: src/runner/requests.c
$(CC) $(CFLAGS) -c $< -o $@
obj/controller_main.o: src/controller/main.c
$(CC) $(CFLAGS) -c $< -o $@
obj/controller.o: src/controller/controller.c
$(CC) $(CFLAGS) -c $< -o $@
obj/queue.o: src/controller/queue.c
$(CC) $(CFLAGS) -c $< -o $@
obj/protocol.o: src/protocol.c
$(CC) $(CFLAGS) -c $< -o $@
obj/utils.o: src/utils.c
$(CC) $(CFLAGS) -c $< -o $@
bin/test_queue: tests/queue/test_queue.c src/controller/queue.c src/protocol.c
$(CC) $(CFLAGS) $^ -o $@
.PHONY: all clean test test-fcfs test-rr test-random run-all
test-fcfs: all
bash tests/run_test.sh fcfs 1 fcfs_workload.sh
test-rr: all
bash tests/run_test.sh rr 1 rr_workload.sh
test-random: all
bash tests/run_test.sh random 1 random_workload.sh
test: all
bash tests/run_all.sh
clean:
rm -f obj/*.o bin/* tmp/*