glr2.cc: put glr_state_set and glr_stack_item in unnamed namespace
[bison.git] / examples / c / reccalc / Makefile
blob69fc0c081bcfa96c413ea208468d7e5e1565e459
1 # This Makefile is designed to be simple and readable. It does not
2 # aim at portability. It requires GNU Make.
4 BASE = reccalc
5 BISON = bison
6 FLEX = flex
8 all: $(BASE)
10 %.c %.h %.xml %.gv: %.y
11 $(BISON) $(BISONFLAGS) --header --graph -o $*.c $<
13 %.c %.h: %.l
14 $(FLEX) $(FLEXFLAGS) -o$*.c --header=$*.h $<
16 scan.o: parse.h
17 parse.o: scan.h
18 $(BASE): parse.o scan.o
19 $(CC) $(CFLAGS) -o $@ $^
21 run: $(BASE)
22 @echo "Type arithmetic expressions. Quit with ctrl-d."
23 ./$<
25 CLEANFILES = \
26 $(BASE) *.o \
27 parse.[ch] parse.output parse.xml parse.html parse.gv \
28 scan.[ch]
29 clean:
30 rm -f $(CLEANFILES)