-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (37 loc) · 1.07 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 = cc
CFLAGS = -g
LEX = lex
RM = rm
LIBLEX='-ll'
ifeq ($(shell ldconfig -p|grep -qw libfl;echo $$?), 0)
LIBLEX='-lfl'
endif
default: xsm
xsm: lex.yy.o machine.o main.o simulator.o word.o memory.o registers.o tokenize.o disk.o debug.o exception.o
$(CC) $(CFLAGS) -o xsm lex.yy.o machine.o main.o simulator.o word.o memory.o registers.o tokenize.o disk.o debug.o exception.o $(LIBLEX)
lex.yy.c: parse.l
$(LEX) parse.l
lex.yy.o: lex.yy.c
$(CC) $(CFLAGS) -c lex.yy.c
machine.o: machine.c machine.h
$(CC) $(CFLAGS) -c machine.c
main.o: main.c
$(CC) $(CFLAGS) -c main.c
simulator.o: simulator.c simulator.h
$(CC) $(CFLAGS) -c simulator.c
word.o: word.c word.h
$(CC) $(CFLAGS) -c word.c
memory.o: memory.c memory.h
$(CC) $(CFLAGS) -c memory.c
registers.o: registers.c registers.h
$(CC) $(CFLAGS) -c registers.c
tokenize.o: tokenize.c tokenize.h
$(CC) $(CFLAGS) -c tokenize.c
disk.o: disk.c disk.h
$(CC) $(CFLAGS) -c disk.c
exception.o: exception.c exception.h
$(CC) $(CFLAGS) -c exception.c
debug.o: debug.c debug.h
$(CC) $(CFLAGS) -c debug.c
clean:
$(RM) *.o xsm lex.yy.c