.PHONY: default
-default:
+default: all
+%:
@if test -e builds; then \
echo cd builds; \
cd builds; \
- echo $(MAKE); \
- $(MAKE); \
+ echo $(MAKE) $@; \
+ $(MAKE) $@; \
else \
echo; \
echo 'Run configure first, or type "make" in a configured build directory.'; \
include current
.PHONY: default
-default:; cd "$(CURRENT_BUILD)" && $(MAKE)
+default: all
+all:
+ @if (cd $(CURRENT_BUILD) && $(MAKE) $@); then \
+ mkdir -pv bin lib; \
+ echo $(CURRENT_BUILD)/libtool --mode=install install -v $(CURRENT_BUILD)/src/libcvc4.la `pwd`/lib; \
+ $(CURRENT_BUILD)/libtool --mode=install install -v $(CURRENT_BUILD)/src/libcvc4.la `pwd`/lib; \
+ echo $(CURRENT_BUILD)/libtool --mode=install install -v $(CURRENT_BUILD)/src/parser/libcvc4parser.la `pwd`/lib; \
+ $(CURRENT_BUILD)/libtool --mode=install install -v $(CURRENT_BUILD)/src/parser/libcvc4parser.la `pwd`/lib; \
+ echo "libdir=`pwd`/lib; progdir=`pwd`/bin; file=cvc4"; \
+ libdir=`pwd`/lib; progdir=`pwd`/bin; file=cvc4; \
+ echo `grep '^relink_command=' $(CURRENT_BUILD)/src/main/cvc4 | sed 's:-Wl,-rpath:-Wl,-rpath -Wl,\\\\$$libdir -Wl,-rpath:'`; \
+ eval `grep '^relink_command=' $(CURRENT_BUILD)/src/main/cvc4 | sed 's:-Wl,-rpath:-Wl,-rpath -Wl,\\\\$$libdir -Wl,-rpath:'`; \
+ echo "(cd $(CURRENT_BUILD)/src/main && $$relink_command)"; \
+ eval "(cd $(CURRENT_BUILD)/src/main && $$relink_command)"; \
+ else \
+ echo Build failure.; \
+ fi
+
+%:
+ (cd $(CURRENT_BUILD) && $(MAKE) $@)
#!/bin/sh -ex
cd "$(dirname "$0")"
-mkdir -p config
libtoolize --copy
autoheader -I config
touch NEWS README AUTHORS ChangeLog
[
AC_MSG_RESULT(found in $antlr_prefix)
ANTLR_INCLUDES="-I$antlr_prefix/include"
- ANTLR_LDFLAGS="-L$antlr_prefix/lib -lantlr"
+ ANTLR_LDFLAGS="-L$antlr_prefix/lib -lantlr-pic"
break
],
[
# Define the ANTLR include/libs variables
AC_SUBST(ANTLR_INCLUDES)
AC_SUBST(ANTLR_LDFLAGS)
-])
\ No newline at end of file
+])
AC_MSG_RESULT([builds/$target/$build_type])
rm -f config.log config.status confdefs.h
mkdir -p "builds/$target/$build_type"
- test -e builds/Makefile || cp Makefile.builds builds/Makefile
+ test -e builds/Makefile || ln -sf ../Makefile.builds builds/Makefile
echo "CURRENT_BUILD = $target/$build_type" > builds/current
echo
echo cd "builds/$target/$build_type"
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
-
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AM_PROG_LEX
AC_PROG_YACC
# Check for ANTLR runantlr script (defined in config/antlr.m4)
-AC_PROG_ANTLR
+AC_ARG_ENABLE(antlr, AS_HELP_STRING([--enable-antlr],[use Dejan's ANTLR parsers]))
+AC_MSG_CHECKING([whether you want to use the ANTLR parsers])
+if test -z "${enable_antlr+set}"; then
+ enable_antlr=no
+fi
+AC_MSG_RESULT([$enable_antlr])
+AM_CONDITIONAL(USE_ANTLR, test "$enable_antlr" = yes)
+if test "$enable_antlr" = yes; then
+ AC_PROG_ANTLR
+ AC_DEFINE(ANTLR_PARSERS, [], [whether we're using ANTLR parsers])
+fi
AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, [])
if test -z "$DOXYGEN"; then
# Checks for libraries.
AC_CHECK_LIB(gmp, __gmpz_init, , [AC_MSG_ERROR([GNU MP not found, see http://gmplib.org/])])
-# Chcek for antlr C++ runtime (defined in config/antlr.m4)
+# Check for antlr C++ runtime (defined in config/antlr.m4)
AC_LIB_ANTLR
CXXFLAGS : $CXXFLAGS
LDFLAGS : $LDFLAGS
+Using ANTLR parsers: $enable_antlr
+
Now just type make, followed by make check or make install, as you like.
You can use 'make <build_profile>' to reconfig/build a different profile.
libcvc4_la_SOURCES =
libcvc4_la_LIBADD = \
- util/libutil.la \
- expr/libexpr.la \
- context/libcontext.la \
- prop/libprop.la \
- prop/minisat/libminisat.la \
- smt/libsmt.la \
- theory/libtheory.la
+ @builddir@/util/libutil.la \
+ @builddir@/expr/libexpr.la \
+ @builddir@/context/libcontext.la \
+ @builddir@/prop/libprop.la \
+ @builddir@/prop/minisat/libminisat.la \
+ @builddir@/smt/libsmt.la \
+ @builddir@/theory/libtheory.la
publicheaders = \
include/cvc4.h \
--- /dev/null
+/********************* -*- C++ -*- */
+/** context.cpp
+ ** This file is part of the CVC4 prototype.
+ ** Copyright (c) 2009 The Analysis of Computer Systems Group (ACSys)
+ ** Courant Institute of Mathematical Sciences
+ ** New York University
+ ** See the file COPYING in the top-level source directory for licensing
+ ** information.
+ **
+ **/
+
+#include "context/context.h"
+
-INCLUDES = -I@srcdir@/../include -I@srcdir@/.. -I@builddir@ $(ANTLR_INCLUDES)
+INCLUDES = -I@srcdir@/../include -I@srcdir@/.. -I@builddir@/.. $(ANTLR_INCLUDES)
AM_CXXFLAGS = -Wall -fvisibility=hidden
AM_CPPFLAGS = -D__BUILDING_CVC4LIB
-SUBDIRS = smt .
+if USE_ANTLR
+ SUBDIRS = smt
+endif
nobase_lib_LTLIBRARIES = libcvc4parser.la
libcvc4parser_la_LDFLAGS = $(ANTLR_LDFLAGS)
+libcvc4parser_la_LIBADD = \
+ ../libcvc4.la
libcvc4parser_la_SOURCES = \
parser.cpp \
pl_scanner.lpp \
pl.ypp \
smtlib_scanner.lpp \
- smtlib.ypp \
+ smtlib.ypp
+
+if USE_ANTLR
+libcvc4parser_la_SOURCES += \
antlr_parser.cpp \
antlr_parser.h
+endif USE_ANTLR
BUILT_SOURCES = \
pl_scanner.cpp \
-SOURCES = \
+INCLUDES = -I@srcdir@/../include -I@srcdir@/..
+AM_CXXFLAGS = -Wall -fvisibility=hidden
+AM_CPPFLAGS = -D__BUILDING_CVC4LIB
+
+noinst_LTLIBRARIES = libparsersmt.la
+
+libparsersmt_la_SOURCES = \
SmtLexer.g \
- SmtParser.g
+ SmtParser.g \
SmtLexer.hpp \
SmtLexer.cpp \
SmtParser.hpp \
SmtParser.cpp
SmtLexer.cpp SmtLexer.hpp: SmtLexer.g
- $(ANTLR) SmtLexer.g
+ $(ANTLR) @srcdir@/SmtLexer.g
SmtParser.cpp SmtParser.hpp: SmtParser.g
- $(ANTLR) SmtParser.g
+ $(ANTLR) @srcdir@/SmtParser.g