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

BISON = bison
CXX = g++
CXXFLAGS =
PROGS = simple variant variant-11

simple: CXXFLAGS = -std=c++14
variant-11: CXXFLAGS = -std=c++11

all: $(PROGS)

%.cc %.hh %.html %.gv: %.yy
	$(BISON) $(BISONFLAGS) --html --graph -o $*.cc $<

%: %.cc
	$(CXX) $(CXXFLAGS) -o$@ $<

clean:
	rm -f $(PROGS:=.cc) $(PROGS)