-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
56 lines (38 loc) · 1.16 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
CC = gcc
CCFLAGS = -Wall
EXES = test_fetch_store test_arithmetic test_pq procsim test_jmp
all: $(EXES)
cpu.o: cpu.h cpu.c
$(CC) $(CCFLAGS) -c cpu.c
test_fetch_store.o: test_fetch_store.c cpu.o
$(CC) $(CCFLAGS) -c test_fetch_store.c
test_arithmetic.o: test_arithmetic.c cpu.o
$(CC) $(CCFLAGS) -c test_arithmetic.c
test_fetch_store: test_fetch_store.o
$(CC) -o test_fetch_store test_fetch_store.o cpu.o
test_arithmetic: test_arithmetic.o
$(CC) -o test_arithmetic test_arithmetic.o cpu.o
test_pq: test_pq.o pqueue.o
$(CC) -o test_pq test_pq.o pqueue.o
procsim: procsim.o pqueue.o cpu.o proctab.o resched.o
$(CC) -o procsim procsim.o pqueue.o cpu.o proctab.o resched.o
test_jmp: test_jmp.o
$(CC) -o test_jmp test_jmp.o cpu.o
test_jmp.o: test_jmp.c cpu.o
$(CC) $(CCFLAGS) -c test_jmp.c
pqueue.o: pqueue.h pqueue.c
$(CC) $(CCFLAGS) -c pqueue.c
test_pq.o: test_pq.c pqueue.o test.h
$(CC) $(CCFLAGS) -c test_pq.c
procsim.o: procsim.c
$(CC) $(CCFLAGS) -c procsim.c
proctab.o: proctab.h proctab.c
$(CC) $(CCFLAGS) -c proctab.c
resched.o: resched.h resched.c
$(CC) $(CCFLAGS) -c resched.c
clean:
rm -rf *.o $(EXES)
new:
make clean
make all
.PHONY: all clean new