3 |
|
|
4 |
AM_CXXFLAGS = -Wreturn-type -ffast-math $(CXX_CPU_SWITCH) |
AM_CXXFLAGS = -Wreturn-type -ffast-math $(CXX_CPU_SWITCH) |
5 |
|
|
|
if HAVE_SQLITE3 |
|
|
sqlite3_lflags = $(SQLITE3_LIBS) |
|
|
sqlite3_cflags = $(SQLITE3_CFLAGS) |
|
|
else |
|
|
sqlite3_lflags = |
|
|
sqlite3_cflags = |
|
|
endif |
|
|
|
|
6 |
noinst_LTLIBRARIES = liblinuxsamplernetwork.la |
noinst_LTLIBRARIES = liblinuxsamplernetwork.la |
7 |
liblinuxsamplernetwork_la_SOURCES = \ |
liblinuxsamplernetwork_la_SOURCES = \ |
8 |
lscp.h \ |
lscp.h \ |
10 |
lscpserver.cpp lscpserver.h \ |
lscpserver.cpp lscpserver.h \ |
11 |
lscpsymbols.h \ |
lscpsymbols.h \ |
12 |
lscpresultset.cpp lscpresultset.h \ |
lscpresultset.cpp lscpresultset.h \ |
13 |
lscpevent.cpp lscpevent.h \ |
lscpevent.cpp lscpevent.h |
14 |
lscpinstrumentloader.h lscpinstrumentloader.cpp |
|
15 |
liblinuxsamplernetwork_la_LIBADD = $(sqlite3_lflags) |
yacc_sources = lscp.y |
16 |
liblinuxsamplernetwork_la_CFLAGS = $(sqlite3_cflags) |
|
17 |
liblinuxsamplernetwork_la_CXXFLAGS = $(sqlite3_cflags) |
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 |
|
|
|
EXTRA_DIST = lscp.y |
|
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 "yacc" > /dev/null; then \ |
|
|
yacc -d lscp.y && \ |
|
|
yacc lscp.y && \ |
|
|
mv -f y.tab.h lscpsymbols.h && \ |
|
|
mv -f y.tab.c lscpparser.cpp && \ |
|
|
echo -n "Updating Documentation/lscp.xml..." && \ |
|
|
(cd ../../scripts/ && ./update_grammar.pl) && \ |
|
|
echo "OK"; \ |
|
|
else \ |
|
|
echo "You need yacc (or bison) to generate the parser."; \ |
|
|
fi; |
|