diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-09 03:42:41 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-09 03:42:41 +0000 |
commit | 696ba2a432ee1fbaea8bfee3eac823dd0df2147d (patch) | |
tree | 941633a4f57e28667d65b86915db974a1fd4133a /lib/SMT/Makefile | |
parent | a777d5892aa36bc159171ddf61637d54d07c48df (diff) | |
download | klee-696ba2a432ee1fbaea8bfee3eac823dd0df2147d.tar.gz |
Quick hack to build SMT LLVM style.
- I don't want to make proper bison/flex rules, and eventually I think we should just check in the generated files since we don't expect them to change, so for now just build the files in the src directory. Eventually we will want to disable these rules so that it works for people who don't have bison/flex. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73121 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/SMT/Makefile')
-rw-r--r-- | lib/SMT/Makefile | 60 |
1 files changed, 16 insertions, 44 deletions
diff --git a/lib/SMT/Makefile b/lib/SMT/Makefile index 031a6140..5ab2d16f 100644 --- a/lib/SMT/Makefile +++ b/lib/SMT/Makefile @@ -1,51 +1,23 @@ -LIBRARY=libsmt.a +#===-- lib/SMT/Makefile ------------------------------------*- Makefile -*--===# -# Do not optimize the parser code - it compiles forever in some gcc versions -EXTRAFLAGS = -O0 +LEVEL=../.. -TRANSIENT_CPP = parsesmtlib.cpp lexsmtlib.cpp -TRANSIENT_OBJ = $(TRANSIENT_CPP:.cpp=.o) +LIBRARYNAME=kleaverSMT +DONT_BUILD_RELINKED=1 +BUILD_ARCHIVE=1 -TRANSIENT = $(TRANSIENT_CPP) parsesmtlib_defs.h parsesmtlib.output +include $(LEVEL)/Makefile.common -SRC = $(TRANSIENT_CPP) parser.cpp +# Gross, but I don't want to build proper rules for this, and I don't want users +# to have to have bison/flex, so for now require developers to make these +# manually (at least initially). -HEADERS = parser_temp.h +smtlib_parser.cpp smtlib_parser.h: smtlib.y + bison -d -o smtlib_parser.cpp -p smtlib smtlib.y + mv smtlib_parser.hpp smtlib_parser.h -# The actual source files for the parser that we want to include in a -# distribution -SRC_ORIG = smtlib.lex smtlib.y parser.cpp - -#include ../../Makefile.local - -#lex -LEX = flex -LFLAGS = # -i use this for a case-insensitive scanner - -#yacc -YACC = bison -YFLAGS = -d -y - - -################################################## -# Rules for transient files -################################################## - -all: $(TRANSIENT_OBJ) - -%.o: %.cpp - $(CXX) $(CFLAGS) -c $< -o $@ - -lexsmtlib.cpp: smtlib.lex parsesmtlib_defs.h - $(LEX) $(LFLAGS) -I -Psmtlib -olexsmtlib.cpp smtlib.lex - -parsesmtlib_defs.h: parsesmtlib.cpp - -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 +smtlib_lexer.cpp: smtlib.lex smtlib_parser.h + flex -I -Psmtlib -osmtlib_lexer.cpp smtlib.lex +.PHONY: regen +regen: smtlib_lexer.cpp smtlib_parser.cpp smtlib_parser.h |