Project

General

Profile

Statistics
| Branch: | Revision:

cool / src / lib / GMLMIP-0.1 / parser / makefile @ 7c4d2eb4

History | View | Annotate | Download (1 KB)

1
include ../config.mk
2

    
3
.PHONY: all clean
4

    
5
all: parser lex.yy.o mlf-parser.tab.o mlf-driver.o
6

    
7

    
8
../formulas/%:
9
	make -C ../formulas/ $(@:../formulas/%=%)
10

    
11
lex.yy.o: lex.yy.h lex.yy.c
12
	$(GCC) $(GCCFLAGS) -c lex.yy.c
13
	
14
mlf-parser.tab.o: mlf-parser.tab.h mlf-parser.tab.cc ../formulas/GML_formula.h ../formulas/PML_formula.h lex.yy.h
15
	$(GCC) $(GCCFLAGS) -c mlf-parser.tab.cc
16

    
17
mlf-driver.o: mlf-driver.h mlf-driver.cpp mlf-parser.tab.h lex.yy.h ../formulas/formula.h
18
	$(GCC) $(GCCFLAGS) -c mlf-driver.cpp
19

    
20
mlf-parser.tab.h: mlf-parser.yy
21
	$(BISON) --defines=mlf-parser.tab.h mlf-parser.yy
22
	
23
lex.yy.h: mlf-scanner.ll
24
	$(LEX) --header-file=lex.yy.h mlf-scanner.ll
25

    
26
parser: mlf-parser.tab.h lex.yy.h ../formulas/formula.h
27

    
28

    
29
test: parser lex.yy.o mlf-parser.tab.o mlf-driver.o test.o 
30
	$(GCC) $(GCCFLAGS) test.o lex.yy.o mlf-parser.tab.o mlf-driver.o -o test
31
	
32
test.o: test.cpp mlf-driver.h
33
	$(GCC) $(GCCFLAGS) -c test.cpp
34

    
35
clean:
36
	rm -rf *~ *.o location.hh stack.hh mlf-parser.tab.h mlf-parser.tab.cc position.hh lex.yy.c lex.yy.h test