barvinok_summate: correct options description
[barvinok.git] / Makefile.am
blobad39805779e5264f8f64d74c2abaeeb4a06f0081
1 if HAVE_GINAC
2     MAYBE_BERNSTEIN = bernstein
3 endif
4 if BUNDLED_POLYLIB
5     MAYBE_POLYLIB = polylib
6 endif
7 if BUNDLED_PIPLIB
8     MAYBE_PIPLIB = piplib
9 endif
10 SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_BERNSTEIN) lib . omega doc
12 FORCE:
13 lib/libgnu.la: FORCE
14         $(MAKE) $(AM_MAKEFLAGS) -C lib libgnu.la
15 bernstein/libbernstein.la: FORCE
16         $(MAKE) $(AM_MAKEFLAGS) -C bernstein libbernstein.la
17 polylib/libpolylibgmp.la: FORCE
18         $(MAKE) $(AM_MAKEFLAGS) -C polylib libpolylibgmp.la
19 piplib/libpiplibMP.la: FORCE
20         $(MAKE) $(AM_MAKEFLAGS) -C piplib libpiplibMP.la
22 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib \
23               @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ @GINACLIB_CPPFLAGS@
24 AM_LDFLAGS = -Llib @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@
26 lib_LTLIBRARIES = libbarvinok.la
27 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
28                   barvinok_ehrhart polytope_scan
29 noinst_PROGRAMS = test testlib randomtest \
30                   remove_redundant_equalities \
31                   barvinok_union polytope_volume test_approx \
32                   barvinok_summate verify_lexsmaller piptest \
33                   polyhedron_sample 4coins lexmin @bv_barvinok_maximize@
34 EXTRA_PROGRAMS = barvinok_maximize
35 pkginclude_HEADERS = \
36     barvinok/NTL_QQ.h \
37     barvinok/barvinok.h \
38     barvinok/util.h \
39     barvinok/evalue.h \
40     barvinok/genfun.h \
41     barvinok/options.h \
42     barvinok/polylib.h \
43     barvinok/sample.h \
44     barvinok/basis_reduction.h \
45     barvinok/bernstein.h
46 nodist_pkginclude_HEADERS = \
47     barvinok/NTL.h \
48     barvinok/set.h
49 LINK = $(CXXLINK)
51 if HAVE_GINAC
52     BERNSTEIN_CC = bernstein.cc
53 endif
54 if HAVE_CDDLIB
55     BR_CDD = basis_reduction_cdd.cc initcdd.cc
56     POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
57 endif
58 if HAVE_GLPK
59     BR_GLPK = basis_reduction_glpk.c
60     POLYSIGN_GLPK = polysign_glpk.c
61 endif
62 libbarvinok_la_SOURCES = \
63     barvinok/evalue.h \
64     barvinok/genfun.h \
65     barvinok/util.h \
66     barvinok/barvinok.h \
67     NTL_QQ.cc \
68     basis_reduction.c \
69     basis_reduction_pip.c \
70     basis_reduction_pip_dual.c \
71     evalue.c \
72     genfun.cc \
73     util.c \
74     version.c \
75     bernoulli.c \
76     bernoulli.h \
77     bfcounter.cc \
78     bfcounter.h \
79     conversion.cc \
80     conversion.h \
81     counter.cc \
82     counter.h \
83     decomposer.cc \
84     decomposer.h \
85     dpoly.cc \
86     dpoly.h \
87     euler.cc \
88     euler.h \
89     genfun_constructor.cc \
90     genfun_constructor.h \
91     lattice_point.cc \
92     lattice_point.h \
93     options.c \
94     param_util.c \
95     param_util.h \
96     piputil.h \
97     piputil.c \
98     $(POLYSIGN_CDD) \
99     $(POLYSIGN_GLPK) \
100     polysign.c \
101     polysign_polylib.c \
102     polysign.h \
103     reduce_domain.c \
104     reduce_domain.h \
105     reducer.cc \
106     reducer.h \
107     remove_equalities.h \
108     remove_equalities.c \
109     sample.c \
110     scale.c \
111     scale.h \
112     scarf.cc \
113     series.cc \
114     tcounter.cc \
115     tcounter.h \
116     volume.c \
117     volume.h \
118     mat_util.cc \
119     mat_util.h \
120     barvinok.cc \
121     barvinok_e.cc \
122     $(BERNSTEIN_CC) \
123     $(BR_CDD) \
124     $(BR_GLPK)
125 EXTRA_libbarvinok_la_SOURCES = \
126     basis_reduction_cdd.cc \
127     basis_reduction_glpk.c \
128     bernstein.cc \
129     polysign_cddf.cc \
130     polysign_cdd.cc \
131     polysign.c \
132     initcdd.cc \
133     initcdd.h
134 if HAVE_GINAC
135     BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
136 endif
137 if BUNDLED_POLYLIB
138     POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
139 endif
140 if BUNDLED_PIPLIB
141     PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
142 endif
143 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
144                         $(PIPLIB_LA) @PIPLIB_LIBS@ $(BERNSTEIN_LA) \
145                         lib/libgnu.la
146 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
147 LDADD = libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
149 test_SOURCES = test.c
150 testlib_SOURCES = \
151         evalue_read.c \
152         evalue_read.h \
153         testlib.cc
154 barvinok_count_SOURCES = barvinok_count.c
155 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
156 barvinok_union_SOURCES = barvinok_union.cc
157 if HAVE_OMEGA
158 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
159 else
160 BEEO_SOURCES = 
161 endif
162 if USE_FDSTREAM
163 FDSTREAM = fdstream.cc fdstream.h
164 endif
165 barvinok_enumerate_SOURCES = \
166         barvinok_enumerate.cc \
167         evalue_convert.cc \
168         evalue_convert.h \
169         $(FDSTREAM) \
170         verify.h \
171         verify.c \
172         verif_ehrhart.h \
173         verif_ehrhart.c
174 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
175 barvinok_enumerate_e_SOURCES = \
176         barvinok_enumerate_e.cc \
177         evalue_convert.cc \
178         evalue_convert.h \
179         $(FDSTREAM) \
180         verify.h \
181         verify.c \
182         verif_ehrhart.h \
183         verif_ehrhart.c \
184         $(BEEO_SOURCES)
185 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
186 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
187 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
188 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
189 barvinok_maximize_SOURCES = \
190         evalue_convert.cc \
191         evalue_convert.h \
192         evalue_read.c \
193         evalue_read.h \
194         $(FDSTREAM) \
195         maximize.cc \
196         verify.h \
197         verify.c
198 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
199 barvinok_summate_SOURCES = \
200         evalue_convert.cc \
201         evalue_convert.h \
202         evalue_read.c \
203         evalue_read.h \
204         $(FDSTREAM) \
205         summate.cc \
206         verify.h \
207         verify.c
208 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
209 4coins_SOURCES = 4coins.cc
210 lexmin_SOURCES = \
211         lexmin.h \
212         lexmin.cc \
213         combine.c \
214         combine.h \
215         edomain.cc \
216         edomain.h \
217         evalue_util.cc \
218         evalue_util.h \
219         verify.h \
220         verify.c
221 test_approx_SOURCES = \
222         test_approx.c \
223         verify.h \
224         verify.c
226 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
228 EXTRA_DIST = \
229     ChangeLog \
230     $(TESTFILES) \
231     latte2polylib.pl \
232     NTL_5_3_2.patch \
233     basis_reduction_templ.c \
234     polysign_cdd_template.cc \
235     barvinok/NTL.h.broken \
236     barvinok/NTL.h.normal \
237     barvinok/set.h.broken \
238     barvinok/set.h.normal \
239     doc/Internal.tex \
240     doc/applications.tex \
241     doc/barvinok.tex \
242     doc/omega.tex \
243     doc/polymake.tex \
244     doc/reports.tex \
245     doc/barvinok.bib \
246     doc/barvinok.gdf \
247     doc/chicago.bst \
248     doc/chicago.sty \
249     doc/mydefs.sty \
250     polymake/Makefile.in \
251     polymake/README \
252     polymake/autogen.sh \
253     polymake/configure.in \
254     polymake/lattice_points.cc
256 ACLOCAL_AMFLAGS = -I m4
258 install-data-local:
259         @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
260         $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
262 uninstall-local:
263         rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
265 dist-hook:
266         (cd $(distdir)/polymake; \
267             ./autogen.sh; rm -rf autogen.sh autom4te.cache)
268         (cd doc; make barvinok.pdf)
269         cp doc/barvinok.pdf $(distdir)/doc/
270         if test -f $(top_srcdir)/.git/HEAD; then \
271             echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
272         else \
273             echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
274         fi
276 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
278 check: check-testlib check-enumerate check-enumerate_e check-test \
279         check-lexmin check-approx check-evalue check-euler
280 check-testlib: testlib$(EXEEXT)
281         ./testlib$(EXEEXT)
282 check-approx: test_approx$(EXEEXT)
283         @for i in $(top_srcdir)/tests/ehrhart/*; do \
284             if test -f $$i; then \
285                 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
286             fi \
287         done
288 check-evalue: @bv_barvinok_maximize@ barvinok_summate$(EXEEXT)
289         @for i in $(top_srcdir)/tests/evalue/*; do \
290             if test -f $$i; then \
291                 if test -n "@bv_barvinok_maximize@"; then \
292                     ./barvinok_maximize$(EXEEXT) -T < $$i || exit; \
293                 fi; \
294                 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
295             fi \
296         done
297 check-euler: barvinok_summate$(EXEEXT)
298         @for i in $(top_srcdir)/tests/euler/*; do \
299             if test -f $$i; then \
300                 echo $$i; \
301                 ./barvinok_summate$(EXEEXT) -T --summation=euler < $$i || exit; \
302             fi \
303         done
304 check-enumerate: barvinok_enumerate$(EXEEXT)
305         @for i in $(top_srcdir)/tests/ehrhart/*; do \
306             if test -f $$i; then \
307                 echo $$i; \
308                 for options in '' '--series' '--series --primal'; do \
309                     for spec in 'random' 'bf' 'df'; do \
310                         opt="--specialization=$$spec $$options"; \
311                         echo "        $$opt"; \
312                         ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
313                     done \
314                 done \
315             fi \
316         done
317 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
318         @for dir in $(BEE_TESTDIRS); do \
319             for i in $(top_srcdir)/tests/$$dir/*; do \
320                 if test -f $$i; then \
321                     for options in '' '--pip' '--pip --omega'; do \
322                         for spec in 'random' 'bf' 'df'; do \
323                             opt="--specialization=$$spec $$options"; \
324                             echo $$i $$opt; \
325                             ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
326                         done \
327                     done \
328                 fi \
329             done \
330         done
331         @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
332             if test -f $$i; then \
333                 for spec in 'random' 'bf' 'df'; do \
334                     opt="--specialization=$$spec --scarf"; \
335                     echo $$i $$opt; \
336                     ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
337                 done \
338             fi \
339         done
340 check-test: test$(EXEEXT)
341         @for i in $(top_srcdir)/tests/*; do \
342             if test -f $$i; then \
343                 for options in '--index=10' '--primal --index=10'; do \
344                     for spec in 'random' 'bf' 'df' 'todd'; do \
345                         opt="--specialization=$$spec $$options"; \
346                         echo -n $$i $$opt; \
347                         ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
348                         echo " ok"; \
349                     done \
350                 done \
351             fi \
352         done
353 if HAVE_GLPK
354 check-lexmin: lexmin$(EXEEXT)
355         @for i in $(top_srcdir)/tests/lexmin/*; do \
356             if test -f $$i; then \
357                 for spec in 'random' 'bf' 'df'; do \
358                     opt="--specialization=$$spec"; \
359                     echo $$i $$opt; \
360                     ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
361                 done \
362             fi \
363         done
364 else
365 check-lexmin:
366 endif
368 version.h: @GIT_HEAD@
369         echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@