volume.c: drop redundant arguments to volume_simplex
[barvinok.git] / Makefile.am
blob4c79de65a72ba32696835150292e643636827519
1 if HAVE_GINAC
2     MAYBE_BERNSTEIN = bernstein
3 endif
4 SUBDIRS = $(MAYBE_BERNSTEIN) lib . omega doc
6 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib @GINACLIB_CPPFLAGS@
7 AM_LDFLAGS = -Llib
9 lib_LTLIBRARIES = libbarvinok.la
10 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
11                   barvinok_ehrhart
12 noinst_PROGRAMS = test randomtest \
13                   remove_redundant_equalities \
14                   barvinok_union barvinok_maximize polytope_volume \
15                   @bv_extra_programs@
16 EXTRA_PROGRAMS = piptest verify_lexsmaller polyhedron_sample 4coins lexmin \
17                  polytope_scan
18 pkginclude_HEADERS = \
19     barvinok/NTL_QQ.h \
20     barvinok/barvinok.h \
21     barvinok/util.h \
22     barvinok/evalue.h \
23     barvinok/genfun.h \
24     barvinok/options.h \
25     barvinok/polylib.h \
26     barvinok/sample.h \
27     barvinok/basis_reduction.h \
28     barvinok/bernstein.h
29 LINK = $(CXXLINK)
31 if HAVE_GINAC
32     BERNSTEIN_CC = bernstein.cc
33 endif
34 if HAVE_CDDLIB
35     BR_CDD = basis_reduction_cdd.cc initcdd.cc
36 endif
37 if HAVE_GLPK
38     BR_GLPK = basis_reduction_glpk.c
39 endif
40 libbarvinok_la_SOURCES = \
41     barvinok/evalue.h \
42     barvinok/genfun.h \
43     barvinok/util.h \
44     barvinok/barvinok.h \
45     NTL_QQ.cc \
46     basis_reduction.c \
47     evalue.c \
48     genfun.cc \
49     util.c \
50     version.c \
51     bfcounter.cc \
52     bfcounter.h \
53     conversion.cc \
54     conversion.h \
55     decomposer.cc \
56     decomposer.h \
57     dpoly.cc \
58     dpoly.h \
59     genfun_constructor.cc \
60     genfun_constructor.h \
61     lattice_point.cc \
62     lattice_point.h \
63     options.c \
64     reduce_domain.c \
65     reduce_domain.h \
66     reducer.cc \
67     reducer.h \
68     remove_equalities.h \
69     scale.c \
70     scale.h \
71     scarf.cc \
72     volume.c \
73     volume.h \
74     mat_util.cc \
75     mat_util.h \
76     barvinok.cc \
77     $(BERNSTEIN_CC) \
78     $(BR_CDD) \
79     $(BR_GLPK)
80 EXTRA_libbarvinok_la_SOURCES = \
81     bernstein.cc \
82     piputil.h \
83     initcdd.cc \
84     initcdd.h
85 if HAVE_GINAC
86     BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
87 endif
88 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(BERNSTEIN_LA) lib/libgnu.la
89 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
90 LDADD = libbarvinok.la
92 test_SOURCES = test.c
93 barvinok_count_SOURCES = barvinok_count.c
94 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
95 barvinok_union_SOURCES = barvinok_union.cc
96 if HAVE_OMEGA
97 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
98 else
99 BEEO_SOURCES = 
100 endif
101 barvinok_enumerate_SOURCES = \
102         barvinok_enumerate.cc \
103         evalue_convert.cc \
104         evalue_convert.h \
105         fdstream.cc \
106         fdstream.h \
107         verify.h \
108         verify.c \
109         verif_ehrhart.h \
110         verif_ehrhart.c
111 barvinok_enumerate_e_SOURCES = \
112         barvinok_enumerate_e.cc \
113         evalue_convert.cc \
114         evalue_convert.h \
115         fdstream.cc \
116         fdstream.h \
117         verify.h \
118         verify.c \
119         verif_ehrhart.h \
120         verif_ehrhart.c \
121         $(BEEO_SOURCES)
122 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
123 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
124 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la
125 barvinok_maximize_SOURCES = \
126         evalue_convert.cc \
127         evalue_convert.h \
128         fdstream.cc \
129         fdstream.h \
130         maximize.cc \
131         verify.h \
132         verify.c
133 4coins_SOURCES = 4coins.cc
134 if HAVE_CDDLIB
135 POLYSIGN = polysign_cddf.cc polysign_cdd.cc
136 endif
137 lexmin_SOURCES = \
138         lexmin.h \
139         lexmin.cc \
140         combine.c \
141         combine.h \
142         edomain.cc \
143         edomain.h \
144         evalue_util.cc \
145         evalue_util.h \
146         fdstream.cc \
147         fdstream.h \
148         $(POLYSIGN) \
149         polysign.c \
150         polysign_polylib.c \
151         polysign.h \
152         verify.h \
153         verify.c
154 EXTRA_lexmin_SOURCE = polysign_cddf.cc polysign_cdd.cc polysign.c
156 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
158 EXTRA_DIST = \
159     ChangeLog \
160     $(TESTFILES) \
161     latte2polylib.pl \
162     NTL_5_3_2.patch \
163     doc/Internal.tex \
164     doc/applications.tex \
165     doc/barvinok.tex \
166     doc/omega.tex \
167     doc/polymake.tex \
168     doc/reports.tex \
169     doc/barvinok.bib \
170     doc/barvinok.gdf \
171     doc/chicago.bst \
172     doc/chicago.sty \
173     doc/mydefs.sty \
174     polymake/Makefile.in \
175     polymake/README \
176     polymake/autogen.sh \
177     polymake/configure.in \
178     polymake/lattice_points.cc
180 ACLOCAL_AMFLAGS = -I m4
182 install-data-local:
183         @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
184         $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
186 uninstall-local:
187         rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
189 dist-hook:
190         (cd $(distdir)/polymake; \
191             ./autogen.sh; rm -rf autogen.sh autom4te.cache)
192         (cd doc; make barvinok.pdf)
193         cp doc/barvinok.pdf $(distdir)/doc/
194         if test -f $(top_srcdir)/.git/HEAD; then \
195             echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
196         else \
197             echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
198         fi
200 if HAVE_PIPLIB
201 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
202 else
203 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf
204 endif
206 check: check-enumerate check-enumerate_e check-test check-lexmin
207 check-enumerate: barvinok_enumerate
208         @for i in $(top_srcdir)/tests/ehrhart/*; do \
209             if test -f $$i; then \
210                 echo $$i; \
211                 for options in '' '--series' '--series --primal'; do \
212                     for spec in 'random' 'bf' 'df'; do \
213                         opt="--specialization=$$spec $$options"; \
214                         echo "        $$opt"; \
215                         ./barvinok_enumerate --verify $$opt < $$i; \
216                     done \
217                 done \
218             fi \
219         done
220 check-enumerate_e: barvinok_enumerate_e
221         @for dir in $(BEE_TESTDIRS); do \
222             for i in $(top_srcdir)/tests/$$dir/*; do \
223                 if test -f $$i; then \
224                     for options in '' '--pip' '--pip --omega'; do \
225                         for spec in 'random' 'bf' 'df'; do \
226                             opt="--specialization=$$spec $$options"; \
227                             echo $$i $$opt; \
228                             ./barvinok_enumerate_e --verify $$opt < $$i; \
229                         done \
230                     done \
231                 fi \
232             done \
233         done
234         @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
235             if test -f $$i; then \
236                 for spec in 'random' 'bf' 'df'; do \
237                     opt="--specialization=$$spec --scarf"; \
238                     echo $$i $$opt; \
239                     ./barvinok_enumerate_e --verify $$opt < $$i; \
240                 done \
241             fi \
242         done
243 check-test: test
244         @for i in $(top_srcdir)/tests/*; do \
245             if test -f $$i; then \
246                 for options in '--index=10' '--primal --index=10'; do \
247                     for spec in 'random' 'bf' 'df'; do \
248                         opt="--specialization=$$spec $$options"; \
249                         echo -n $$i $$opt; \
250                         ./test $$opt < $$i || echo -n " NOT"; \
251                         echo " ok"; \
252                     done \
253                 done \
254             fi \
255         done
256 if HAVE_GLPK
257 check-lexmin: lexmin
258         @for i in $(top_srcdir)/tests/lexmin/*; do \
259             if test -f $$i; then \
260                 for spec in 'random' 'bf' 'df'; do \
261                     opt="--specialization=$$spec"; \
262                     echo $$i $$opt; \
263                     ./lexmin --verify $$opt < $$i; \
264                 done \
265             fi \
266         done
267 else
268 check-lexmin:
269 endif
271 version.h: @GIT_HEAD@
272         echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@