final sources (?) for competition
[cvc5.git] / Makefile
1 # -*-makefile-*-
2 #
3 # This makefile is the _source_ directory's makefile, and is static,
4 # not generated. Makefile.am is the automake makefile for the build
5 # top-level (its corresponding Makefile.in is here, too, but the
6 # corresponding Makefile is under builds/$arch/$buildid.
7 #
8 builddir = builds
9
10 .PHONY: all
11 all .DEFAULT:
12 @if test -d $(builddir); then \
13 echo cd $(builddir); \
14 cd $(builddir); \
15 echo $(MAKE) $@; \
16 $(MAKE) $@ || exit 1; \
17 else \
18 echo; \
19 echo 'Run configure first, or type "make" in a configured build directory.'; \
20 echo; \
21 fi
22
23 distclean maintainerclean:
24 @if test -d $(builddir); then \
25 echo cd $(builddir); \
26 cd $(builddir); \
27 echo $(MAKE) $@; \
28 $(MAKE) $@ || exit 1; \
29 fi
30 test -z "$(builddir)" || rm -fr "$(builddir)"
31 rm -f config.reconfig
32
33 # synonyms for "check"
34 .PHONY: test
35 test: check
36
37 .PHONY: doc
38 doc: doc-builds
39
40 .PHONY: examples
41 examples: all
42 (cd examples && $(MAKE) $(AM_MAKEFLAGS))
43
44 YEAR := $(shell date +%Y)
45 submission submission-main:
46 @if [ -n "`ls src/parser/*/generated 2>/dev/null`" ]; then \
47 echo 'ERROR:' >&2; \
48 echo 'ERROR: Please make maintainer-clean first.' >&2; \
49 echo 'ERROR:' >&2; \
50 exit 1; \
51 fi
52 ./autogen.sh
53 ./configure competition --disable-shared --enable-static-binary --with-cln --without-cudd
54 $(MAKE)
55 strip builds/bin/cvc4
56 $(MAKE) check
57 $(MAKE) -C test/regress/regress1 check
58 # main track
59 mkdir -p cvc4-smtcomp-$(YEAR)
60 cp -p builds/bin/cvc4 cvc4-smtcomp-$(YEAR)/cvc4
61 cp contrib/run-script-smtcomp2012 cvc4-smtcomp-$(YEAR)/run
62 chmod 755 cvc4-smtcomp-$(YEAR)/run
63 tar cf cvc4-smtcomp-$(YEAR).tar cvc4-smtcomp-$(YEAR)
64 submission-application:
65 # application track is a separate build because it has different preprocessor #defines
66 @if [ -n "`ls src/parser/*/generated 2>/dev/null`" ]; then \
67 echo 'ERROR:' >&2; \
68 echo 'ERROR: Please make maintainer-clean first.' >&2; \
69 echo 'ERROR:' >&2; \
70 exit 1; \
71 fi
72 ./autogen.sh
73 ./configure competition --disable-shared --enable-static-binary --with-cln --without-cudd CXXFLAGS=-DCVC4_SMTCOMP_APPLICATION_TRACK CFLAGS=-DCVC4_SMTCOMP_APPLICATION_TRACK
74 $(MAKE)
75 strip builds/bin/cvc4
76 $(MAKE) check
77 $(MAKE) -C test/regress/regress1 check
78 # package the application track tarball
79 mkdir -p cvc4-application-smtcomp-$(YEAR)
80 cp -p builds/bin/cvc4 cvc4-application-smtcomp-$(YEAR)/cvc4
81 ( echo '#!/bin/sh'; \
82 echo 'exec ./cvc4 -L smt2 --no-checking --no-interactive --incremental' ) > cvc4-application-smtcomp-$(YEAR)/run
83 chmod 755 cvc4-application-smtcomp-$(YEAR)/run
84 tar cf cvc4-application-smtcomp-$(YEAR).tar cvc4-application-smtcomp-$(YEAR)
85 submission-parallel:
86 # parallel track can't be built with -cln, so it's a separate build
87 @if [ -n "`ls src/parser/*/generated 2>/dev/null`" ]; then \
88 echo 'ERROR:' >&2; \
89 echo 'ERROR: Please make maintainer-clean first.' >&2; \
90 echo 'ERROR:' >&2; \
91 exit 1; \
92 fi
93 ./autogen.sh
94 ./configure competition --disable-shared --enable-static-binary --with-gmp --without-cudd --with-portfolio
95 $(MAKE)
96 strip builds/bin/pcvc4
97 # some test cases fail (and are known to fail)
98 -$(MAKE) check BINARY=pcvc4
99 $(MAKE) -C test/regress/regress1 check BINARY=pcvc4
100 # package the parallel track tarball
101 mkdir -p cvc4-parallel-smtcomp-$(YEAR)
102 cp -p builds/bin/pcvc4 cvc4-parallel-smtcomp-$(YEAR)/pcvc4
103 ( echo '#!/bin/sh'; \
104 echo 'exec ./pcvc4 --threads 2 -L smt2 --no-checking --no-interactive' ) > cvc4-parallel-smtcomp-$(YEAR)/run
105 chmod 755 cvc4-parallel-smtcomp-$(YEAR)/run
106 tar cf cvc4-parallel-smtcomp-$(YEAR).tar cvc4-parallel-smtcomp-$(YEAR)