1 |
INCLUDES = $(all_includes) |
INCLUDES = $(all_includes) |
2 |
METASOURCES = AUTO |
METASOURCES = AUTO |
3 |
|
|
4 |
AM_CXXFLAGS = -ffast-math -march=$(target_cpu) -mcpu=$(target_cpu) |
AM_CXXFLAGS = -Wreturn-type -ffast-math $(CXX_CPU_SWITCH) |
5 |
|
|
6 |
noinst_LTLIBRARIES = liblinuxsamplernetwork.la |
noinst_LTLIBRARIES = liblinuxsamplernetwork.la |
7 |
liblinuxsamplernetwork_la_SOURCES = lscp.h lscpparser.cpp lscpparser.h lscpscanner.cpp lscpserver.cpp lscpserver.h lscpsymbols.h |
liblinuxsamplernetwork_la_SOURCES = \ |
8 |
|
lscp.h \ |
9 |
|
lscpparser.cpp lscpparser.h \ |
10 |
|
lscpserver.cpp lscpserver.h \ |
11 |
|
lscpsymbols.h \ |
12 |
|
lscpresultset.cpp lscpresultset.h \ |
13 |
|
lscpevent.cpp lscpevent.h |
14 |
|
|
15 |
|
yacc_sources = lscp.y |
16 |
|
|
17 |
|
EXTRA_DIST = $(yacc_sources) |
18 |
|
|
19 |
|
# automatically (re)generate lscpsymbols.h with bison / yacc if the |
20 |
|
# yacc source file(s) have been changed |
21 |
|
lscpsymbols.h: $(yacc_sources) |
22 |
|
$(top_builddir)/scripts/generate_parser.sh |
23 |
|
|
24 |
|
# automatically (re)generate lscpparser.cpp with bison / yacc if the |
25 |
|
# yacc source file(s) have been changed |
26 |
|
lscpparser.cpp: $(yacc_sources) |
27 |
|
$(top_builddir)/scripts/generate_parser.sh |
28 |
|
|
29 |
|
|
30 |
.PHONY: parser |
.PHONY: parser |
31 |
|
|
32 |
# generate parser with lex and yacc |
# "make parser" was explicitly requested |
33 |
parser: |
parser: |
34 |
@echo "Generating LSCP parser..." |
$(top_builddir)/scripts/generate_parser.sh |
|
@if which "lex" > /dev/null && which "yacc" > /dev/null; then \ |
|
|
yacc -d lscp.y && \ |
|
|
lex --fast --8bit lscp.l && \ |
|
|
yacc lscp.y && \ |
|
|
mv -f y.tab.h lscpsymbols.h && \ |
|
|
mv -f y.tab.c lscpparser.cpp && \ |
|
|
mv -f lex.yy.c lscpscanner.cpp; \ |
|
|
else \ |
|
|
echo "You need lex (or flex) and yacc (or bison) to generate the parser."; \ |
|
|
fi; |
|