1 |
INCLUDES = $(all_includes) |
INCLUDES = $(all_includes) |
2 |
METASOURCES = AUTO |
METASOURCES = AUTO |
|
lib_LIBRARIES = liblscpserver.a |
|
3 |
|
|
4 |
liblscpserver_a_SOURCES = lscpparser.h lscpserver.cpp lscpparser.cpp lscpscanner.cpp |
AM_CXXFLAGS = -Wreturn-type -ffast-math $(CXX_CPU_SWITCH) |
5 |
noinst_HEADERS = lscpserver.h lscp.h |
|
6 |
|
if HAVE_SQLITE3 |
7 |
|
sqlite3_lflags = $(SQLITE3_LIBS) |
8 |
|
else |
9 |
|
sqlite3_lflags = |
10 |
|
endif |
11 |
|
|
12 |
|
noinst_LTLIBRARIES = liblinuxsamplernetwork.la |
13 |
|
liblinuxsamplernetwork_la_SOURCES = \ |
14 |
|
lscp.h \ |
15 |
|
lscpparser.cpp lscpparser.h \ |
16 |
|
lscpserver.cpp lscpserver.h \ |
17 |
|
lscpsymbols.h \ |
18 |
|
lscpresultset.cpp lscpresultset.h \ |
19 |
|
lscpevent.cpp lscpevent.h \ |
20 |
|
lscpinstrumentloader.h lscpinstrumentloader.cpp |
21 |
|
liblinuxsamplernetwork_la_LIBADD = $(sqlite3_lflags) |
22 |
|
|
23 |
|
EXTRA_DIST = lscp.y |
24 |
|
|
25 |
.PHONY: parser |
.PHONY: parser |
26 |
|
|
27 |
# generate parser with lex and yacc |
# generate parser with lex and yacc |
28 |
parser: |
parser: |
29 |
@echo "Generating LSCP parser..." |
@echo "Generating LSCP parser..." |
30 |
@if which "lex" > /dev/null && which "yacc" > /dev/null; then \ |
@if which "yacc" > /dev/null; then \ |
31 |
yacc -d lscp.y && \ |
yacc -d lscp.y && \ |
|
lex -f lscp.l && \ |
|
32 |
yacc lscp.y && \ |
yacc lscp.y && \ |
33 |
mv -f y.tab.h lscpsymbols.h && \ |
mv -f y.tab.h lscpsymbols.h && \ |
34 |
mv -f y.tab.c lscpparser.cpp && \ |
mv -f y.tab.c lscpparser.cpp && \ |
35 |
mv -f lex.yy.c lscpscanner.cpp; \ |
echo -n "Updating Documentation/lscp.xml..." && \ |
36 |
|
(cd ../../scripts/ && ./update_grammar.pl) && \ |
37 |
|
echo "OK"; \ |
38 |
else \ |
else \ |
39 |
echo "You need lex (or flex) and yacc (or bison) to generate the parser."; \ |
echo "You need yacc (or bison) to generate the parser."; \ |
40 |
fi; |
fi; |