summaryrefslogtreecommitdiff
path: root/src/util/Makefile.am
blob: 7f5fb459ec5477e8d340dbdd3c5008758ff75ae3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
AM_CPPFLAGS = \
	-D__BUILDING_CVC4LIB \
	-I@srcdir@/../include -I@srcdir@/.. -I@builddir@/..
AM_CXXFLAGS = -Wall -Wno-unknown-pragmas $(FLAG_VISIBILITY_HIDDEN)

noinst_LTLIBRARIES = libutil.la libutilcudd.la

# libutilcudd.la is a separate library so that we can pass separate
# compiler flags
libutilcudd_la_CPPFLAGS = $(CPPFLAGS) $(AM_CPPFLAGS) @CUDD_CPPFLAGS@
libutilcudd_la_LIBADD = @CUDD_LDFLAGS@ @CUDD_LIBS@

# Do not list built sources (like integer.h, rational.h, and tls.h) here!
# Rather, list them under BUILT_SOURCES, and their .in versions under
# EXTRA_DIST.  Otherwise, they're packaged up in the tarball, which is
# no good---they belong in the configured builds/ directory.  If they
# end up in the source directory, they build the cvc4 that was
# configured at the time of the "make dist", which (1) may not be the
# configuration that the user wants, and (2) might cause link errors.
libutil_la_SOURCES = \
	Assert.h \
	Assert.cpp \
	backtrackable.h \
	Makefile.am \
	Makefile.in \
	congruence_closure.h \
	debug.h \
	exception.h \
	hash.h \
	bool.h \
	options.h \
	options.cpp \
	output.cpp \
	output.h \
	result.h \
	result.cpp \
	configuration.h \
	configuration_private.h \
	configuration.cpp \
	bitvector.h \
	ascription_type.h \
	datatype.h \
	datatype.cpp \
	matcher.h \
	gmp_util.h \
	sexpr.h \
	stats.h \
	stats.cpp \
	dynamic_array.h \
	language.h \
	language.cpp \
	ntuple.h \
	recursion_breaker.h \
	subrange_bound.h \
	cardinality.h \
	cardinality.cpp \
	cache.h \
	utility.h \
	trans_closure.h \
	trans_closure.cpp \
	boolean_simplification.h \
	boolean_simplification.cpp \
	ite_removal.h \
	ite_removal.cpp \
	pseudoboolean.h \
	pseudoboolean.cpp \
	node_visitor.h

libutil_la_LIBADD = \
	@builddir@/libutilcudd.la
libutilcudd_la_SOURCES = \
	propositional_query.h \
	propositional_query.cpp

BUILT_SOURCES = \
	rational.h \
	integer.h \
	tls.h
if CVC4_DEBUG
# listing Debug_tags too ensures that make doesn't auto-remove it
# after building (if it does, we don't get the "cached" effect with
# the .tmp files below, and we have to re-compile and re-link each
# time, even when there are no changes).
BUILT_SOURCES += \
	Debug_tags.h \
	Debug_tags
endif
if CVC4_TRACING
# listing Trace_tags too ensures that make doesn't auto-remove it
# after building (if it does, we don't get the "cached" effect with
# the .tmp files below, and we have to re-compile and re-link each
# time, even when there are no changes).
BUILT_SOURCES += \
	Trace_tags.h \
	Trace_tags
endif

%_tags.h: %_tags
	$(AM_V_GEN)( \
	echo 'static char const *const $^[] = {'; \
	first=1; \
	for tag in `cat $^`; \
	do \
	    if [ $$first -eq 1 ]; then first=0; else echo ','; fi; \
		echo -n "\"$$tag\""; \
	done; \
	echo; \
	echo '};' \
	) >"$@"

# This .tmp business is to keep from having to re-compile options.cpp
# (and then re-link the libraries) if nothing has changed.
%_tags: %_tags.tmp
	$(AM_V_GEN)\
	diff -q "$^" "$@" &>/dev/null || mv "$^" "$@" || true
# .PHONY ensures the .tmp version is always rebuilt (to check for any changes)
.PHONY: Debug_tags.tmp Trace_tags.tmp
Debug_tags.tmp Trace_tags.tmp:
	$(AM_V_GEN)\
	grep '\<$(@:_tags.tmp=) *( *\".*\" *)' \
		`find @srcdir@/../ -name "*.cpp" -or -name "*.h" -or -name "*.cc" -or -name "*.g"` | \
	sed 's/.*\<$(@:_tags.tmp=) *( *\"\([^"]*\)\".*/\1/g' | sort | uniq >"$@"

if CVC4_CLN_IMP
libutil_la_SOURCES += \
	rational_cln_imp.cpp
endif
if CVC4_GMP_IMP
libutil_la_SOURCES += \
	rational_gmp_imp.cpp
endif

EXTRA_DIST = \
	rational_cln_imp.h \
	integer_cln_imp.h \
	rational_cln_imp.cpp \
	rational_gmp_imp.h \
	integer_gmp_imp.h \
	rational_gmp_imp.cpp \
	rational.h.in \
	integer.h.in \
	tls.h.in
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback