summaryrefslogtreecommitdiff
path: root/examples/c/glr/Makefile
blob: 4bf7149eb5d06a157314fb2e693a01a856a36763 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This Makefile is designed to be simple and readable.  It does not
# aim at portability.  It requires GNU Make.

BASE = c++-types
BISON = bison

all: $(BASE)

%.c %.h %.xml %.gv: %.y
	$(BISON) $(BISONFLAGS) --header --graph -o $*.c $<

$(BASE): $(BASE).o
	$(CC) $(CFLAGS) -o $@ $^

run: $(BASE)
	@echo "Type C++ declarations or expressions.  Quit with ctrl-d."
	./$<

CLEANFILES =									\
  $(BASE) *.o $(BASE).[ch] $(BASE).output $(BASE).xml $(BASE).html $(BASE).gv

clean:
	rm -f $(CLEANFILES)