Fix tons of warnings, convert burg to use Makefile.common system, rename
[oota-llvm.git] / utils / Burg / Makefile
1 # $Id$
2 LEVEL = ../..
3 TOOLNAME = burg
4 EXTRASOURCES = gram.tab.c
5
6 include $(LEVEL)/Makefile.common
7
8 gram.tab.c gram.tab.h: gram.yc
9         $(VERB) $(BISON) -d $<
10         $(VERB) mv -f gram.tab.cc gram.tab.c
11         $(VERB) mv -f gram.tab.hc gram.tab.h
12
13 clean::
14         rm -ff y.tab.h y.tab.c core *.aux *.log *.dvi sample sample.c tmp
15
16 $(FE_OBJS):     b.h
17 $(BU_OBJS):     b.h
18 $(FE_OBJS):     fe.h
19
20 $(BUILD_ROOT)/Release/lex.o $(BUILD_ROOT)/Profile/lex.o $(BUILD_ROOT)/Debug/lex.o: gram.tab.h
21
22 doc.dvi: doc.tex
23         latex doc; latex doc
24
25
26 test: $(TOOLEXENAME_G) sample.gr
27         $(TOOLEXENAME_G) -I     <sample.gr   >sample.c && $(CC) $(CFLAGS) -o sample sample.c && ./sample
28         $(TOOLEXENAME_G) -I      sample.gr   >tmp && cmp tmp sample.c
29         $(TOOLEXENAME_G) -I     <sample.gr -o tmp && cmp tmp sample.c
30         $(TOOLEXENAME_G) -I      sample.gr -o tmp && cmp tmp sample.c
31         $(TOOLEXENAME_G) -I -O0 <sample.gr   >tmp && cmp tmp sample.c
32         $(TOOLEXENAME_G) -I -=  <sample.gr   >tmp && cmp tmp sample.c