1 |
INCLUDES = $(all_includes) |
AM_CPPFLAGS = $(all_includes) $(GIG_CFLAGS) $(SQLITE3_CFLAGS) |
2 |
METASOURCES = AUTO |
METASOURCES = AUTO |
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 |
|
lscp_shell_reference.cpp lscp_shell_reference.h \ |
20 |
lscpevent.cpp lscpevent.h |
lscpevent.cpp lscpevent.h |
21 |
|
liblinuxsamplernetwork_la_LIBADD = $(winsocket_ldflags) |
22 |
|
|
23 |
liblinuxsamplernetwork_la_LIBADD = $(sqlite3_lflags) |
yacc_sources = lscp.y |
|
liblinuxsamplernetwork_la_CFLAGS = $(sqlite3_cflags) |
|
|
liblinuxsamplernetwork_la_CXXFLAGS = $(sqlite3_cflags) |
|
24 |
|
|
25 |
EXTRA_DIST = lscp.y |
EXTRA_DIST = $(yacc_sources) |
26 |
|
|
27 |
|
# automatically (re)generate lscpsymbols.h with bison / yacc if the |
28 |
|
# yacc source file(s) have been changed |
29 |
|
lscpsymbols.h: $(yacc_sources) |
30 |
|
$(top_srcdir)/scripts/generate_parser.sh |
31 |
|
|
32 |
|
# automatically (re)generate lscpparser.cpp with bison / yacc if the |
33 |
|
# yacc source file(s) have been changed |
34 |
|
lscpparser.cpp: $(yacc_sources) |
35 |
|
$(top_srcdir)/scripts/generate_parser.sh |
36 |
|
|
37 |
|
# automatically (re)generate lscp_shell_reference.cpp if the |
38 |
|
# yacc source file or lscp.xml source have been changed |
39 |
|
lscp_shell_reference.cpp: $(yacc_sources) ../../Documentation/lscp.xml |
40 |
|
$(top_srcdir)/scripts/generate_parser.sh |
41 |
|
|
42 |
.PHONY: parser |
.PHONY: parser |
43 |
|
|
44 |
# generate parser with lex and yacc |
# "make parser" was explicitly requested |
45 |
parser: |
parser: |
46 |
@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; |
|