summaryrefslogtreecommitdiff
path: root/Makefile
blob: 7537bb97b8b173c1a6c0f2b2d94e4667c60285f6 (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
# -*-makefile-*-
#
# This makefile is the _source_ directory's makefile, and is static,
# not generated.  Makefile.am is the automake makefile for the build
# top-level (its corresponding Makefile.in is here, too, but the
# corresponding Makefile is under builds/$arch/$buildid.
#
builddir = builds

.PHONY: all
all .DEFAULT:
	@if test -d $(builddir); then \
		echo cd $(builddir); \
		cd $(builddir); \
		echo $(MAKE) $@; \
		$(MAKE) $@ || exit 1; \
	else \
		echo; \
		echo 'Run configure first, or type "make" in a configured build directory.'; \
		echo; \
	fi

distclean maintainerclean:
	@if test -d $(builddir); then \
		echo cd $(builddir); \
		cd $(builddir); \
		echo $(MAKE) $@; \
		$(MAKE) $@ || exit 1; \
	fi
	test -z "$(builddir)" || rm -fr "$(builddir)"
	rm -f config.reconfig

# synonyms for "check"
.PHONY: test
test: check

.PHONY: doc
doc: doc-builds

.PHONY: examples
examples: all
	(cd examples && $(MAKE) $(AM_MAKEFLAGS))

YEAR := $(shell date +%Y)
submission:
	@if [ -n "`ls src/parser/*/generated`" ]; then \
	  echo 'ERROR:' >&2; \
	  echo 'ERROR: Please make maintainer-clean first.' >&2; \
	  echo 'ERROR:' >&2; \
	  exit 1; \
        fi
	if [ ! -e configure ]; then ./autogen.sh; fi
	./configure competition --disable-shared --enable-static-binary --with-cln
	$(MAKE)
	strip builds/bin/cvc4
	$(MAKE) check
	$(MAKE) -C test/regress/regress1 check
	# main track
	mkdir -p cvc4-smtcomp-$(YEAR)
	cp -p builds/bin/cvc4 cvc4-smtcomp-$(YEAR)/cvc4
	( echo '#!/bin/sh'; \
	  echo 'exec ./cvc4 -L smt2 --no-interactive' ) > cvc4-smtcomp-$(YEAR)/run
	chmod 755 cvc4-smtcomp-$(YEAR)/run
	tar cf cvc4-smtcomp-$(YEAR).tar cvc4-smtcomp-$(YEAR)
	# parallel track can't be built with -cln, so it's a separate build
	make maintainer-clean
	if [ ! -e configure ]; then ./autogen.sh; fi
	./configure competition --disable-shared --enable-static-binary --with-gmp --with-portfolio
	$(MAKE)
	strip builds/bin/pcvc4
	$(MAKE) check BINARY=pcvc4
	$(MAKE) -C test/regress/regress1 check BINARY=pcvc4
	# package the parallel track tarball
	mkdir -p cvc4-parallel-smtcomp-$(YEAR)
	cp -p builds/bin/pcvc4 cvc4-parallel-smtcomp-$(YEAR)/pcvc4
	( echo '#!/bin/sh'; \
	  echo 'exec ./pcvc4 --threads 2 -L smt2 --no-interactive' ) > cvc4-parallel-smtcomp-$(YEAR)/run
	chmod 755 cvc4-parallel-smtcomp-$(YEAR)/run
	tar cf cvc4-parallel-smtcomp-$(YEAR).tar cvc4-parallel-smtcomp-$(YEAR)
	# application track is a separate build too :-(
	make maintainer-clean
	if [ ! -e configure ]; then ./autogen.sh; fi
	./configure competition --disable-shared --enable-static-binary --with-cln CXXFLAGS=-DCVC4_SMTCOMP_APPLICATION_TRACK CFLAGS=-DCVC4_SMTCOMP_APPLICATION_TRACK
	$(MAKE)
	strip builds/bin/cvc4
	$(MAKE) check
	$(MAKE) -C test/regress/regress1 check
	# package the application track tarball
	mkdir -p cvc4-application-smtcomp-$(YEAR)
	cp -p builds/bin/cvc4 cvc4-application-smtcomp-$(YEAR)/cvc4
	( echo '#!/bin/sh'; \
	  echo 'exec ./cvc4 -L smt2 --no-interactive --incremental' ) > cvc4-application-smtcomp-$(YEAR)/run
	chmod 755 cvc4-application-smtcomp-$(YEAR)/run
	tar cf cvc4-application-smtcomp-$(YEAR).tar cvc4-application-smtcomp-$(YEAR)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback