3 |
|
|
4 |
AM_CXXFLAGS = -Wreturn-type -ffast-math $(CXX_CPU_SWITCH) |
AM_CXXFLAGS = -Wreturn-type -ffast-math $(CXX_CPU_SWITCH) |
5 |
|
|
6 |
if HAVE_SQLITE3 |
if HAVE_WINDOWS |
7 |
sqlite3_lflags = $(SQLITE3_LIBS) |
winsocket_ldflags = -lws2_32 -lole32 |
|
sqlite3_cflags = $(SQLITE3_CFLAGS) |
|
8 |
else |
else |
9 |
sqlite3_lflags = |
winsocket_ldflags = |
|
sqlite3_cflags = |
|
10 |
endif |
endif |
11 |
|
|
12 |
noinst_LTLIBRARIES = liblinuxsamplernetwork.la |
noinst_LTLIBRARIES = liblinuxsamplernetwork.la |
16 |
lscpserver.cpp lscpserver.h \ |
lscpserver.cpp lscpserver.h \ |
17 |
lscpsymbols.h \ |
lscpsymbols.h \ |
18 |
lscpresultset.cpp lscpresultset.h \ |
lscpresultset.cpp lscpresultset.h \ |
19 |
lscpevent.cpp lscpevent.h \ |
lscpevent.cpp lscpevent.h |
20 |
lscpinstrumentloader.h lscpinstrumentloader.cpp |
liblinuxsamplernetwork_la_LIBADD = $(winsocket_ldflags) |
21 |
liblinuxsamplernetwork_la_LIBADD = $(sqlite3_lflags) |
|
22 |
liblinuxsamplernetwork_la_CFLAGS = $(sqlite3_cflags) |
yacc_sources = lscp.y |
23 |
liblinuxsamplernetwork_la_CXXFLAGS = $(sqlite3_cflags) |
|
24 |
|
EXTRA_DIST = $(yacc_sources) |
25 |
|
|
26 |
|
# automatically (re)generate lscpsymbols.h with bison / yacc if the |
27 |
|
# yacc source file(s) have been changed |
28 |
|
lscpsymbols.h: $(yacc_sources) |
29 |
|
$(top_builddir)/scripts/generate_parser.sh |
30 |
|
|
31 |
|
# automatically (re)generate lscpparser.cpp with bison / yacc if the |
32 |
|
# yacc source file(s) have been changed |
33 |
|
lscpparser.cpp: $(yacc_sources) |
34 |
|
$(top_builddir)/scripts/generate_parser.sh |
35 |
|
|
|
EXTRA_DIST = lscp.y |
|
36 |
|
|
37 |
.PHONY: parser |
.PHONY: parser |
38 |
|
|
39 |
# generate parser with lex and yacc |
# "make parser" was explicitly requested |
40 |
parser: |
parser: |
41 |
@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; |
|