summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am27
-rw-r--r--src/include/cvc4_config.h50
-rw-r--r--src/main/Makefile.am2
-rw-r--r--src/parser/Makefile.am33
-rw-r--r--src/parser/parser.cpp1
-rw-r--r--src/parser/smt/Makefile.am2
6 files changed, 75 insertions, 40 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 128e47bd5..afbb587a8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,20 @@
+# LIBCVC4_VERSION (-version-info) is in the form current:revision:age
+#
+# current -
+# increment if interfaces have been added, removed or changed
+# revision -
+# increment if source code has changed
+# set to zero if current is incremented
+# age -
+# increment if interfaces have been added
+# set to zero if interfaces have been removed
+# or changed
+#
+# LIBCVC4_RELEASE (-release) should match the CVC4 release version
+#
+LIBCVC4_RELEASE = @CVC4_LIBRARY_RELEASE_CODE@
+LIBCVC4_VERSION = @CVC4_LIBRARY_VERSION@
+
INCLUDES = -I@srcdir@/include -I@srcdir@
AM_CXXFLAGS = -Wall -fvisibility=hidden
AM_CPPFLAGS = -D__BUILDING_CVC4LIB
@@ -6,6 +23,8 @@ SUBDIRS = util expr context prop smt theory . parser main
lib_LTLIBRARIES = libcvc4.la
+libcvc4_la_LDFLAGS = -version-info $(LIBCVC4_VERSION) -release $(LIBCVC4_RELEASE)
+
libcvc4_la_SOURCES =
libcvc4_la_LIBADD = \
@builddir@/util/libutil.la \
@@ -22,10 +41,10 @@ publicheaders = \
include/cvc4_expr.h
install-data-local: $(publicheaders)
- $(mkinstalldirs) $(DESTDIR)$(includedir)/cvc4; \
- @for f in $(publicheaders); do
- echo $(INSTALL_DATA) "$(srcdir)/$$f" "$(DESTDIR)/$(includedir)/cvc4"
- $(INSTALL_DATA) "$(srcdir)/$$f" "$(DESTDIR)/$(includedir)/cvc4"
+ $(mkinstalldirs) $(DESTDIR)$(includedir)/cvc4
+ @for f in $(publicheaders); do \
+ echo $(INSTALL_DATA) "$(srcdir)/$$f" "$(DESTDIR)/$(includedir)/cvc4"; \
+ $(INSTALL_DATA) "$(srcdir)/$$f" "$(DESTDIR)/$(includedir)/cvc4"; \
done
include/cvc4.h: smt/smt_engine.h
diff --git a/src/include/cvc4_config.h b/src/include/cvc4_config.h
index ccc07b40a..95fac9aaa 100644
--- a/src/include/cvc4_config.h
+++ b/src/include/cvc4_config.h
@@ -10,35 +10,27 @@
** [[ Add file-specific comments here ]]
**/
-#ifdef __BUILDING_CVC4LIB
-
-# if defined _WIN32 || defined __CYGWIN__
-# ifdef BUILDING_DLL
-# ifdef __GNUC__
-# define CVC4_PUBLIC __attribute__((dllexport))
-# else /* ! __GNUC__ */
-# define CVC4_PUBLIC __declspec(dllexport)
-# endif /* __GNUC__ */
-# else /* BUILDING_DLL */
-# ifdef __GNUC__
-# define CVC4_PUBLIC __attribute__((dllimport))
-# else /* ! __GNUC__ */
-# define CVC4_PUBLIC __declspec(dllimport)
-# endif /* __GNUC__ */
-# endif /* BUILDING_DLL */
-# else /* !( defined _WIN32 || defined __CYGWIN__ ) */
-# if __GNUC__ >= 4
-# define CVC4_PUBLIC __attribute__ ((visibility("default")))
-# else /* !( __GNUC__ >= 4 ) */
-# define CVC4_PUBLIC
-# endif /* __GNUC__ >= 4 */
-# endif /* defined _WIN32 || defined __CYGWIN__ */
-
-#else /* ! __BUILDING_CVC4LIB */
-
-# define CVC4_PUBLIC
-
-#endif /* __BUILDING_CVC4LIB */
+#if defined _WIN32 || defined __CYGWIN__
+# ifdef BUILDING_DLL
+# ifdef __GNUC__
+# define CVC4_PUBLIC __attribute__((dllexport))
+# else /* ! __GNUC__ */
+# define CVC4_PUBLIC __declspec(dllexport)
+# endif /* __GNUC__ */
+# else /* BUILDING_DLL */
+# ifdef __GNUC__
+# define CVC4_PUBLIC __attribute__((dllimport))
+# else /* ! __GNUC__ */
+# define CVC4_PUBLIC __declspec(dllimport)
+# endif /* __GNUC__ */
+# endif /* BUILDING_DLL */
+#else /* !( defined _WIN32 || defined __CYGWIN__ ) */
+# if __GNUC__ >= 4
+# define CVC4_PUBLIC __attribute__ ((visibility("default")))
+# else /* !( __GNUC__ >= 4 ) */
+# define CVC4_PUBLIC
+# endif /* __GNUC__ >= 4 */
+#endif /* defined _WIN32 || defined __CYGWIN__ */
#define EXPECT_TRUE(x) __builtin_expect( (x), true)
#define EXPECT_FALSE(x) __builtin_expect( (x), false)
diff --git a/src/main/Makefile.am b/src/main/Makefile.am
index 36e4c0342..0992a434a 100644
--- a/src/main/Makefile.am
+++ b/src/main/Makefile.am
@@ -1,6 +1,6 @@
INCLUDES = -I@srcdir@/../include -I@srcdir@/..
AM_CXXFLAGS = -Wall -fvisibility=hidden
-AM_CPPFLAGS = -D__BUILDING_CVC4LIB
+AM_CPPFLAGS =
bin_PROGRAMS = cvc4
diff --git a/src/parser/Makefile.am b/src/parser/Makefile.am
index 7eb52d3e9..7e3cee751 100644
--- a/src/parser/Makefile.am
+++ b/src/parser/Makefile.am
@@ -1,14 +1,37 @@
-INCLUDES = -I@srcdir@/../include -I@srcdir@/.. -I@builddir@/.. $(ANTLR_INCLUDES)
+# LIBCVC4PARSER_VERSION (-version-info) is in the form current:revision:age
+#
+# current -
+# increment if interfaces have been added, removed or changed
+# revision -
+# increment if source code has changed
+# set to zero if current is incremented
+# age -
+# increment if interfaces have been added
+# set to zero if interfaces have been removed
+# or changed
+#
+# LIBCVC4PARSER_RELEASE (-release) should match the CVC4 release version
+#
+LIBCVC4PARSER_RELEASE = @CVC4_LIBRARY_RELEASE_CODE@
+LIBCVC4PARSER_VERSION = @CVC4_PARSER_LIBRARY_VERSION@
+
+INCLUDES = -I@srcdir@/../include -I@srcdir@/.. -I@builddir@/..
AM_CXXFLAGS = -Wall -fvisibility=hidden
-AM_CPPFLAGS = -D__BUILDING_CVC4LIB
+AM_CPPFLAGS = -D__BUILDING_CVC4PARSERLIB
if USE_ANTLR
SUBDIRS = smt
+ INCLUDES += $(ANTLR_INCLUDES)
endif
-nobase_lib_LTLIBRARIES = libcvc4parser.la
+lib_LTLIBRARIES = libcvc4parser.la
+
+libcvc4parser_la_LDFLAGS = -version-info $(LIBCVC4PARSER_VERSION) -release $(LIBCVC4PARSER_RELEASE)
+
+if USE_ANTLR
+ libcvc4parser_la_LDFLAGS += $(ANTLR_LDFLAGS)
+endif
-libcvc4parser_la_LDFLAGS = $(ANTLR_LDFLAGS)
libcvc4parser_la_LIBADD = \
../libcvc4.la
@@ -22,7 +45,7 @@ libcvc4parser_la_SOURCES = \
smtlib.ypp
if USE_ANTLR
-libcvc4parser_la_SOURCES += \
+ libcvc4parser_la_SOURCES += \
antlr_parser.cpp \
antlr_parser.h
endif USE_ANTLR
diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp
index 89276872c..cd03f21f2 100644
--- a/src/parser/parser.cpp
+++ b/src/parser/parser.cpp
@@ -12,6 +12,7 @@
#include <iostream>
+#include "cvc4_config.h"
#include "parser/parser.h"
#include "util/command.h"
#include "util/assert.h"
diff --git a/src/parser/smt/Makefile.am b/src/parser/smt/Makefile.am
index bb2018e2e..acb95849f 100644
--- a/src/parser/smt/Makefile.am
+++ b/src/parser/smt/Makefile.am
@@ -1,6 +1,6 @@
INCLUDES = -I@srcdir@/../include -I@srcdir@/..
AM_CXXFLAGS = -Wall -fvisibility=hidden
-AM_CPPFLAGS = -D__BUILDING_CVC4LIB
+AM_CPPFLAGS = -D__BUILDING_CVC4PARSERLIB
noinst_LTLIBRARIES = libparsersmt.la
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback