2 MAYBE_BERNSTEIN = bernstein
5 MAYBE_POLYLIB = polylib
10 SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_BERNSTEIN) lib . omega doc
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 = \
44 barvinok/basis_reduction.h \
46 nodist_pkginclude_HEADERS = \
52 BERNSTEIN_CC = bernstein.cc
55 BR_CDD = basis_reduction_cdd.cc initcdd.cc
56 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
59 BR_GLPK = basis_reduction_glpk.c
60 POLYSIGN_GLPK = polysign_glpk.c
62 libbarvinok_la_SOURCES = \
69 basis_reduction_pip.c \
70 basis_reduction_pip_dual.c \
87 genfun_constructor.cc \
88 genfun_constructor.h \
105 remove_equalities.h \
106 remove_equalities.c \
123 EXTRA_libbarvinok_la_SOURCES = \
124 basis_reduction_cdd.cc \
125 basis_reduction_glpk.c \
133 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
136 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
139 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
141 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
142 $(PIPLIB_LA) @PIPLIB_LIBS@ $(BERNSTEIN_LA) \
144 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
145 LDADD = libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
147 test_SOURCES = test.c
152 barvinok_count_SOURCES = barvinok_count.c
153 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
154 barvinok_union_SOURCES = barvinok_union.cc
156 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
161 FDSTREAM = fdstream.cc fdstream.h
163 barvinok_enumerate_SOURCES = \
164 barvinok_enumerate.cc \
172 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
173 barvinok_enumerate_e_SOURCES = \
174 barvinok_enumerate_e.cc \
183 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
184 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
185 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
186 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
187 barvinok_maximize_SOURCES = \
196 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
197 barvinok_summate_SOURCES = \
206 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
207 4coins_SOURCES = 4coins.cc
219 test_approx_SOURCES = \
224 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
231 basis_reduction_templ.c \
232 polysign_cdd_template.cc \
233 barvinok/NTL.h.broken \
234 barvinok/NTL.h.normal \
235 barvinok/set.h.broken \
236 barvinok/set.h.normal \
238 doc/applications.tex \
248 polymake/Makefile.in \
250 polymake/autogen.sh \
251 polymake/configure.in \
252 polymake/lattice_points.cc
254 ACLOCAL_AMFLAGS = -I m4
257 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
258 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
261 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
264 (cd $(distdir)/polymake; \
265 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
266 (cd doc; make barvinok.pdf)
267 cp doc/barvinok.pdf $(distdir)/doc/
268 if test -f $(top_srcdir)/.git/HEAD; then \
269 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
271 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
274 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
276 check: check-testlib check-enumerate check-enumerate_e check-test \
277 check-lexmin check-approx check-evalue
278 check-testlib: testlib$(EXEEXT)
280 check-approx: test_approx$(EXEEXT)
281 @for i in $(top_srcdir)/tests/ehrhart/*; do \
282 if test -f $$i; then \
283 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
286 check-evalue: @bv_barvinok_maximize@ barvinok_summate$(EXEEXT)
287 @for i in $(top_srcdir)/tests/evalue/*; do \
288 if test -f $$i; then \
289 if test -n "@bv_barvinok_maximize@"; then \
290 ./barvinok_maximize$(EXEEXT) -T < $$i || exit; \
292 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
295 check-enumerate: barvinok_enumerate$(EXEEXT)
296 @for i in $(top_srcdir)/tests/ehrhart/*; do \
297 if test -f $$i; then \
299 for options in '' '--series' '--series --primal'; do \
300 for spec in 'random' 'bf' 'df'; do \
301 opt="--specialization=$$spec $$options"; \
303 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
308 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
309 @for dir in $(BEE_TESTDIRS); do \
310 for i in $(top_srcdir)/tests/$$dir/*; do \
311 if test -f $$i; then \
312 for options in '' '--pip' '--pip --omega'; do \
313 for spec in 'random' 'bf' 'df'; do \
314 opt="--specialization=$$spec $$options"; \
316 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
322 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
323 if test -f $$i; then \
324 for spec in 'random' 'bf' 'df'; do \
325 opt="--specialization=$$spec --scarf"; \
327 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
331 check-test: test$(EXEEXT)
332 @for i in $(top_srcdir)/tests/*; do \
333 if test -f $$i; then \
334 for options in '--index=10' '--primal --index=10'; do \
335 for spec in 'random' 'bf' 'df' 'todd'; do \
336 opt="--specialization=$$spec $$options"; \
338 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
345 check-lexmin: lexmin$(EXEEXT)
346 @for i in $(top_srcdir)/tests/lexmin/*; do \
347 if test -f $$i; then \
348 for spec in 'random' 'bf' 'df'; do \
349 opt="--specialization=$$spec"; \
351 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
359 version.h: @GIT_HEAD@
360 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@