mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 10:13:03 +00:00
examples: add a Makefile for C++ short examples
* examples/c++/Makefile: New. * examples/c++/local.mk, examples/c++/README: Adjust.
This commit is contained in:
21
examples/c++/Makefile
Normal file
21
examples/c++/Makefile
Normal file
@@ -0,0 +1,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: %.yy
|
||||
$(BISON) $(BISONFLAGS) -o $*.cc $<
|
||||
|
||||
%: %.cc
|
||||
$(CXX) $(CXXFLAGS) -o$@ $<
|
||||
|
||||
clean:
|
||||
rm -f $(PROGS:=.cc) $(PROGS)
|
||||
Reference in New Issue
Block a user