File: Makefile

package info (click to toggle)
cbmc 5.10-5
  • links: PTS
  • area: main
  • in suites: buster
  • size: 73,416 kB
  • sloc: cpp: 264,330; ansic: 38,268; java: 19,025; python: 4,539; yacc: 4,275; makefile: 2,547; lex: 2,394; sh: 932; perl: 525; xml: 289; pascal: 169
file content (224 lines) | stat: -rw-r--r-- 7,631 bytes parent folder | download
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
include ../config.inc

ifneq ($(CHAFF),)
  CHAFF_SRC=sat/satcheck_zchaff.cpp sat/satcheck_zcore.cpp
  CHAFF_INCLUDE=-I $(CHAFF)
  CHAFF_LIB=$(CHAFF)/libsat$(LIBEXT)
endif

ifneq ($(MINISAT),)
  MINISAT_SRC=sat/satcheck_minisat.cpp
  MINISAT_INCLUDE=-I $(MINISAT)
  MINISAT_LIB=$(MINISAT)/Solver$(OBJEXT) $(MINISAT)/Proof$(OBJEXT) $(MINISAT)/File$(OBJEXT)
  CP_CXXFLAGS += -DHAVE_MINISAT
  CLEANFILES += $(MINISAT_LIB) $(patsubst %$(OBJEXT), %.d, $(MINISAT_LIB))
endif

ifneq ($(MINISAT2),)
  MINISAT2_SRC=sat/satcheck_minisat2.cpp
  MINISAT2_INCLUDE=-I $(MINISAT2)
  CP_CXXFLAGS += -DHAVE_MINISAT2 -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
  CLEANFILES += $(MINISAT2_LIB) $(patsubst %$(OBJEXT), %.d, $(MINISAT2_LIB))
endif

ifneq ($(IPASIR),)
  IPASIR_SRC=sat/satcheck_ipasir.cpp
  IPASIR_INCLUDE=-I $(IPASIR)
  IPASIR_LIB=$(IPASIR)/ipasir.a
  CP_CXXFLAGS += -DHAVE_IPASIR -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
  override CXXFLAGS := $(filter-out -pedantic, $(CXXFLAGS))
endif

ifneq ($(GLUCOSE),)
  GLUCOSE_SRC=sat/satcheck_glucose.cpp
  GLUCOSE_INCLUDE=-I $(GLUCOSE)
  GLUCOSE_LIB=$(GLUCOSE)/simp/SimpSolver$(OBJEXT) $(GLUCOSE)/core/Solver$(OBJEXT)
  CP_CXXFLAGS += -DHAVE_GLUCOSE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
  CLEANFILES += $(GLUCOSE_LIB) $(patsubst %$(OBJEXT), %.d, $(GLUCOSE_LIB))
endif

ifneq ($(SQUOLEM2),)
  SQUOLEM2_SRC=qbf/qbf_squolem.cpp qbf/qbf_squolem_core.cpp
  SQUOLEM2_INCLUDE=-I $(SQUOLEM2)
  SQUOLEM2_LIB=-L $(SQUOLEM2) -lsquolem2
endif

ifneq ($(CUDD),)
  CUDD_SRC=qbf/qbf_bdd_core.cpp qbf/qbf_skizzo_core.cpp
  CUDD_INCLUDE=-I $(CUDD)/include
  CUDD_LIB=-L $(CUDD)/cudd -L $(CUDD)/util -L $(CUDD)/mtr \
           -L $(CUDD)/st -L $(CUDD)/obj -L $(CUDD)/dddmp \
           -L $(CUDD)/epd -lobj -lcudd -lmtr -lst -lutil -lepd -ldddmp
endif

ifneq ($(PICOSAT),)
  PICOSAT_SRC=sat/satcheck_picosat.cpp
  PICOSAT_INCLUDE=-I $(PICOSAT)
  PICOSAT_LIB=$(PICOSAT)/libpicosat$(LIBEXT)
  CP_CXXFLAGS += -DHAVE_PICOSAT
endif

ifneq ($(LINGELING),)
  LINGELING_SRC=sat/satcheck_lingeling.cpp
  LINGELING_INCLUDE=-I $(LINGELING)
  LINGELING_LIB=$(LINGELING)/liblgl$(LIBEXT)
  CP_CXXFLAGS += -DHAVE_LINGELING
endif

ifneq ($(CADICAL),)
  CADICAL_SRC=sat/satcheck_cadical.cpp
  CADICAL_INCLUDE=-I $(CADICAL)/src
  CADICAL_LIB=$(CADICAL)/build/libcadical$(LIBEXT)
  CP_CXXFLAGS += -DHAVE_CADICAL
endif

SRC = $(BOOLEFORCE_SRC) \
      $(CHAFF_SRC) \
      $(CUDD_SRC) \
      $(GLUCOSE_SRC) \
      $(LINGELING_SRC) \
      $(MINISAT2_SRC) \
      $(IPASIR_SRC) \
      $(MINISAT_SRC) \
      $(PICOSAT_SRC) \
      $(SQUOLEM2_SRC) \
      $(CADICAL_SRC) \
      flattening/arrays.cpp \
      flattening/boolbv.cpp \
      flattening/boolbv_abs.cpp \
      flattening/boolbv_add_sub.cpp \
      flattening/boolbv_array.cpp \
      flattening/boolbv_array_of.cpp \
      flattening/boolbv_bitwise.cpp \
      flattening/boolbv_bswap.cpp \
      flattening/boolbv_bv_rel.cpp \
      flattening/boolbv_byte_extract.cpp \
      flattening/boolbv_byte_update.cpp \
      flattening/boolbv_case.cpp \
      flattening/boolbv_complex.cpp \
      flattening/boolbv_concatenation.cpp \
      flattening/boolbv_cond.cpp \
      flattening/boolbv_constant.cpp \
      flattening/boolbv_constraint_select_one.cpp \
      flattening/boolbv_div.cpp \
      flattening/boolbv_equality.cpp \
      flattening/boolbv_extractbit.cpp \
      flattening/boolbv_extractbits.cpp \
      flattening/boolbv_floatbv_op.cpp \
      flattening/boolbv_get.cpp \
      flattening/boolbv_ieee_float_rel.cpp \
      flattening/boolbv_if.cpp \
      flattening/boolbv_index.cpp \
      flattening/boolbv_let.cpp \
      flattening/boolbv_map.cpp \
      flattening/boolbv_member.cpp \
      flattening/boolbv_mod.cpp \
      flattening/boolbv_mult.cpp \
      flattening/boolbv_not.cpp \
      flattening/boolbv_onehot.cpp \
      flattening/boolbv_overflow.cpp \
      flattening/boolbv_power.cpp \
      flattening/boolbv_quantifier.cpp \
      flattening/boolbv_reduction.cpp \
      flattening/boolbv_replication.cpp \
      flattening/boolbv_shift.cpp \
      flattening/boolbv_struct.cpp \
      flattening/boolbv_type.cpp \
      flattening/boolbv_typecast.cpp \
      flattening/boolbv_unary_minus.cpp \
      flattening/boolbv_union.cpp \
      flattening/boolbv_update.cpp \
      flattening/boolbv_vector.cpp \
      flattening/boolbv_width.cpp \
      flattening/boolbv_with.cpp \
      flattening/bv_endianness_map.cpp \
      flattening/bv_minimize.cpp \
      flattening/bv_pointers.cpp \
      flattening/bv_utils.cpp \
      flattening/c_bit_field_replacement_type.cpp \
      flattening/equality.cpp \
      flattening/flatten_byte_operators.cpp \
      flattening/functions.cpp \
      flattening/pointer_logic.cpp \
      floatbv/float_bv.cpp \
      floatbv/float_utils.cpp \
      floatbv/float_approximation.cpp \
      lowering/popcount.cpp \
      miniBDD/miniBDD.cpp \
      prop/bdd_expr.cpp \
      prop/cover_goals.cpp \
      prop/literal.cpp \
      prop/minimize.cpp \
      prop/prop.cpp \
      prop/prop_conv.cpp \
      qbf/qbf_quantor.cpp \
      qbf/qbf_qube.cpp \
      qbf/qbf_qube_core.cpp \
      qbf/qbf_skizzo.cpp \
      qbf/qdimacs_cnf.cpp \
      qbf/qdimacs_core.cpp \
      refinement/bv_refinement_loop.cpp \
      refinement/refine_arithmetic.cpp \
      refinement/refine_arrays.cpp \
      refinement/string_builtin_function.cpp \
      refinement/string_refinement.cpp \
      refinement/string_refinement_util.cpp \
      refinement/string_constraint.cpp \
      refinement/string_constraint_generator_code_points.cpp \
      refinement/string_constraint_generator_comparison.cpp \
      refinement/string_constraint_generator_concat.cpp \
      refinement/string_constraint_generator_constants.cpp \
      refinement/string_constraint_generator_indexof.cpp \
      refinement/string_constraint_generator_insert.cpp \
      refinement/string_constraint_generator_float.cpp \
      refinement/string_constraint_generator_format.cpp \
      refinement/string_constraint_generator_main.cpp \
      refinement/string_constraint_generator_testing.cpp \
      refinement/string_constraint_generator_transformation.cpp \
      refinement/string_constraint_generator_valueof.cpp \
      refinement/string_constraint_instantiation.cpp \
      sat/cnf.cpp \
      sat/cnf_clause_list.cpp \
      sat/dimacs_cnf.cpp \
      sat/pbs_dimacs_cnf.cpp \
      sat/resolution_proof.cpp \
      smt2/smt2_conv.cpp \
      smt2/smt2_dec.cpp \
      smt2/smt2_parser.cpp \
      smt2/smt2_tokenizer.cpp \
      smt2/smt2irep.cpp \
      # Empty last line

include ../common

INCLUDES += -I .. \
  $(CHAFF_INCLUDE) $(BOOLEFORCE_INCLUDE) $(MINISAT_INCLUDE) $(MINISAT2_INCLUDE) \
  $(IPASIR_INCLUDE) \
  $(SQUOLEM2_INC) $(CUDD_INCLUDE) $(GLUCOSE_INCLUDE) \
	$(PICOSAT_INCLUDE) $(LINGELING_INCLUDE) $(CADICAL_INCLUDE)

CLEANFILES += solvers$(LIBEXT) \
  smt2_solver$(EXEEXT) smt2/smt2_solver$(OBJEXT) smt2/smt2_solver$(DEPEXT)

all: solvers$(LIBEXT) smt2_solver$(EXEEXT)

ifneq ($(SQUOLEM2),)
  CP_CXXFLAGS += -DHAVE_QBF_CORE
else
ifneq ($(CUDD),)
  CP_CXXFLAGS += -DHAVE_QBF_CORE
endif
endif

SOLVER_LIB = $(CHAFF_LIB) $(BOOLEFORCE_LIB) $(MINISAT_LIB) \
        $(MINISAT2_LIB) $(SQUOLEM2_LIB) $(CUDD_LIB) \
        $(PICOSAT_LIB) $(LINGELING_LIB) $(GLUCOSE_LIB) $(CADICAL_LIB)

###############################################################################

solvers$(LIBEXT): $(OBJ) $(SOLVER_LIB)
	$(LINKLIB) $(LIBSOLVER)

smt2_solver$(EXEEXT): $(OBJ) smt2/smt2_solver$(OBJEXT) \
	../util/util$(LIBEXT) ../langapi/langapi$(LIBEXT) ../big-int/big-int$(LIBEXT) $(SOLVER_LIB)
	$(LINKBIN) $(LIBSOLVER)