diff options
author | Cristian Cadar <cristic@cs.stanford.edu> | 2009-06-08 08:54:17 +0000 |
---|---|---|
committer | Cristian Cadar <cristic@cs.stanford.edu> | 2009-06-08 08:54:17 +0000 |
commit | f9f8e5339018dfbe71c6f67575effd1455468875 (patch) | |
tree | 363ea35212ae6fa384cad683e65f7399d0df2cdd /lib/SMT/Makefile | |
parent | ef0bc0aee68cf791544865525005d91c73791bf2 (diff) | |
download | klee-f9f8e5339018dfbe71c6f67575effd1455468875.tar.gz |
Made the SMTLIB parser compile. Commented out most of the grammar in
smtlib.y. Made a temporary functional Makefile that compiles the lex/bison generated files. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73064 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/SMT/Makefile')
-rw-r--r-- | lib/SMT/Makefile | 52 |
1 files changed, 22 insertions, 30 deletions
diff --git a/lib/SMT/Makefile b/lib/SMT/Makefile index ae9c2e18..031a6140 100644 --- a/lib/SMT/Makefile +++ b/lib/SMT/Makefile @@ -1,19 +1,12 @@ -MODULE = parser - -LIBRARY=libparser.a +LIBRARY=libsmt.a # Do not optimize the parser code - it compiles forever in some gcc versions EXTRAFLAGS = -O0 -TRANSIENT_CPP = \ - parsePL.cpp lexPL.cpp \ - parseLisp.cpp lexLisp.cpp \ - parsesmtlib.cpp lexsmtlib.cpp +TRANSIENT_CPP = parsesmtlib.cpp lexsmtlib.cpp +TRANSIENT_OBJ = $(TRANSIENT_CPP:.cpp=.o) -TRANSIENT = $(TRANSIENT_CPP) \ - parsePL_defs.h parsePL.output \ - parseLisp_defs.h parseLisp.output \ - parsesmtlib_defs.h parsesmtlib.output +TRANSIENT = $(TRANSIENT_CPP) parsesmtlib_defs.h parsesmtlib.output SRC = $(TRANSIENT_CPP) parser.cpp @@ -21,32 +14,27 @@ HEADERS = parser_temp.h # The actual source files for the parser that we want to include in a # distribution -SRC_ORIG = PL.lex PL.y Lisp.lex Lisp.y smtlib.lex smtlib.y parser.cpp +SRC_ORIG = smtlib.lex smtlib.y parser.cpp -include ../../Makefile.local +#include ../../Makefile.local -################################################## -# Rules for transient files -################################################## -lexPL.cpp: PL.lex parsePL_defs.h - $(LEX) $(LFLAGS) -I -PPL -olexPL.cpp PL.lex +#lex +LEX = flex +LFLAGS = # -i use this for a case-insensitive scanner -parsePL_defs.h: parsePL.cpp +#yacc +YACC = bison +YFLAGS = -d -y -parsePL.cpp: PL.y - $(YACC) $(YFLAGS) -o parsePL.cpp -p PL --debug -v PL.y - @if [ -f parsePL.cpp.h ]; then mv parsePL.cpp.h parsePL.hpp; fi - @mv parsePL.hpp parsePL_defs.h -lexLisp.cpp: Lisp.lex parseLisp_defs.h - $(LEX) $(LFLAGS) -I -PLisp -olexLisp.cpp Lisp.lex +################################################## +# Rules for transient files +################################################## -parseLisp_defs.h: parseLisp.cpp +all: $(TRANSIENT_OBJ) -parseLisp.cpp: Lisp.y - $(YACC) $(YFLAGS) -o parseLisp.cpp -p Lisp --debug -v Lisp.y - @if [ -f parseLisp.cpp.h ]; then mv parseLisp.cpp.h parseLisp.hpp; fi - @mv parseLisp.hpp parseLisp_defs.h +%.o: %.cpp + $(CXX) $(CFLAGS) -c $< -o $@ lexsmtlib.cpp: smtlib.lex parsesmtlib_defs.h $(LEX) $(LFLAGS) -I -Psmtlib -olexsmtlib.cpp smtlib.lex @@ -57,3 +45,7 @@ parsesmtlib.cpp: smtlib.y $(YACC) $(YFLAGS) -o parsesmtlib.cpp -p smtlib --debug -v smtlib.y @if [ -f parsesmtlib.cpp.h ]; then mv parsesmtlib.cpp.h parsesmtlib.hpp; fi @mv parsesmtlib.hpp parsesmtlib_defs.h + +clean: + rm -f $(TRANSIENT) *~ *.o + |