Website Summary Files Commits Branches @commit @diff @stats
path: root / demo / bison / calc / Makefile
blob: 4f417cf976a2d585192cf0cdc6c3aef317065f7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
all: calc

BISON_DATA_DIR=$(shell bison --print-datadir)

lex.yy.c: lexer.lex
	flex lexer.lex

parser.tab.c: parser.y
	bison ${DEBUG} -x -d parser.y

parser.tab.h: parser.tab.c

parser.html: parser.tab.c
	xsltproc ${BISON_DATA_DIR}/xslt/xml2xhtml.xsl parser.xml > parser.html

parser.dot: parser.tab.c
	xsltproc ${BISON_DATA_DIR}/xslt/xml2dot.xsl parser.xml > parser.dot

parser.svg: parser.dot
	dot -Tsvg parser.dot > parser.svg

calc: lex.yy.c parser.tab.c parser.tab.h
	${CC} ${CFLAGS} lex.yy.c parser.tab.c -o calc