-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (23 loc) · 767 Bytes
/
Makefile
File metadata and controls
33 lines (23 loc) · 767 Bytes
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
CC = gcc
CFLAGS = -g -fcommon
LEX = lex
YACC = yacc
default: expl-bin ltranslate
ltranslate: ltranslate.o
$(CC) $(CFLAGS) -o ltranslate ltranslate.lex.o
ltranslate.o: ltranslate.lex.c
$(CC) $(CFLAGS) -w -c ltranslate.lex.c
ltranslate.lex.c: ltranslate.l
$(LEX) -o ltranslate.lex.c ltranslate.l
expl-bin: lex.yy.o y.tab.o
$(CC) $(CFLAGS) -o expl-bin lex.yy.o y.tab.o
y.tab.o: y.tab.c y.tab.h abstree.h symboltable.h symboltable.c aa.c codegen.c userdtype.c typecheck.h typecheck.c
$(CC) $(CFLAGS) -w -c y.tab.c
lex.yy.o: lex.yy.c y.tab.c abstree.h
$(CC) $(CFLAGS) -w -c lex.yy.c
lex.yy.c: abstree.l
$(LEX) abstree.l
y.tab.c: abstree.y
$(YACC) -d abstree.y
clean:
$(RM) expl-bin ltranslate *.o lex.yy.c y.* ltranslate.lex.c assemblycode.xsm