Merge pull request #28 from kbansal/sets
[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 install examples install-examples
11 all install examples install-examples .DEFAULT:
12 @if test -d $(builddir); then \
13 echo cd $(builddir); \
14 cd $(builddir); \
15 echo $(MAKE) $@; \
16 $(MAKE) $@ || exit 1; \
17 $(MAKE) show-config; \
18 else \
19 echo; \
20 echo 'Run configure first, or type "make" in a configured build directory.'; \
21 echo; \
22 fi
23
24 distclean maintainerclean:
25 @if test -d $(builddir); then \
26 echo cd $(builddir); \
27 cd $(builddir); \
28 echo $(MAKE) $@; \
29 $(MAKE) $@ || exit 1; \
30 fi
31 test -z "$(builddir)" || rm -fr "$(builddir)"
32 rm -f config.reconfig
33
34 # synonyms for "check"
35 .PHONY: test
36 test: check
37
38 .PHONY: doc doc-internals
39 doc: doc-builds
40 doc-internals: doc-internals-builds
41
42 YEAR := $(shell date +%Y)
43 submission submission-main:
44 @if [ -n "`ls src/parser/*/generated 2>/dev/null`" ]; then \
45 echo 'ERROR:' >&2; \
46 echo 'ERROR: Please make maintainer-clean first.' >&2; \
47 echo 'ERROR:' >&2; \
48 exit 1; \
49 fi
50 @if test -d cvc4-smtcomp-$(YEAR) || test -e cvc4-smtcomp-$(YEAR).zip; then \
51 echo 'ERROR:' >&2; \
52 echo 'ERROR: Please remove cvc4-smtcomp-$(YEAR) and cvc4-smtcomp-$(YEAR).zip first.' >&2; \
53 echo 'ERROR:' >&2; \
54 exit 1; \
55 fi
56 ./autogen.sh
57 ./configure competition --disable-shared --enable-static-binary --with-cln --with-glpk --with-abc --enable-gpl
58 $(MAKE)
59 strip builds/bin/cvc4
60 $(MAKE) check
61 #$(MAKE) -C test/regress/regress1 check
62 # main track
63 mkdir -p cvc4-smtcomp-$(YEAR)/bin
64 cp -p builds/bin/cvc4 cvc4-smtcomp-$(YEAR)/bin/cvc4
65 cp contrib/run-script-smtcomp2014 cvc4-smtcomp-$(YEAR)/bin/starexec_run_default
66 chmod 755 cvc4-smtcomp-$(YEAR)/bin/starexec_run_default
67 echo "CVC4 for SMT_COMP main track `builds/bin/cvc4 --version | head -1 | sed 's,.*version ,,;s,-,_,g;s,[^a-zA-Z0-9. _],,g'`" > cvc4-smtcomp-$(YEAR)/starexec_description.txt
68 cd cvc4-smtcomp-$(YEAR) && zip -r ../cvc4-smtcomp-$(YEAR).zip *
69 submission-application:
70 # application track is a separate build because it has different preprocessor #defines
71 @if [ -n "`ls src/parser/*/generated 2>/dev/null`" ]; then \
72 echo 'ERROR:' >&2; \
73 echo 'ERROR: Please make maintainer-clean first.' >&2; \
74 echo 'ERROR:' >&2; \
75 exit 1; \
76 fi
77 @if test -d cvc4-application-smtcomp-$(YEAR) || test -e cvc4-application-smtcomp-$(YEAR).zip; then \
78 echo 'ERROR:' >&2; \
79 echo 'ERROR: Please remove cvc4-application-smtcomp-$(YEAR) and cvc4-application-smtcomp-$(YEAR).zip first.' >&2; \
80 echo 'ERROR:' >&2; \
81 exit 1; \
82 fi
83 ./autogen.sh
84 ./configure competition --disable-shared --enable-static-binary --with-cln --with-glpk --with-abc --enable-gpl CXXFLAGS=-DCVC4_SMTCOMP_APPLICATION_TRACK CFLAGS=-DCVC4_SMTCOMP_APPLICATION_TRACK
85 $(MAKE)
86 strip builds/bin/cvc4
87 $(MAKE) check
88 #$(MAKE) -C test/regress/regress1 check
89 # package the application track zipfile
90 mkdir -p cvc4-application-smtcomp-$(YEAR)/bin
91 cp -p builds/bin/cvc4 cvc4-application-smtcomp-$(YEAR)/bin/cvc4
92 cp contrib/run-script-smtcomp2014-application cvc4-application-smtcomp-$(YEAR)/bin/starexec_run_default
93 chmod 755 cvc4-application-smtcomp-$(YEAR)/bin/starexec_run_default
94 echo "CVC4 for SMT_COMP application track `builds/bin/cvc4 --version | head -1 | sed 's,.*version ,,;s,-,_,g;s,[^a-zA-Z0-9. _],,g'`" > cvc4-application-smtcomp-$(YEAR)/starexec_description.txt
95 cd cvc4-application-smtcomp-$(YEAR) && zip -r ../cvc4-application-smtcomp-$(YEAR).zip *
96 submission-parallel:
97 # parallel track can't be built with -cln, so it's a separate build
98 @if [ -n "`ls src/parser/*/generated 2>/dev/null`" ]; then \
99 echo 'ERROR:' >&2; \
100 echo 'ERROR: Please make maintainer-clean first.' >&2; \
101 echo 'ERROR:' >&2; \
102 exit 1; \
103 fi
104 @if test -d cvc4-parallel-smtcomp-$(YEAR) || test -e cvc4-parallel-smtcomp-$(YEAR).zip; then \
105 echo 'ERROR:' >&2; \
106 echo 'ERROR: Please remove cvc4-parallel-smtcomp-$(YEAR) and cvc4-parallel-smtcomp-$(YEAR).zip first.' >&2; \
107 echo 'ERROR:' >&2; \
108 exit 1; \
109 fi
110 ./autogen.sh
111 ./configure competition --disable-shared --enable-static-binary --with-gmp --with-portfolio --with-glpk --with-abc --enable-gpl
112 $(MAKE)
113 strip builds/bin/pcvc4
114 # some test cases fail (and are known to fail)
115 -$(MAKE) check BINARY=pcvc4
116 #$(MAKE) -C test/regress/regress1 check BINARY=pcvc4
117 # package the parallel track zipfile
118 mkdir -p cvc4-parallel-smtcomp-$(YEAR)/bin
119 cp -p builds/bin/pcvc4 cvc4-parallel-smtcomp-$(YEAR)/bin/pcvc4
120 ( echo '#!/bin/sh'; \
121 echo 'exec ./pcvc4 --threads 2 -L smt2 --no-checking --no-interactive' ) > cvc4-parallel-smtcomp-$(YEAR)/bin/starexec_run_default
122 chmod 755 cvc4-parallel-smtcomp-$(YEAR)/bin/starexec_run_default
123 echo "CVC4 for SMT_COMP parallel track `builds/bin/cvc4 --version | head -1 | sed 's,.*version ,,;s,-,_,g;s,[^a-zA-Z0-9. _],,g'`" > cvc4-parallel-smtcomp-$(YEAR)/starexec_description.txt
124 cd cvc4-parallel-smtcomp-$(YEAR) && zip -r ../cvc4-parallel-smtcomp-$(YEAR).zip *