Checagem de tipos no if_stmt.
[toypasc.git] / Makefile
blob94463640def27637b070626b9c932fd38d5c03fd
1 LEX=flex
2 LEXFLAGS=
3 YACC=bison
4 YACCFLAGS=-v -t -d
5 CC=gcc
6 CFLAGS=-ggdb
7 LIBS=
8 PARSER=parser
9 SCANNER=scanner
10 OBJS=$(SCANNER).o $(PARSER).o symbol_table.o ast.o base.o typecheck_visitor.o graphprinter_visitor.o simpleprinter_visitor.o
11 PROGRAM=toypasc
13 all: $(OBJS)
14 $(CC) $(LIBS) $(OBJS) -o $(PROGRAM)
16 symbol_table.o: symbol_table.c symbol_table.h
17 $(CC) $(CFLAGS) symbol_table.c -c
19 base.o: base.c base.h
20 $(CC) $(CFLAGS) base.c -c
22 ast.o: ast.c ast.h
23 $(CC) $(CFLAGS) ast.c -c
25 typecheck_visitor.o: typecheck_visitor.c typecheck_visitor.h
26 $(CC) $(CFLAGS) typecheck_visitor.c -c
28 graphprinter_visitor.o: graphprinter_visitor.c graphprinter_visitor.h
29 $(CC) $(CFLAGS) graphprinter_visitor.c -c
31 simpleprinter_visitor.o: simpleprinter_visitor.c simpleprinter_visitor.h
32 $(CC) $(CFLAGS) simpleprinter_visitor.c -c
34 $(PARSER).o: $(PARSER).c $(PARSER).h
35 $(CC) $(CFLAGS) $(PARSER).c -c
37 $(SCANNER).o: $(SCANNER).c $(PARSER).h
38 $(CC) $(CFLAGS) $(SCANNER).c -c
40 $(SCANNER).c: $(SCANNER).l
41 $(LEX) $(LEXFLAGS) -o$(SCANNER).c $(SCANNER).l
43 $(PARSER).h: $(PARSER).y
44 $(YACC) $(YACCFLAGS) $(PARSER).y -o $(PARSER).c
46 clean:
47 rm -rf $(SCANNER).c $(PARSER).c $(PARSER).h *.o $(PROGRAM)