summaryrefslogtreecommitdiff
path: root/utils/Burg/Makefile
blob: 8e578d1347310e34dbf84e0506f693a54c1bd9e8 (plain)
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
##===- utils/Burg/Makefile ------------------------------*- Makefile -*-===##
# 
#                     The LLVM Compiler Infrastructure
#
# This file was developed by the LLVM research group and is distributed under
# the University of Illinois Open Source License. See LICENSE.TXT for details.
# 
##===----------------------------------------------------------------------===##
LEVEL = ../..
TOOLNAME = burg
ExtraSource = gram.tab.c

include $(LEVEL)/Makefile.common

gram.tab.c gram.tab.h:: gram.yc
	$(VERB) $(BISON) -o gram.tab.c -d $<

$(SourceDir)/lex.c: gram.tab.h

clean::
	rm -rf gram.tab.h gram.tab.c core* *.aux *.log *.dvi sample sample.c tmp

#$(BUILD_OBJ_DIR)/Release/lex.o $(BUILD_OBJ_DIR)/Profile/lex.o $(BUILD_OBJ_DIR)/Debug/lex.o: gram.tab.h

doc.dvi: doc.tex
	latex doc; latex doc


test:: $(TOOLEXENAME_G) sample.gr
	$(TOOLEXENAME_G) -I     <sample.gr   >sample.c && $(CC) $(CFLAGS) -o sample sample.c && ./sample
	$(TOOLEXENAME_G) -I      sample.gr   >tmp && cmp tmp sample.c
	$(TOOLEXENAME_G) -I     <sample.gr -o tmp && cmp tmp sample.c
	$(TOOLEXENAME_G) -I      sample.gr -o tmp && cmp tmp sample.c
	$(TOOLEXENAME_G) -I -O0 <sample.gr   >tmp && cmp tmp sample.c
	$(TOOLEXENAME_G) -I -=  <sample.gr   >tmp && cmp tmp sample.c
	$(RM) -f tmp sample.c