2 MAYBE_BERNSTEIN = bernstein
5 MAYBE_POLYLIB = polylib
12 ISL_LA = $(top_builddir)/isl/libisl.la
14 if BUNDLED_ISL_POLYLIB
15 MAYBE_ISL_POLYLIB = isl-polylib
16 ISL_POLYLIB_LA = $(top_builddir)/isl-polylib/libisl-polylib.la
20 OMEGA_LA = $(top_builddir)/omega/omega_lib/libomega.la
28 SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_ISL_POLYLIB) \
29 $(MAYBE_BERNSTEIN) $(MAYBE_OMEGA) \
30 lib $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . doc
31 DIST_SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_ISL) \
32 $(MAYBE_ISL_POLYLIB) bernstein $(MAYBE_OMEGA) \
37 cd lib; $(MAKE) $(AM_MAKEFLAGS) libgnu.la
38 bernstein/libbernstein.la: FORCE
39 cd bernstein; $(MAKE) $(AM_MAKEFLAGS) libbernstein.la
40 polylib/libpolylibgmp.la: FORCE
41 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
42 piplib/libpiplibMP.la: FORCE
43 cd piplib; $(MAKE) $(AM_MAKEFLAGS) libpiplibMP.la
45 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
46 isl-polylib/libisl-polylib.la: FORCE
47 cd isl-polylib; $(MAKE) $(AM_MAKEFLAGS) libisl-polylib.la
48 omega/omega_lib/libomega.la: FORCE
49 cd omega/omega_lib; $(MAKE) $(AM_MAKEFLAGS) libomega.la
50 zsolve/libzsolve.la: FORCE
51 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
52 parker/libparker.la: FORCE
53 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
55 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib -Ilib \
56 @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ @ginac_CFLAGS@ \
57 @NTL_CPPFLAGS@ @ISL_CFLAGS@ @ISL_POLYLIB_CFLAGS@
58 AM_LDFLAGS = -Llib @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@ @NTL_LDFLAGS@
60 LIB_ISL = $(ISL_LA) @ISL_LIBS@
61 LIB_ISL_POLYLIB = $(ISL_POLYLIB_LA) @ISL_POLYLIB_LIBS@
63 lib_LTLIBRARIES = libbarvinok-core.la libbarvinok.la
64 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
65 barvinok_ehrhart polytope_scan iscc
66 noinst_PROGRAMS = test testlib randomtest \
67 remove_redundant_equalities \
68 barvinok_union polytope_volume test_approx \
69 barvinok_summate verify_lexsmaller \
70 polyhedron_sample 4coins lexmin @bv_barvinok_bound@ \
71 @bv_cone_hilbert_basis@ cone_integer_hull \
72 polytope_lattice_width polytope_minimize \
73 polyhedron_integer_hull vector_partition_chambers \
74 semigroup_holes evalue_convert
75 EXTRA_PROGRAMS = barvinok_bound test_bound cone_hilbert_basis
76 pkginclude_HEADERS = \
85 barvinok/basis_reduction.h \
87 nodist_pkginclude_HEADERS = \
93 BR_CDD = basis_reduction_cdd.cc initcdd.cc
94 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
97 BR_GLPK = basis_reduction_glpk.c
98 POLYSIGN_GLPK = polysign_glpk.c
101 TOPCOM = topcom.c topcom.h
104 HILBERT_C = hilbert.c
106 libbarvinok_core_la_SOURCES = \
110 barvinok/barvinok.h \
113 basis_reduction_pip.c \
114 basis_reduction_pip_dual.c \
136 genfun_constructor.cc \
137 genfun_constructor.h \
155 param_polynomial.cc \
170 remove_equalities.h \
171 remove_equalities.c \
193 EXTRA_libbarvinok_core_la_SOURCES = \
194 basis_reduction_cdd.cc \
195 basis_reduction_glpk.c \
205 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
208 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
211 ZSOLVE_LA = zsolve/libzsolve.la
213 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL_POLYLIB) $(LIB_ISL) \
214 $(POLYLIB_LA) @POLYLIB_LIBS@ \
215 $(PIPLIB_LA) @PIPLIB_LIBS@ \
216 $(ZSOLVE_LA) lib/libgnu.la
217 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
220 BERNSTEIN_CC = bernstein.cc ex_convert.cc range.cc
222 BERNSTEIN_CC = dummy.c
224 libbarvinok_la_SOURCES = \
228 EXTRA_libbarvinok_la_SOURCES = \
236 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
238 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
239 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
241 LDADD = libbarvinok-core.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
242 @POLYLIB_LIBS@ @PIPLIB_LIBS@
252 barvinok_count_SOURCES = barvinok_count.c
253 barvinok_ehrhart_SOURCES = \
254 barvinok_ehrhart.cc \
258 barvinok_union_SOURCES = barvinok_union.cc
261 omega_interface/Exit.cc \
262 omega_interface/convert.h \
263 omega_interface/convert.cc \
264 omega_interface/count.h \
265 omega_interface/count.cc
270 FDSTREAM = fdstream.cc fdstream.h
272 barvinok_enumerate_SOURCES = \
273 barvinok_enumerate.cc \
285 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
286 barvinok_enumerate_e_SOURCES = \
287 barvinok_enumerate_e.cc \
300 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
302 MONA_LIBS = -ldfa -lbdd -lmem
303 PARKER_LA = parker/libparker.la
304 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
305 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
307 barvinok_enumerate_e_CPPFLAGS = \
308 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
309 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
310 barvinok_enumerate_e_LDADD = \
311 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok-core.la \
312 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@ @PIPLIB_LIBS@
313 barvinok_bound_SOURCES = \
322 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
323 barvinok_bound_LDADD = \
324 libbarvinok-core.la libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
325 @POLYLIB_LIBS@ @PIPLIB_LIBS@
326 barvinok_summate_SOURCES = \
327 barvinok_summate.cc \
335 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
336 4coins_SOURCES = 4coins.cc
337 semigroup_holes_SOURCES = semigroup_holes.cc
349 test_approx_SOURCES = \
353 test_bound_SOURCES = \
362 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
364 libbarvinok-core.la libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
365 @POLYLIB_LIBS@ @PIPLIB_LIBS@
366 evalue_convert_SOURCES = \
367 evalue_convert_main.c \
378 libbarvinok.la libbarvinok-core.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
379 @POLYLIB_LIBS@ @PIPLIB_LIBS@
381 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
388 basis_reduction_templ.c \
390 polysign_cdd_template.cc \
391 barvinok/NTL.h.broken \
392 barvinok/NTL.h.normal \
393 barvinok/set.h.broken \
394 barvinok/set.h.normal \
397 doc/applications.tex \
407 polymake/Makefile.in \
409 polymake/autogen.sh \
410 polymake/configure.in \
411 polymake/convert.cc \
413 polymake/h_star_vector.cc \
414 polymake/lattice_points.cc
416 ACLOCAL_AMFLAGS = -I m4
419 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
420 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
423 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
426 (cd $(distdir)/polymake; \
427 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
428 (cd doc; make barvinok.pdf)
429 cp doc/barvinok.pdf $(distdir)/doc/
430 if test -f $(top_srcdir)/.git/HEAD; then \
431 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
433 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
437 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
439 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
441 check: check-testlib check-enumerate check-enumerate_e check-test \
442 check-lexmin check-approx check-evalue check-euler check-lw
443 check-testlib: testlib$(EXEEXT)
445 check-approx: test_approx$(EXEEXT)
446 @for i in $(top_srcdir)/tests/ehrhart/*; do \
447 if test -f $$i; then \
448 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
451 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
452 @for i in $(top_srcdir)/tests/evalue/*; do \
453 if test -f $$i; then \
455 if test -n "@bv_barvinok_bound@"; then \
456 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
457 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
459 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
462 check-euler: barvinok_summate$(EXEEXT)
463 @for i in $(top_srcdir)/tests/euler/*; do \
464 if test -f $$i; then \
465 for method in 'euler' 'laurent_old' 'laurent'; do \
466 opt="--summation=$$method"; \
468 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
473 TOPCOM_CD = '--chamber-decomposition=topcom'
475 check-enumerate: barvinok_enumerate$(EXEEXT)
476 @for i in $(top_srcdir)/tests/ehrhart/*; do \
477 if test -f $$i; then \
479 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
480 for spec in 'random' 'bf' 'df'; do \
481 opt="--specialization=$$spec $$options"; \
483 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
486 opt="--summation=bernoulli"; \
488 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
491 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
492 @for dir in $(BEE_TESTDIRS); do \
493 for i in $(top_srcdir)/tests/$$dir/*; do \
494 if test -f $$i; then \
495 for options in '' '--isl --omega' '--isl'; do \
496 for spec in 'random' 'bf' 'df'; do \
497 opt="--specialization=$$spec $$options"; \
499 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
505 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
506 if test -f $$i; then \
507 for spec in 'random' 'bf' 'df'; do \
508 opt="--specialization=$$spec --scarf"; \
510 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
513 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
516 check-test: test$(EXEEXT)
518 for i in $(top_srcdir)/tests/*; do \
519 if test -f $$i; then \
520 for options in '--index=10' '--primal --index=10'; do \
521 for spec in 'random' 'bf' 'df' 'todd'; do \
522 opt="--specialization=$$spec $$options"; \
524 ./test$(EXEEXT) $$opt < $$i; \
525 if test "$$?" -ne "0"; then \
526 failed=`expr $$failed + 1`; \
535 for i in $(top_srcdir)/tests/sample/*; do \
537 ./test$(EXEEXT) < $$i; \
538 if test "$$?" -ne "0"; then \
539 failed=`expr $$failed + 1`; \
545 if test $$failed != 0; then \
546 echo "$$failed tests failed"; \
549 check-lw: test$(EXEEXT)
551 for i in $(top_srcdir)/tests/lattice_width/*; do \
552 if test -f $$i; then \
554 ./test$(EXEEXT) < $$i; \
555 if test "$$?" -ne "0"; then \
556 failed=`expr $$failed + 1`; \
563 if test $$failed != 0; then \
564 echo "$$failed tests failed"; \
568 check-lexmin: lexmin$(EXEEXT)
569 @for i in $(top_srcdir)/tests/lexmin/*; do \
570 if test -f $$i; then \
571 for spec in 'random' 'bf' 'df'; do \
572 opt="--specialization=$$spec"; \
574 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
582 version.h: @GIT_HEAD@
583 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@