2 MAYBE_BERNSTEIN = bernstein
5 MAYBE_POLYLIB = polylib
12 OMEGA_LA = $(top_builddir)/omega/omega_lib/libomega.la
20 SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_BERNSTEIN) \
22 lib $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . omega_interface doc
26 cd lib; $(MAKE) $(AM_MAKEFLAGS) libgnu.la
27 bernstein/libbernstein.la: FORCE
28 cd bernstein; $(MAKE) $(AM_MAKEFLAGS) libbernstein.la
29 polylib/libpolylibgmp.la: FORCE
30 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
31 piplib/libpiplibMP.la: FORCE
32 cd piplib; $(MAKE) $(AM_MAKEFLAGS) libpiplibMP.la
33 omega/omega_lib/libomega.la: FORCE
34 cd omega/omega_lib; $(MAKE) $(AM_MAKEFLAGS) libomega.la
35 zsolve/libzsolve.la: FORCE
36 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
37 parker/libparker.la: FORCE
38 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
40 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib -Ilib \
41 @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ @ginac_CFLAGS@ \
43 AM_LDFLAGS = -Llib @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@ @NTL_LDFLAGS@
45 lib_LTLIBRARIES = libbarvinok-core.la libbarvinok.la
46 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
47 barvinok_ehrhart polytope_scan
48 noinst_PROGRAMS = test testlib randomtest \
49 remove_redundant_equalities \
50 barvinok_union polytope_volume test_approx \
51 barvinok_summate verify_lexsmaller piptest \
52 polyhedron_sample 4coins lexmin @bv_barvinok_bound@ \
53 @bv_cone_hilbert_basis@ cone_integer_hull \
54 polytope_lattice_width polytope_minimize \
55 polyhedron_integer_hull vector_partition_chambers \
57 EXTRA_PROGRAMS = barvinok_bound test_bound cone_hilbert_basis
58 pkginclude_HEADERS = \
67 barvinok/basis_reduction.h \
69 nodist_pkginclude_HEADERS = \
75 BR_CDD = basis_reduction_cdd.cc initcdd.cc
76 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
79 BR_GLPK = basis_reduction_glpk.c
80 POLYSIGN_GLPK = polysign_glpk.c
83 TOPCOM = topcom.c topcom.h
88 libbarvinok_core_la_SOURCES = \
95 basis_reduction_pip.c \
96 basis_reduction_pip_dual.c \
117 genfun_constructor.cc \
118 genfun_constructor.h \
136 param_polynomial.cc \
153 remove_equalities.h \
154 remove_equalities.c \
176 EXTRA_libbarvinok_core_la_SOURCES = \
177 basis_reduction_cdd.cc \
178 basis_reduction_glpk.c \
188 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
191 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
194 ZSOLVE_LA = zsolve/libzsolve.la
196 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
197 $(PIPLIB_LA) @PIPLIB_LIBS@ \
198 $(ZSOLVE_LA) lib/libgnu.la
199 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
202 BERNSTEIN_CC = bernstein.cc ex_convert.cc range.cc
204 BERNSTEIN_CC = dummy.c
206 libbarvinok_la_SOURCES = \
208 EXTRA_libbarvinok_la_SOURCES = \
216 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
218 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
219 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
221 LDADD = libbarvinok-core.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
231 barvinok_count_SOURCES = barvinok_count.c
232 barvinok_ehrhart_SOURCES = \
233 barvinok_ehrhart.cc \
237 barvinok_union_SOURCES = barvinok_union.cc
240 omega_interface/Exit.cc \
241 omega_interface/convert.cc \
242 omega_interface/count.cc
247 FDSTREAM = fdstream.cc fdstream.h
249 barvinok_enumerate_SOURCES = \
250 barvinok_enumerate.cc \
262 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
263 barvinok_enumerate_e_SOURCES = \
264 barvinok_enumerate_e.cc \
277 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
279 MONA_LIBS = -ldfa -lbdd -lmem
280 PARKER_LA = parker/libparker.la
281 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
282 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
284 barvinok_enumerate_e_CPPFLAGS = \
285 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
286 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
287 barvinok_enumerate_e_LDADD = \
288 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok-core.la \
289 @POLYLIB_LIBS@ @PIPLIB_LIBS@
290 barvinok_bound_SOURCES = \
299 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
300 barvinok_bound_LDADD = \
301 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
302 barvinok_summate_SOURCES = \
303 barvinok_summate.cc \
311 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
312 4coins_SOURCES = 4coins.cc
313 semigroup_holes_SOURCES = semigroup_holes.cc
325 test_approx_SOURCES = \
329 test_bound_SOURCES = \
338 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
340 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
342 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
349 basis_reduction_templ.c \
351 polysign_cdd_template.cc \
352 barvinok/NTL.h.broken \
353 barvinok/NTL.h.normal \
354 barvinok/set.h.broken \
355 barvinok/set.h.normal \
357 doc/applications.tex \
367 polymake/Makefile.in \
369 polymake/autogen.sh \
370 polymake/configure.in \
371 polymake/convert.cc \
373 polymake/h_star_vector.cc \
374 polymake/lattice_points.cc
376 ACLOCAL_AMFLAGS = -I m4
379 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
380 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
383 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
386 (cd $(distdir)/polymake; \
387 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
388 (cd doc; make barvinok.pdf)
389 cp doc/barvinok.pdf $(distdir)/doc/
390 if test -f $(top_srcdir)/.git/HEAD; then \
391 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
393 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
397 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
399 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
401 check: check-testlib check-enumerate check-enumerate_e check-test \
402 check-lexmin check-approx check-evalue check-euler check-lw
403 check-testlib: testlib$(EXEEXT)
405 check-approx: test_approx$(EXEEXT)
406 @for i in $(top_srcdir)/tests/ehrhart/*; do \
407 if test -f $$i; then \
408 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
411 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
412 @for i in $(top_srcdir)/tests/evalue/*; do \
413 if test -f $$i; then \
415 if test -n "@bv_barvinok_bound@"; then \
416 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
417 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
419 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
422 check-euler: barvinok_summate$(EXEEXT)
423 @for i in $(top_srcdir)/tests/euler/*; do \
424 if test -f $$i; then \
425 for method in 'euler' 'laurent_old' 'laurent'; do \
426 opt="--summation=$$method"; \
428 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
433 TOPCOM_CD = '--chamber-decomposition=topcom'
435 check-enumerate: barvinok_enumerate$(EXEEXT)
436 @for i in $(top_srcdir)/tests/ehrhart/*; do \
437 if test -f $$i; then \
439 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
440 for spec in 'random' 'bf' 'df'; do \
441 opt="--specialization=$$spec $$options"; \
443 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
446 opt="--summation=bernoulli"; \
448 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
451 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
452 @for dir in $(BEE_TESTDIRS); do \
453 for i in $(top_srcdir)/tests/$$dir/*; do \
454 if test -f $$i; then \
455 for options in '' '--pip' '--pip --omega'; do \
456 for spec in 'random' 'bf' 'df'; do \
457 opt="--specialization=$$spec $$options"; \
459 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
465 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
466 if test -f $$i; then \
467 for spec in 'random' 'bf' 'df'; do \
468 opt="--specialization=$$spec --scarf"; \
470 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
473 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
476 check-test: test$(EXEEXT)
478 for i in $(top_srcdir)/tests/*; do \
479 if test -f $$i; then \
480 for options in '--index=10' '--primal --index=10'; do \
481 for spec in 'random' 'bf' 'df' 'todd'; do \
482 opt="--specialization=$$spec $$options"; \
484 ./test$(EXEEXT) $$opt < $$i; \
485 if test "$$?" -ne "0"; then \
486 failed=`expr $$failed + 1`; \
495 for i in $(top_srcdir)/tests/sample/*; do \
497 ./test$(EXEEXT) < $$i; \
498 if test "$$?" -ne "0"; then \
499 failed=`expr $$failed + 1`; \
505 if test $$failed != 0; then \
506 echo "$$failed tests failed"; \
509 check-lw: test$(EXEEXT)
511 for i in $(top_srcdir)/tests/lattice_width/*; do \
512 if test -f $$i; then \
514 ./test$(EXEEXT) < $$i; \
515 if test "$$?" -ne "0"; then \
516 failed=`expr $$failed + 1`; \
523 if test $$failed != 0; then \
524 echo "$$failed tests failed"; \
528 check-lexmin: lexmin$(EXEEXT)
529 @for i in $(top_srcdir)/tests/lexmin/*; do \
530 if test -f $$i; then \
531 for spec in 'random' 'bf' 'df'; do \
532 opt="--specialization=$$spec"; \
534 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
542 version.h: @GIT_HEAD@
543 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@