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 = \
226 EXTRA_libbarvinok_la_SOURCES = \
234 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
236 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
237 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
239 LDADD = libbarvinok-core.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
240 @POLYLIB_LIBS@ @PIPLIB_LIBS@
250 barvinok_count_SOURCES = barvinok_count.c
251 barvinok_ehrhart_SOURCES = \
252 barvinok_ehrhart.cc \
256 barvinok_union_SOURCES = barvinok_union.cc
259 omega_interface/Exit.cc \
260 omega_interface/convert.h \
261 omega_interface/convert.cc \
262 omega_interface/count.h \
263 omega_interface/count.cc
268 FDSTREAM = fdstream.cc fdstream.h
270 barvinok_enumerate_SOURCES = \
271 barvinok_enumerate.cc \
283 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
284 barvinok_enumerate_e_SOURCES = \
285 barvinok_enumerate_e.cc \
298 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
300 MONA_LIBS = -ldfa -lbdd -lmem
301 PARKER_LA = parker/libparker.la
302 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
303 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
305 barvinok_enumerate_e_CPPFLAGS = \
306 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
307 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
308 barvinok_enumerate_e_LDADD = \
309 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok-core.la \
310 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@ @PIPLIB_LIBS@
311 barvinok_bound_SOURCES = \
320 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
321 barvinok_bound_LDADD = \
322 libbarvinok-core.la libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
323 @POLYLIB_LIBS@ @PIPLIB_LIBS@
324 barvinok_summate_SOURCES = \
325 barvinok_summate.cc \
333 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
334 4coins_SOURCES = 4coins.cc
335 semigroup_holes_SOURCES = semigroup_holes.cc
347 test_approx_SOURCES = \
351 test_bound_SOURCES = \
360 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
362 libbarvinok-core.la libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
363 @POLYLIB_LIBS@ @PIPLIB_LIBS@
364 evalue_convert_SOURCES = \
365 evalue_convert_main.c \
376 libbarvinok.la libbarvinok-core.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
377 @POLYLIB_LIBS@ @PIPLIB_LIBS@
379 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
386 basis_reduction_templ.c \
388 polysign_cdd_template.cc \
389 barvinok/NTL.h.broken \
390 barvinok/NTL.h.normal \
391 barvinok/set.h.broken \
392 barvinok/set.h.normal \
395 doc/applications.tex \
405 polymake/Makefile.in \
407 polymake/autogen.sh \
408 polymake/configure.in \
409 polymake/convert.cc \
411 polymake/h_star_vector.cc \
412 polymake/lattice_points.cc
414 ACLOCAL_AMFLAGS = -I m4
417 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
418 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
421 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
424 (cd $(distdir)/polymake; \
425 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
426 (cd doc; make barvinok.pdf)
427 cp doc/barvinok.pdf $(distdir)/doc/
428 if test -f $(top_srcdir)/.git/HEAD; then \
429 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
431 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
435 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
437 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
439 check: check-testlib check-enumerate check-enumerate_e check-test \
440 check-lexmin check-approx check-evalue check-euler check-lw
441 check-testlib: testlib$(EXEEXT)
443 check-approx: test_approx$(EXEEXT)
444 @for i in $(top_srcdir)/tests/ehrhart/*; do \
445 if test -f $$i; then \
446 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
449 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
450 @for i in $(top_srcdir)/tests/evalue/*; do \
451 if test -f $$i; then \
453 if test -n "@bv_barvinok_bound@"; then \
454 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
455 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
457 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
460 check-euler: barvinok_summate$(EXEEXT)
461 @for i in $(top_srcdir)/tests/euler/*; do \
462 if test -f $$i; then \
463 for method in 'euler' 'laurent_old' 'laurent'; do \
464 opt="--summation=$$method"; \
466 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
471 TOPCOM_CD = '--chamber-decomposition=topcom'
473 check-enumerate: barvinok_enumerate$(EXEEXT)
474 @for i in $(top_srcdir)/tests/ehrhart/*; do \
475 if test -f $$i; then \
477 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
478 for spec in 'random' 'bf' 'df'; do \
479 opt="--specialization=$$spec $$options"; \
481 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
484 opt="--summation=bernoulli"; \
486 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
489 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
490 @for dir in $(BEE_TESTDIRS); do \
491 for i in $(top_srcdir)/tests/$$dir/*; do \
492 if test -f $$i; then \
493 for options in '' '--isl --omega' '--isl'; do \
494 for spec in 'random' 'bf' 'df'; do \
495 opt="--specialization=$$spec $$options"; \
497 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
503 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
504 if test -f $$i; then \
505 for spec in 'random' 'bf' 'df'; do \
506 opt="--specialization=$$spec --scarf"; \
508 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
511 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
514 check-test: test$(EXEEXT)
516 for i in $(top_srcdir)/tests/*; do \
517 if test -f $$i; then \
518 for options in '--index=10' '--primal --index=10'; do \
519 for spec in 'random' 'bf' 'df' 'todd'; do \
520 opt="--specialization=$$spec $$options"; \
522 ./test$(EXEEXT) $$opt < $$i; \
523 if test "$$?" -ne "0"; then \
524 failed=`expr $$failed + 1`; \
533 for i in $(top_srcdir)/tests/sample/*; do \
535 ./test$(EXEEXT) < $$i; \
536 if test "$$?" -ne "0"; then \
537 failed=`expr $$failed + 1`; \
543 if test $$failed != 0; then \
544 echo "$$failed tests failed"; \
547 check-lw: test$(EXEEXT)
549 for i in $(top_srcdir)/tests/lattice_width/*; do \
550 if test -f $$i; then \
552 ./test$(EXEEXT) < $$i; \
553 if test "$$?" -ne "0"; then \
554 failed=`expr $$failed + 1`; \
561 if test $$failed != 0; then \
562 echo "$$failed tests failed"; \
566 check-lexmin: lexmin$(EXEEXT)
567 @for i in $(top_srcdir)/tests/lexmin/*; do \
568 if test -f $$i; then \
569 for spec in 'random' 'bf' 'df'; do \
570 opt="--specialization=$$spec"; \
572 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
580 version.h: @GIT_HEAD@
581 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@