1 |
INCLUDES = $(all_includes) |
2 |
METASOURCES = AUTO |
3 |
lib_LIBRARIES = liblscpserver.a |
4 |
|
5 |
liblscpserver_a_SOURCES = lscpparser.h lscpserver.cpp lscpparser.cpp lscpscanner.cpp |
6 |
noinst_HEADERS = lscpserver.h lscp.h |
7 |
|
8 |
.PHONY: parser |
9 |
|
10 |
# generate parser with lex and yacc |
11 |
parser: |
12 |
@echo "Generating LSCP parser..." |
13 |
@if which "lex" > /dev/null && which "yacc" > /dev/null; then \ |
14 |
yacc -d lscp.y && \ |
15 |
lex -f lscp.l && \ |
16 |
yacc lscp.y && \ |
17 |
mv -f y.tab.h lscpsymbols.h && \ |
18 |
mv -f y.tab.c lscpparser.cpp && \ |
19 |
mv -f lex.yy.c lscpscanner.cpp; \ |
20 |
else \ |
21 |
echo "You need lex (or flex) and yacc (or bison) to generate the parser."; \ |
22 |
fi; |