Makefile.in 62.2 KB
Newer Older
1 2 3
####################################################################
#                                                                  #
#  The Why3 Verification Platform   /   The Why3 Development Team  #
4
#  Copyright 2010-2015   --   INRIA - CNRS - Paris-Sud University  #
5 6 7 8 9 10
#                                                                  #
#  This software is distributed under the terms of the GNU Lesser  #
#  General Public License version 2.1, with the special exception  #
#  on linking described in file LICENSE.                           #
#                                                                  #
####################################################################
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
11

12 13 14 15 16 17
VERBOSEMAKE ?= @enable_verbose_make@

ifeq ($(VERBOSEMAKE),yes)
  QUIET =
else
  QUIET = yes
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
18 19
endif

20
# install the binaries
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
21
DESTDIR =
22

23
prefix	    = @prefix@
24 25 26 27 28
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@

BINDIR  = $(DESTDIR)@bindir@
LIBDIR  = $(DESTDIR)@libdir@
29
DATADIR = $(DESTDIR)@datarootdir@
30
MANDIR  = $(DESTDIR)@mandir@
31
TOOLDIR = $(LIBDIR)/why3/commands
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
32

Andrei Paskevich's avatar
Andrei Paskevich committed
33
# OS specific stuff
34
EXE   = @EXE@
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
35 36

# other variables
37
CC        = @CC@
38 39 40 41 42 43 44
OCAMLC    = @OCAMLC@
OCAMLOPT  = @OCAMLOPT@
OCAMLDEP  = @OCAMLDEP@
OCAMLLEX  = @OCAMLLEX@
OCAMLYACC = @OCAMLYACC@
OCAMLDOC  = @OCAMLDOC@
OCAMLLIB  = @OCAMLLIB@
45
OCAMLINSTALLLIB  = $(DESTDIR)@OCAMLINSTALLLIB@
46 47
OCAMLBEST = @OCAMLBEST@
OCAMLVERSION = @OCAMLVERSION@
48 49
COQC      = @COQC@
COQDEP    = @COQDEP@
50 51
COQCAMLP  = @COQCAMLP@
COQCAMLPLIB = @COQCAMLPLIB@
MARCHE Claude's avatar
MARCHE Claude committed
52
FRAMAC_LIBDIR = $(DESTDIR)@FRAMAC_LIBDIR@
53

54 55 56 57 58 59
ifeq (@enable_menhirLib@,yes)
MENHIR	  = @MENHIR@ --table
else
MENHIR	  = @MENHIR@
endif

60
DEPFLAGS  = -slash -I lib/why3
61
ifeq (@OCAMLBEST@,opt)
Andrei Paskevich's avatar
Andrei Paskevich committed
62
DEPFLAGS += -native
63 64
endif

65
RUBBER = @RUBBER@
66
HEVEA = @HEVEA@
67
HACHA = @HACHA@
68
EMACS = @EMACS@
69

70
#PSVIEWER  = @PSVIEWER@
Andrei Paskevich's avatar
Andrei Paskevich committed
71
#PDFVIEWER = @PDFVIEWER@
72

73
INCLUDES = @ZIPINCLUDE@ @MENHIRINCLUDE@
74 75 76
WARNINGS = Aer-41-44-45@5
OFLAGS = -w $(WARNINGS) -dtypes -g -I lib/why3 $(INCLUDES)
BFLAGS = -w $(WARNINGS) -dtypes -g -I lib/why3 $(INCLUDES)
77 78 79

OLINKFLAGS = -linkall $(EXTCMXA)
BLINKFLAGS = -linkall $(EXTCMA)
80

81
ifeq (@enable_profiling@,yes)
82 83 84
OFLAGS += -g -p
endif

85 86 87 88 89
ifeq (@enable_bin_annot@,yes)
OFLAGS += -bin-annot
BFLAGS += -bin-annot
endif

90 91
# external libraries common to all binaries

92
EXTOBJS = @MENHIRLIB@
93
EXTLIBS = str unix nums dynlink @ZIPLIB@
94 95 96

EXTCMA	= $(addsuffix .cma,$(EXTLIBS)) $(addsuffix .cmo,$(EXTOBJS))
EXTCMXA = $(addsuffix .cmxa,$(EXTLIBS)) $(addsuffix .cmx,$(EXTOBJS))
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
97

98
INSTALLED_LIB_EXTS = a cma cmx cmi cmxa cmxs
99
COMPILED_LIB_EXTS = $(INSTALLED_LIB_EXTS) o cmo cmt cmti annot dep conflicts
100

101 102
TARGET_EMACS = share/emacs/why3.elc

Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
103 104 105
###############
# main target
###############
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
106

107 108 109 110
all: @OCAMLBEST@
plugins: plugins.@OCAMLBEST@
opt: plugins.opt
byte: plugins.byte
Francois Bobot's avatar
Francois Bobot committed
111

112 113 114 115 116
ifeq (@enable_local@,yes)
all: install_local
endif

.PHONY: byte opt clean depend all install install_local install_no_local
117
.PHONY: plugins plugins.byte plugins.opt
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
118

119 120 121 122
CLEANDIRS =
CLEANLIBS =
GENERATED =

123 124 125
##############
# Why3 library
##############
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
126

127
LIBGENERATED = src/util/config.ml \
128
	       src/util/rc.ml src/util/lexlib.ml src/parser/lexer.ml \
129 130
	       src/parser/parser.mli src/parser/parser.ml \
	       src/driver/driver_parser.mli src/driver/driver_parser.ml \
131
	       src/driver/driver_lexer.ml \
132 133
               src/driver/parse_smtv2_model_parser.mli src/driver/parse_smtv2_model_parser.ml \
               src/driver/parse_smtv2_model_lexer.ml \
134
	       src/session/compress.ml src/session/xml.ml \
135
	       src/session/strategy_parser.ml \
136
	       lib/ocaml/why3__BigInt_compat.ml
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
137

138 139
LIB_UTIL = config bigInt util opt lists strings \
	   extmap extset exthtbl weakhtbl \
140
	   hashcons stdlib exn_printer pp json debug loc lexlib print_tree \
141
	   cmdline warning sysutil rc plugin bigInt number pqueue
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
142

143
LIB_CORE = ident ty term pattern decl theory \
144
	   task pretty dterm env trans printer model_parser
145

146
LIB_DRIVER = call_provers driver_ast driver_parser driver_lexer driver \
147
	     whyconf autodetection \
148
             parse_smtv2_model_parser parse_smtv2_model_lexer parse_smtv2_model
149

150
LIB_MLW = ity expr dexpr pdecl vc pmodule
151

152
LIB_PARSER = ptree glob typing parser lexer
153

154
LIB_TRANSFORM = simplify_formula inlining split_goal induction \
155
		detect_polymorphism \
156
		eliminate_definition eliminate_algebraic \
157
		eliminate_inductive eliminate_let eliminate_if \
158 159 160 161
		libencoding discriminate encoding encoding_select \
		encoding_guards_full encoding_tags_full \
		encoding_guards encoding_tags encoding_twin \
		encoding_sort simplify_array filter_trigger \
162
		introduction abstraction close_epsilon lift_epsilon \
163
		eliminate_epsilon intro_projections_counterexmp \
164
		prepare_for_counterexmp \
MARCHE Claude's avatar
MARCHE Claude committed
165
		eval_match instantiate_predicate smoke_detector \
166
		reduction_engine compute induction_pr prop_curry
167

168
LIB_PRINTER = alt_ergo why3printer smtv1 smtv2 coq pvs isabelle \
169
	      simplify gappa cvc3 yices mathematica
170

171 172 173
LIB_SESSION = compress xml termcode session session_tools strategy \
              strategy_parser session_scheduler

174
LIBMODULES =  $(addprefix src/util/, $(LIB_UTIL)) \
175 176
	      $(addprefix src/core/, $(LIB_CORE)) \
	      $(addprefix src/driver/, $(LIB_DRIVER)) \
177
	      $(addprefix src/mlw/, $(LIB_MLW)) \
178
	      $(addprefix src/parser/, $(LIB_PARSER)) \
179
	      $(addprefix src/transform/, $(LIB_TRANSFORM)) \
François Bobot's avatar
François Bobot committed
180
	      $(addprefix src/printer/, $(LIB_PRINTER)) \
181
	      $(addprefix src/session/, $(LIB_SESSION))
182

183
LIBDIRS = util core driver mlw parser transform printer session
184
LIBINCLUDES = $(addprefix -I src/, $(LIBDIRS))
MARCHE Claude's avatar
MARCHE Claude committed
185

Andrei Paskevich's avatar
Andrei Paskevich committed
186
LIBDEP = $(addsuffix .dep, $(LIBMODULES))
187 188
LIBCMO = $(addsuffix .cmo, $(LIBMODULES))
LIBCMX = $(addsuffix .cmx, $(LIBMODULES))
189

Andrei Paskevich's avatar
Andrei Paskevich committed
190
$(LIBDEP): DEPFLAGS += $(LIBINCLUDES)
191
$(LIBCMO) $(LIBCMX): INCLUDES += $(LIBINCLUDES)
192
$(LIBCMX): OFLAGS += -for-pack Why3
193

194 195
$(LIBDEP): $(LIBGENERATED)

196 197 198
# Zarith

ifeq (@enable_zarith@,yes)
199
lib/ocaml/why3__BigInt_compat.ml: config.status lib/ocaml/why3__BigInt_zarith.ml
200
	cp lib/ocaml/why3__BigInt_zarith.ml $@
201
else
202
lib/ocaml/why3__BigInt_compat.ml: config.status lib/ocaml/why3__BigInt_num.ml
203
	cp lib/ocaml/why3__BigInt_num.ml $@
204 205
endif

206 207 208 209 210 211 212 213 214 215
# Ocamlzip

ifeq (@enable_zip@,yes)
src/session/compress.ml: config.status src/session/compress_z.ml
	cp src/session/compress_z.ml $@
else
src/session/compress.ml: config.status src/session/compress_none.ml
	cp src/session/compress_none.ml $@
endif

216 217 218 219 220
# hide deprecated warnings for strings

src/util/strings.cmo:: WARNINGS:=$(WARNINGS)-3
src/util/strings.cmx:: WARNINGS:=$(WARNINGS)-3

221
# build targets
222

223 224
byte: lib/why3/why3.cma
opt:  lib/why3/why3.cmxa
225

226
lib/why3/why3.cma: lib/why3/why3.cmo
Andrei Paskevich's avatar
Andrei Paskevich committed
227 228
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) -a $(BFLAGS) -o $@ $^
229

230
lib/why3/why3.cmxa: lib/why3/why3.cmx
Andrei Paskevich's avatar
Andrei Paskevich committed
231 232
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLOPT) -a $(OFLAGS) -o $@ $^
233

234
lib/why3/why3.cmo: $(LIBCMO)
Andrei Paskevich's avatar
Andrei Paskevich committed
235 236
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) $(BFLAGS) -pack -o $@ $^
237

238
lib/why3/why3.cmx: $(LIBCMX)
Andrei Paskevich's avatar
Andrei Paskevich committed
239 240
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLOPT) $(OFLAGS) -pack -o $@ $^
241

Andrei Paskevich's avatar
Andrei Paskevich committed
242
# clean and depend
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
243

244
ifneq "$(MAKECMDGOALS:clean%=clean)" "clean"
245
include $(LIBDEP)
Andrei Paskevich's avatar
Andrei Paskevich committed
246
endif
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
247

248
depend: $(LIBDEP)
249

250 251 252
CLEANDIRS += src $(addprefix src/, $(LIBDIRS))
CLEANLIBS += lib/why3/why3session lib/why3/why3
GENERATED += $(LIBGENERATED)
253

254 255 256
###############
# installation
###############
257

Kate's avatar
Kate committed
258 259
clean_old_install::
	rm -rf $(LIBDIR)/why3
MARCHE Claude's avatar
MARCHE Claude committed
260
	rm -rf $(DATADIR)/why3
261
	rm -rf $(OCAMLINSTALLLIB)/why3
MARCHE Claude's avatar
MARCHE Claude committed
262

263

264
ifeq ($(EMACS),no)
265
install_no_local:: clean_old_install
266 267 268
else
install_no_local:: clean_old_install $(TARGET_EMACS)
endif
269
	mkdir -p $(BINDIR)
Kate's avatar
Kate committed
270
	mkdir -p $(LIBDIR)/why3
271
	mkdir -p $(TOOLDIR)
272
	mkdir -p $(DATADIR)/why3
273
	mkdir -p $(DATADIR)/why3/images
274 275
	mkdir -p $(DATADIR)/why3/images/boomy
	mkdir -p $(DATADIR)/why3/images/fatcow
276
	mkdir -p $(DATADIR)/why3/vim
277
	mkdir -p $(DATADIR)/why3/lang
MARCHE Claude's avatar
MARCHE Claude committed
278
	mkdir -p $(DATADIR)/why3/theories
279
	mkdir -p $(DATADIR)/why3/modules/mach
MARCHE Claude's avatar
MARCHE Claude committed
280
	mkdir -p $(DATADIR)/why3/drivers
281
	mkdir -p $(DATADIR)/emacs/site-lisp/
MARCHE Claude's avatar
MARCHE Claude committed
282
	cp -f theories/*.why $(DATADIR)/why3/theories
283
	cp -f modules/*.mlw $(DATADIR)/why3/modules
284
	cp -f modules/mach/*.mlw $(DATADIR)/why3/modules/mach
285
	cp -f drivers/*.drv drivers/*.gen $(DATADIR)/why3/drivers
MARCHE Claude's avatar
MARCHE Claude committed
286
	cp -f LICENSE $(DATADIR)/why3/
287
	cp -f share/provers-detection-data.conf $(DATADIR)/why3/
288
	cp -f share/images/icons.rc $(DATADIR)/why3/images
289
	cp -f share/images/*.png $(DATADIR)/why3/images
MARCHE Claude's avatar
MARCHE Claude committed
290 291
	cp -f share/images/boomy/* $(DATADIR)/why3/images/boomy
	cp -f share/images/fatcow/* $(DATADIR)/why3/images/fatcow
292
	cp -f share/why3session.dtd $(DATADIR)/why3
293
	cp -f share/Makefile.config $(DATADIR)/why3
294
	cp -rf share/javascript $(DATADIR)/why3/javascript
295 296
	cp -f share/vim/why3.vim $(DATADIR)/why3/vim/why3.vim
	cp -f share/lang/why3.lang $(DATADIR)/why3/lang/why3.lang
297

MARCHE Claude's avatar
MARCHE Claude committed
298
install_no_local_lib::
299
	mkdir -p $(OCAMLINSTALLLIB)/why3
300
	cp -f $(wildcard $(addprefix lib/why3/why3., $(INSTALLED_LIB_EXTS))) \
301
		lib/why3/META $(OCAMLINSTALLLIB)/why3
MARCHE Claude's avatar
MARCHE Claude committed
302

303 304
ifeq (@enable_local@,yes)
install install-lib:
305 306
	@echo "Why3 is configured in local installation mode."
	@echo "To install Why3, run ./configure --disable-local ; make ; make install"
307
else
MARCHE Claude's avatar
MARCHE Claude committed
308
install: clean_old_install install_no_local
MARCHE Claude's avatar
MARCHE Claude committed
309
install-lib: install_no_local_lib
310 311
endif

MARCHE Claude's avatar
MARCHE Claude committed
312 313
install-all: install install-lib

Kate's avatar
Kate committed
314 315 316 317 318 319
##################
# Uninstallation
##################

uninstall: clean_old_install

320 321 322 323 324 325 326
##################
# Why3 emacs mode
##################

%.elc: %.el
	$(EMACS) --batch --no-init-file -f batch-byte-compile $<

Kate's avatar
Kate committed
327 328 329 330 331 332 333 334 335 336 337 338 339
clean_old_install::
	rm -f $(DATADIR)/emacs/site-lisp/why3.el
ifneq ($(EMACS),no)
	rm -f $(DATADIR)/emacs/site-lisp/why3.elc
endif

install_no_local::
	cp -f share/emacs/why3.el $(DATADIR)/emacs/site-lisp/why3.el
ifneq ($(EMACS),no)
	cp -f share/emacs/why3.elc $(DATADIR)/emacs/site-lisp/why3.elc
endif


340
##################
341
# Why3 plugins
342 343
##################

Andrei Paskevich's avatar
Andrei Paskevich committed
344
PLUGGENERATED = plugins/tptp/tptp_lexer.ml \
345 346
		plugins/tptp/tptp_parser.ml plugins/tptp/tptp_parser.mli \
		plugins/parser/dimacs.ml \
347

348
PLUG_PARSER = genequlin dimacs
349
PLUG_PRINTER =
350
PLUG_TRANSFORM =
351
PLUG_TPTP = tptp_ast tptp_parser tptp_typing tptp_lexer tptp_printer
352

353
PLUGINS = genequlin dimacs tptp
354

355
TPTPMODULES = $(addprefix plugins/tptp/, $(PLUG_TPTP))
Andrei Paskevich's avatar
Andrei Paskevich committed
356

357 358
TPTPCMO = $(addsuffix .cmo, $(TPTPMODULES))
TPTPCMX = $(addsuffix .cmx, $(TPTPMODULES))
359

360 361 362 363 364 365 366 367 368 369
ifeq (@enable_hypothesis_selection@,yes)
PLUG_TRANSFORM += hypothesis_selection
PLUGINS += hypothesis_selection

lib/plugins/hypothesis_selection.cmxs: INCLUDES += -I @OCAMLGRAPHLIB@
lib/plugins/hypothesis_selection.cmo:  INCLUDES += -I @OCAMLGRAPHLIB@
lib/plugins/hypothesis_selection.cmxs: OFLAGS += graph.cmxa
lib/plugins/hypothesis_selection.cmo:  BFLAGS += graph.cmo
endif

370 371
PLUGMODULES = $(addprefix plugins/parser/, $(PLUG_PARSER)) \
	      $(addprefix plugins/printer/, $(PLUG_PRINTER)) \
Andrei Paskevich's avatar
Andrei Paskevich committed
372
	      $(addprefix plugins/transform/, $(PLUG_TRANSFORM)) \
373
	      $(TPTPMODULES)
374

Andrei Paskevich's avatar
Andrei Paskevich committed
375
PLUGDEP = $(addsuffix .dep, $(PLUGMODULES))
376 377 378
PLUGCMO = $(addsuffix .cmo, $(PLUGMODULES))
PLUGCMX = $(addsuffix .cmx, $(PLUGMODULES))

Andrei Paskevich's avatar
Andrei Paskevich committed
379
PLUGDIRS = parser printer transform tptp
380 381
PLUGINCLUDES = $(addprefix -I plugins/, $(PLUGDIRS))

Andrei Paskevich's avatar
Andrei Paskevich committed
382
$(PLUGDEP): DEPFLAGS += $(PLUGINCLUDES)
383 384
$(PLUGCMO) $(PLUGCMX): INCLUDES += $(PLUGINCLUDES)

385 386
$(PLUGDEP): $(PLUGGENERATED)

387 388 389 390 391
LIBPLUGCMO =  $(addsuffix .cmo,  $(addprefix lib/plugins/, $(PLUGINS)))
LIBPLUGCMXS = $(addsuffix .cmxs, $(addprefix lib/plugins/, $(PLUGINS)))

plugins.byte: $(LIBPLUGCMO)
plugins.opt : $(LIBPLUGCMXS)
392 393

lib/plugins/%.cmxs: plugins/parser/%.cmx
Andrei Paskevich's avatar
Andrei Paskevich committed
394
	$(if $(QUIET),@echo 'Linking  $@' &&) \
395 396 397 398 399 400 401
	    $(OCAMLOPT) $(OFLAGS) -shared -o $@ $<

lib/plugins/%.cmo: plugins/parser/%.cmo
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) $(BFLAGS) -pack -o $@ $<

lib/plugins/%.cmxs: plugins/printer/%.cmx
Andrei Paskevich's avatar
Andrei Paskevich committed
402
	$(if $(QUIET),@echo 'Linking  $@' &&) \
403 404 405 406 407 408 409
	    $(OCAMLOPT) $(OFLAGS) -shared -o $@ $<

lib/plugins/%.cmo: plugins/printer/%.cmo
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) $(BFLAGS) -pack -o $@ $<

lib/plugins/%.cmxs: plugins/transform/%.cmx
Andrei Paskevich's avatar
Andrei Paskevich committed
410
	$(if $(QUIET),@echo 'Linking  $@' &&) \
411 412 413 414 415 416
	    $(OCAMLOPT) $(OFLAGS) -shared -o $@ $<

lib/plugins/%.cmo: plugins/transform/%.cmo
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) $(BFLAGS) -pack -o $@ $<

417
lib/plugins/tptp.cmxs: $(TPTPCMX)
Andrei Paskevich's avatar
Andrei Paskevich committed
418
	$(if $(QUIET),@echo 'Linking  $@' &&) \
419
	    $(OCAMLOPT) $(OFLAGS) -shared -o $@ $^
420

421
lib/plugins/tptp.cmo: $(TPTPCMO)
Andrei Paskevich's avatar
Andrei Paskevich committed
422
	$(if $(QUIET),@echo 'Linking  $@' &&) \
423
	    $(OCAMLC) $(BFLAGS) -pack -o $@ $^
424

Andrei Paskevich's avatar
Andrei Paskevich committed
425 426
# depend and clean targets

427
ifneq "$(MAKECMDGOALS:clean%=clean)" "clean"
Andrei Paskevich's avatar
Andrei Paskevich committed
428 429 430
include $(PLUGDEP)
endif

431
depend: $(PLUGDEP)
Andrei Paskevich's avatar
Andrei Paskevich committed
432

433 434
CLEANDIRS += plugins $(addprefix plugins/, $(PLUGDIRS)) lib/plugins
GENERATED += $(PLUGGENERATED)
435 436 437

install_no_local::
	mkdir -p $(LIBDIR)/why3/plugins
438
	cp -f $(wildcard $(LIBPLUGCMO) $(LIBPLUGCMXS)) $(LIBDIR)/why3/plugins
439

440 441 442 443
###############
# Why3 commands
###############

444 445
TOOLSGENERATED = src/tools/why3wc.ml

446 447 448 449
# TODO
#TOOLS_BIN = why3config why3execute why3extract why3prove \
#	    why3realize why3replay why3wc
TOOLS_BIN = why3config why3prove \
450 451
	    why3realize why3replay why3wc

Andrei Paskevich's avatar
Andrei Paskevich committed
452
TOOLS_FILES = main $(TOOLS_BIN)
453 454 455 456 457 458 459 460 461 462

TOOLSMODULES = $(addprefix src/tools/, $(TOOLS_FILES))

TOOLSDEP = $(addsuffix .dep, $(TOOLSMODULES))
TOOLSCMO = $(addsuffix .cmo, $(TOOLSMODULES))
TOOLSCMX = $(addsuffix .cmx, $(TOOLSMODULES))

$(TOOLSDEP): DEPFLAGS += -I src/tools
$(TOOLSCMO) $(TOOLSCMX): INCLUDES += -I src/tools

463 464
$(TOOLSDEP): $(TOOLSGENERATED)

465 466 467
byte: bin/why3.byte $(TOOLS_BIN:%=bin/%.byte)
opt:  bin/why3.opt  $(TOOLS_BIN:%=bin/%.opt)

Andrei Paskevich's avatar
Andrei Paskevich committed
468
bin/why3.opt: lib/why3/why3.cmxa src/tools/main.cmx
469 470 471
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^

Andrei Paskevich's avatar
Andrei Paskevich committed
472
bin/why3.byte: lib/why3/why3.cma src/tools/main.cmo
473 474
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) $^
475

476 477 478 479 480 481 482 483
bin/why3config.opt: lib/why3/why3.cmxa src/tools/why3config.cmx
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^

bin/why3config.byte: lib/why3/why3.cma src/tools/why3config.cmo
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) $^

Andrei Paskevich's avatar
Andrei Paskevich committed
484
bin/why3execute.opt: lib/why3/why3.cmxa src/tools/why3execute.cmx
485 486 487
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^

Andrei Paskevich's avatar
Andrei Paskevich committed
488
bin/why3execute.byte: lib/why3/why3.cma src/tools/why3execute.cmo
489 490 491
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) $^

Andrei Paskevich's avatar
Andrei Paskevich committed
492
bin/why3extract.opt: lib/why3/why3.cmxa src/tools/why3extract.cmx
493 494 495
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^

Andrei Paskevich's avatar
Andrei Paskevich committed
496
bin/why3extract.byte: lib/why3/why3.cma src/tools/why3extract.cmo
497 498 499
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) $^

Andrei Paskevich's avatar
Andrei Paskevich committed
500
bin/why3prove.opt: lib/why3/why3.cmxa src/tools/why3prove.cmx
501 502 503
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^

Andrei Paskevich's avatar
Andrei Paskevich committed
504
bin/why3prove.byte: lib/why3/why3.cma src/tools/why3prove.cmo
505 506 507
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) $^

Andrei Paskevich's avatar
Andrei Paskevich committed
508
bin/why3realize.opt: lib/why3/why3.cmxa src/tools/why3realize.cmx
509 510 511
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^

Andrei Paskevich's avatar
Andrei Paskevich committed
512
bin/why3realize.byte: lib/why3/why3.cma src/tools/why3realize.cmo
513 514 515
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) $^

516
bin/why3replay.opt: lib/why3/why3.cmxa src/tools/why3replay.cmx
517 518 519
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^

520
bin/why3replay.byte: lib/why3/why3.cma src/tools/why3replay.cmo
521 522 523
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) $^

524 525 526 527 528 529 530 531
bin/why3wc.opt: src/tools/why3wc.cmx
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^

bin/why3wc.byte: src/tools/why3wc.cmo
	$(if $(QUIET),@echo 'Linking  $@' &&) \
	    $(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) $^

Kate's avatar
Kate committed
532
clean_old_install::
533
	rm -f $(TOOLS_BIN:%=$(TOOLDIR)/%$(EXE)) $(BINDIR)/why3$(EXE)
534
	rm -f $(BINDIR)/why3bench$(EXE) $(BINDIR)/why3replayer$(EXE)
Kate's avatar
Kate committed
535

536
install_no_local::
537
	cp -f bin/why3.@OCAMLBEST@ $(BINDIR)/why3$(EXE)
538
	cp -f bin/why3config.@OCAMLBEST@  $(TOOLDIR)/why3config$(EXE)
539 540 541
	cp -f bin/why3execute.@OCAMLBEST@ $(TOOLDIR)/why3execute$(EXE)
	cp -f bin/why3extract.@OCAMLBEST@ $(TOOLDIR)/why3extract$(EXE)
	cp -f bin/why3prove.@OCAMLBEST@   $(TOOLDIR)/why3prove$(EXE)
542
	cp -f bin/why3realize.@OCAMLBEST@ $(TOOLDIR)/why3realize$(EXE)
543
	cp -f bin/why3replay.@OCAMLBEST@  $(TOOLDIR)/why3replay$(EXE)
544
	cp -f bin/why3wc.@OCAMLBEST@      $(TOOLDIR)/why3wc$(EXE)
545 546

install_local:: bin/why3 $(addprefix bin/,$(TOOLS_BIN))
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
547

548
bin/%:	bin/%.@OCAMLBEST@
549
	ln -sf $(notdir $<) $@
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
550

551 552 553 554 555 556 557 558 559 560 561
install_local:: share/drivers share/modules share/theories

share/drivers:
	ln -snf ../drivers share/drivers

share/modules:
	ln -snf ../modules share/modules

share/theories:
	ln -snf ../theories share/theories

562
ifneq "$(MAKECMDGOALS:clean%=clean)" "clean"
563
include $(TOOLSDEP)
564 565
endif

566
depend: $(TOOLSDEP)
567

568 569 570
CLEANDIRS += src/tools
GENERATED += $(TOOLSGENERATED)

Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
571
clean::
572
	rm -f bin/why3*
Jean-Christophe Filliâtre's avatar
Jean-Christophe Filliâtre committed
573

574 575 576
##############
# test targets
##############
577

578 579
%.gui: %.why bin/why3ide.opt
	bin/why3ide.opt $*.why
580

581 582
%: %.mlw bin/why3.opt
	bin/why3.opt $*.mlw
583

584 585
%: %.why bin/why3.opt
	bin/why3.opt $*.why
François Bobot's avatar
François Bobot committed
586

587 588
%.gui: %.mlw bin/why3ide.opt
	bin/why3ide.opt $*.mlw
589

590
%.type: %.mlw bin/why3ide.opt
591
	bin/why3.opt --type-only $*.mlw
592

593 594 595 596
##########
# gallery
##########

597
# we export exactly the programs that have a why3session.xml file
598 599 600

.PHONY: gallery

601 602
gallery::
	@if test "$(GALLERYDIR)" = ""; then echo "set GALLERYDIR first"; exit 1; fi
Andrei Paskevich's avatar
Andrei Paskevich committed
603
	@for x in examples/*/why3session.xml ; do \
604 605
	  d=`dirname $$x`; \
	  f=`basename $$d`; \
606
	  why3 session html $$x; \
607 608
	  echo "exporting $$f"; \
	  mkdir -p $(GALLERYDIR)/$$f; \
609
	  cp examples/$$f.mlw examples/$$f/why3session.html $(GALLERYDIR)/$$f/; \
610
	  rm -f $(GALLERYDIR)/$$f/$$f.zip; \
Andrei Paskevich's avatar
Andrei Paskevich committed
611
	  cd examples/; \
612
	  zip -r $(GALLERYDIR)/$$f/$$f.zip $$f.mlw $$f; \
613
	  cd ..; \
614
	done
615

616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631
.PHONY: gallery-subs

GALLERYSUBS=avl

gallery-subs::
	@for d in $(GALLERYSUBS) ; do \
	  echo "exporting examples/$$d"; \
	  rm -f $(GALLERYDIR)/$$d/$$d.zip; \
	  cd examples/$$d; \
	  why3 -L . doc --stdlib-url http://why3.lri.fr/stdlib/ *.mlw -o $(GALLERYDIR)/$$d; \
	  cd ..; \
	  zip -r $(GALLERYDIR)/$$d/$$d.zip $$d; \
	  cd ..; \
	done


632 633 634 635 636
%-gallery::
	@if test "$(GALLERYDIR)" = ""; then echo "set GALLERYDIR first"; exit 1; fi
	x=$*/why3session.xml; \
	d=`dirname $$x`; \
	f=`basename $$d`; \
637
	why3 session html $$x; \
638 639
	echo "exporting $$f"; \
	mkdir -p $(GALLERYDIR)/$$f; \
640 641
	if test -f examples/$$f.mlw; then cp examples/$$f.mlw $(GALLERYDIR)/$$f/; fi; \
	if test -f examples/$$f.why; then cp examples/$$f.why $(GALLERYDIR)/$$f/; fi; \
642
	cp examples/$$f/why3session.html $(GALLERYDIR)/$$f/; \
643 644
	rm -f $(GALLERYDIR)/$$f/$$f.zip; \
	cd examples/; \
645
	zip -r $(GALLERYDIR)/$$f/$$f.zip $$f.mlw $$f
646

MARCHE Claude's avatar
MARCHE Claude committed
647 648 649 650 651 652 653 654
########
# XML DTD validation
########

.PHONY: xml-validate

xml-validate:
	@for x in `find examples/ -name why3session.xml`; do \
MARCHE Claude's avatar
MARCHE Claude committed
655
	  xmllint --noout --valid $$x 2>&1 | head -1; \
MARCHE Claude's avatar
MARCHE Claude committed
656 657
	done

658 659 660 661 662
xml-validate-local:
	@for x in `find examples/ -name why3session.xml`; do \
	  xmllint --noout --dtdvalid share/why3session.dtd $$x 2>&1 | head -1; \
	done

MARCHE Claude's avatar
MARCHE Claude committed
663 664 665 666
###############
# IDE
###############

667 668
ifeq (@enable_ide@,yes)

François Bobot's avatar
François Bobot committed
669
IDE_FILES = gconfig gmain
MARCHE Claude's avatar
MARCHE Claude committed
670 671 672

IDEMODULES = $(addprefix src/ide/, $(IDE_FILES))

Andrei Paskevich's avatar
Andrei Paskevich committed
673
IDEDEP = $(addsuffix .dep, $(IDEMODULES))
MARCHE Claude's avatar
MARCHE Claude committed
674 675 676
IDECMO = $(addsuffix .cmo, $(IDEMODULES))
IDECMX = $(addsuffix .cmx, $(IDEMODULES))

Andrei Paskevich's avatar
Andrei Paskevich committed
677
$(IDEDEP): DEPFLAGS += -I src/ide
678
$(IDECMO) $(IDECMX): INCLUDES += -I src/ide
MARCHE Claude's avatar
MARCHE Claude committed
679

680
# build targets
MARCHE Claude's avatar
MARCHE Claude committed
681

682 683
byte: bin/why3ide.byte
opt:  bin/why3ide.opt
MARCHE Claude's avatar
MARCHE Claude committed
684

685
bin/why3ide.opt bin/why3ide.byte: INCLUDES += -I @LABLGTK2LIB@
686
bin/why3ide.opt bin/why3ide.byte: EXTLIBS += lablgtk lablgtksourceview2
MARCHE Claude's avatar
MARCHE Claude committed
687

688
bin/why3ide.opt: lib/why3/why3.cmxa src/ide/resetgc.o $(IDECMX)
Andrei Paskevich's avatar
Andrei Paskevich committed
689
	$(if $(QUIET),@echo 'Linking  $@' &&) \
690
	    $(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^
MARCHE Claude's avatar
MARCHE Claude committed
691

692
bin/why3ide.byte: lib/why3/why3.cma src/ide/resetgc.o $(IDECMO)
MARCHE Claude's avatar
MARCHE Claude committed
693
	$(if $(QUIET),@echo 'Linking  $@' &&) \
694
	    $(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) -custom $^
MARCHE Claude's avatar
MARCHE Claude committed
695

696
src/ide/resetgc.o: src/ide/resetgc.c
697 698
	$(if $(QUIET),@echo 'Ocamlc   $<' &&) \
	    $(OCAMLC) -c -ccopt "-Wall -o $@" $<
699

MARCHE Claude's avatar
MARCHE Claude committed
700 701
# depend and clean targets

702
ifneq "$(MAKECMDGOALS:clean%=clean)" "clean"
Andrei Paskevich's avatar
Andrei Paskevich committed
703 704
include $(IDEDEP)
endif
MARCHE Claude's avatar
MARCHE Claude committed
705

Andrei Paskevich's avatar
Andrei Paskevich committed
706
depend: $(IDEDEP)
MARCHE Claude's avatar
MARCHE Claude committed
707

708
CLEANDIRS += src/ide
MARCHE Claude's avatar
MARCHE Claude committed
709

Kate's avatar
Kate committed
710 711 712
clean_old_install::
	rm -f $(BINDIR)/why3ide$(EXE)

713
install_no_local::
714
	cp -f bin/why3ide.@OCAMLBEST@ $(TOOLDIR)/why3ide$(EXE)
715

716
install_local:: bin/why3ide
717

718
endif
MARCHE Claude's avatar
d  
MARCHE Claude committed
719

720 721 722 723
###############
# Session
###############

724 725 726
SESSION_FILES = why3session_lib why3session_copy why3session_info \
		why3session_latex why3session_html why3session_rm \
		why3session_output why3session_run why3session_csv \
727
		why3session_main
728 729 730

SESSIONMODULES = $(addprefix src/why3session/, $(SESSION_FILES))

Andrei Paskevich's avatar
Andrei Paskevich committed
731
SESSIONDEP = $(addsuffix .dep, $(SESSIONMODULES))
732 733 734
SESSIONCMO = $(addsuffix .cmo, $(SESSIONMODULES))
SESSIONCMX = $(addsuffix .cmx, $(SESSIONMODULES))

Andrei Paskevich's avatar
Andrei Paskevich committed
735
$(SESSIONDEP): DEPFLAGS += -I src/why3session
736 737 738 739 740 741 742
$(SESSIONCMO) $(SESSIONCMX): INCLUDES += -I src/why3session

# build targets

byte: bin/why3session.byte
opt:  bin/why3session.opt

743
bin/why3session.opt: lib/why3/why3.cmxa $(SESSIONCMX)
Andrei Paskevich's avatar
Andrei Paskevich committed
744
	$(if $(QUIET),@echo 'Linking  $@' &&) \
745
	    $(OCAMLOPT) $(OFLAGS) -o $@ $(OLINKFLAGS) $^
746

747
bin/why3session.byte: lib/why3/why3.cma $(SESSIONCMO)
748
	$(if $(QUIET),@echo 'Linking  $@' &&) \
749
	    $(OCAMLC) $(BFLAGS) -o $@ $(BLINKFLAGS) $^
750 751 752

# depend and clean targets

753
ifneq "$(MAKECMDGOALS:clean%=clean)" "clean"
Andrei Paskevich's avatar
Andrei Paskevich committed
754 755
include $(SESSIONDEP)
endif
756

Andrei Paskevich's avatar
Andrei Paskevich committed
757
depend: $(SESSIONDEP)
758

759
CLEANDIRS += src/why3session
760

Kate's avatar
Kate committed
761 762 763
clean_old_install::
	rm -f $(BINDIR)/why3session$(EXE)

764
install_no_local::
765
	cp -f bin/why3session.@OCAMLBEST@ $(TOOLDIR)/why3session$(EXE)
766

767
install_local:: bin/why3session
768

MARCHE Claude's avatar
MARCHE Claude committed
769

770 771 772
##############
# Coq plugin
##############
773

774
ifeq (@enable_coq_tactic@,yes)
775

776
COQPGENERATED = src/coq-tactic/why3tac.ml
777

778
COQP_FILES = why3tac
779

780
COQPMODULES = $(addprefix src/coq-tactic/, $(COQP_FILES))
781

782 783 784
COQPDEP = $(addsuffix .dep, $(COQPMODULES))
COQPCMO = $(addsuffix .cmo, $(COQPMODULES))
COQPCMX = $(addsuffix .cmx, $(COQPMODULES))
785

786
COQPTREES = kernel interp intf lib library parsing pretyping proofs printing tactics toplevel
787
COQPINCLUDES = -I src/coq-tactic -I $(COQCAMLPLIB) $(addprefix -I @COQLIB@/, $(COQPTREES)) @ZIPINCLUDE@
788

789
$(COQPDEP): DEPFLAGS += -I src/coq-tactic
790
$(COQPCMO) $(COQPCMX): INCLUDES += $(COQPINCLUDES)
791 792
$(COQPCMO) $(COQPCMX): BFLAGS += -rectypes
$(COQPCMX): OFLAGS += -rectypes
793

794
$(COQPDEP): $(COQPGENERATED)
795

796 797
byte: src/coq-tactic/.why3-vo-byte
opt:  src/coq-tactic/.why3-vo-opt
798

799 800 801 802
lib/coq-tactic/why3tac.cmxs: OFLAGS += $(addsuffix .cmxa, @ZIPLIB@)
lib/coq-tactic/why3tac.cmxs: OFLAGS += $(addsuffix .cmx,  @MENHIRLIB@)

lib/coq-tactic/why3tac.cma:  BFLAGS += $(addsuffix .cma,  @ZIPLIB@)
803
lib/coq-tactic/why3tac.cma:  BFLAGS += $(addsuffix .cmo,  @MENHIRLIB@)
804

805
lib/coq-tactic/why3tac.cmxs: lib/why3/why3.cmxa $(COQPCMX)
Andrei Paskevich's avatar
Andrei Paskevich committed
806
	$(if $(QUIET),@echo 'Linking  $@' &&) \
807
	    $(OCAMLOPT) $(OFLAGS) -o $@ -shared $^
808

809
lib/coq-tactic/why3tac.cma: lib/why3/why3.cma $(COQPCMO)
Andrei Paskevich's avatar
Andrei Paskevich committed
810
	$(if $(QUIET),@echo 'Linking  $@' &&) \
811
	    $(OCAMLC) -a $(BFLAGS) -o $@ $^
812

813
src/coq-tactic/why3tac.ml: src/coq-tactic/why3tac.ml4
814
	$(if $(QUIET),@echo 'Camlp    $<' &&) \
François Bobot's avatar
François Bobot committed
815
	    $(COQCAMLP) pr_dump.cmo @COQPPLIBS@ pa_macro.cmo -D@coq_compat_version@ -impl $^ -o $@
816

817
src/coq-tactic/.why3-vo-byte: lib/coq-tactic/Why3.v lib/coq/BuiltIn.vo lib/coq-tactic/why3tac.cma
Andrei Paskevich's avatar
Andrei Paskevich committed
818
	$(if $(QUIET),@echo 'Coqc     $<' &&) \
819
	    WHY3CONFIG="" $(COQC) -byte -R lib/coq-tactic Why3 -R lib/coq Why3 $< && \
820
	    touch src/coq-tactic/.why3-vo-byte
821

822
src/coq-tactic/.why3-vo-opt: lib/coq-tactic/Why3.v lib/coq/BuiltIn.vo lib/coq-tactic/why3tac.cmxs
Andrei Paskevich's avatar
Andrei Paskevich committed
823
	$(if $(QUIET),@echo 'Coqc     $<' &&) \
824
	    WHY3CONFIG="" $(COQC) -opt -R lib/coq-tactic Why3 -R lib/coq Why3 $< && \
825
	    touch src/coq-tactic/.why3-vo-opt
826

827
# depend and clean targets
Andrei Paskevich's avatar
Andrei Paskevich committed
828

829
ifneq "$(MAKECMDGOALS:clean%=clean)" "clean"
830
include $(COQPDEP)
Andrei Paskevich's avatar
Andrei Paskevich committed
831
endif
832

833
depend: $(COQPDEP)
834

835 836 837 838
CLEANDIRS += src/coq-tactic
CLEANLIBS += lib/coq-tactic/why3tac
GENERATED += $(COQPGENERATED)

839
clean::
840 841
	rm -f lib/coq-tactic/*.vo lib/coq-tactic/*.glob
	rm -f src/coq-tactic/.why3-vo-*
842

843
install_no_local::
844 845
	mkdir -p $(LIBDIR)/why3/coq-tactic
	cp -f lib/coq-tactic/* $(LIBDIR)/why3/coq-tactic
846

847 848 849 850 851 852
endif

####################
# Coq realizations
####################

853 854
ifeq (@enable_coq_support@,yes)

855 856
ifeq (@enable_coq_libs@,yes)

857
COQLIBS_INT_FILES = Abs ComputerDivision Div2 EuclideanDivision Int MinMax Power NumOf
858 859
COQLIBS_INT_ALL_FILES = Exponentiation $(COQLIBS_INT_FILES)
COQLIBS_INT = $(addprefix lib/coq/int/, $(COQLIBS_INT_ALL_FILES))
860

861 862 863
COQLIBS_BOOL_FILES = Bool
COQLIBS_BOOL = $(addprefix lib/coq/bool/, $(COQLIBS_BOOL_FILES))

864
COQLIBS_REAL_FILES = Abs ExpLog FromInt MinMax PowerInt PowerReal Real RealInfix Square Trigonometry
865 866
COQLIBS_REAL = $(addprefix lib/coq/real/, $(COQLIBS_REAL_FILES))

867
COQLIBS_NUMBER_FILES = Divisibility Gcd Parity Prime Coprime
868 869
COQLIBS_NUMBER = $(addprefix lib/coq/number/, $(COQLIBS_NUMBER_FILES))

870 871 872
COQLIBS_SET_FILES = Set
COQLIBS_SET = $(addprefix lib/coq/set/, $(COQLIBS_SET_FILES))

873
COQLIBS_MAP_FILES = Map Occ MapPermut MapInjection
874 875
COQLIBS_MAP = $(addprefix lib/coq/map/, $(COQLIBS_MAP_FILES))

876
COQLIBS_LIST_FILES = List Length Mem Nth NthLength HdTl NthHdTl Append NthLengthAppend Reverse HdTlNoOpt NthNoOpt RevAppend Combine Distinct NumOcc Permut
877 878 879 880 881
COQLIBS_LIST = $(addprefix lib/coq/list/, $(COQLIBS_LIST_FILES))

COQLIBS_OPTION_FILES = Option
COQLIBS_OPTION = $(addprefix lib/coq/option/, $(COQLIBS_OPTION_FILES))

882 883 884
COQLIBS_SEQ_FILES = Seq
COQLIBS_SEQ = $(addprefix lib/coq/seq/, $(COQLIBS_SEQ_FILES))

885 886 887
COQLIBS_BV_FILES = Pow2int BV_Gen
COQLIBS_BV = $(addprefix lib/coq/bv/, $(COQLIBS_BV_FILES))

888
ifeq (@enable_coq_fp_libs@,yes)
889
COQLIBS_FP_FILES = Rounding SingleFormat Single DoubleFormat Double
890 891 892
COQLIBS_FP_ALL_FILES = GenFloat $(COQLIBS_FP_FILES)
COQLIBS_FP = $(addprefix lib/coq/floating_point/, $(COQLIBS_FP_ALL_FILES))
endif
893

894
COQLIBS_FILES = lib/coq/BuiltIn lib/coq/HighOrd $(COQLIBS_INT) $(COQLIBS_BOOL) $(COQLIBS_REAL) $(COQLIBS_NUMBER) $(COQLIBS_SET) $(COQLIBS_MAP) $(COQLIBS_LIST) $(COQLIBS_OPTION) $(COQLIBS_SEQ) $(COQLIBS_FP)  $(COQLIBS_BV)
895

896 897 898
drivers/coq-realizations.aux: Makefile
	$(if $(QUIET),@echo 'Generate $@' &&) \
	(echo "(* generated automatically at compilation time *)"; \
Andrei Paskevich's avatar
Andrei Paskevich committed
899
	echo 'theory BuiltIn meta "realized_theory" "BuiltIn", "" end'; \
900
	echo 'theory HighOrd meta "realized_theory" "HighOrd", "" end'; \
Andrei Paskevich's avatar
Andrei Paskevich committed
901
	for f in $(COQLIBS_INT_FILES); do \
Andrei Paskevich's avatar
Andrei Paskevich committed
902
	echo 'theory int.'"$$f"' meta "realized_theory" "int.'"$$f"'", "" end'; done; \
903 904
	for f in $(COQLIBS_BOOL_FILES); do \
	echo 'theory bool.'"$$f"' meta "realized_theory" "bool.'"$$f"'", "" end'; done; \
Andrei Paskevich's avatar
Andrei Paskevich committed
905
	for f in $(COQLIBS_REAL_FILES); do \
Andrei Paskevich's avatar
Andrei Paskevich committed
906
	echo 'theory real.'"$$f"' meta "realized_theory" "real.'"$$f"'", "" end'; d