2 MAYBE_BERNSTEIN = bernstein
5 MAYBE_POLYLIB = polylib
12 ISL_LA = $(top_builddir)/isl/libisl.la
14 if BUNDLED_ISL_POLYLIB
15 MAYBE_ISL = 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_POYLIB) \
29 $(MAYBE_BERNSTEIN) $(MAYBE_OMEGA) \
30 lib $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . omega_interface doc
34 cd lib; $(MAKE) $(AM_MAKEFLAGS) libgnu.la
35 bernstein/libbernstein.la: FORCE
36 cd bernstein; $(MAKE) $(AM_MAKEFLAGS) libbernstein.la
37 polylib/libpolylibgmp.la: FORCE
38 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
39 piplib/libpiplibMP.la: FORCE
40 cd piplib; $(MAKE) $(AM_MAKEFLAGS) libpiplibMP.la
42 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
43 isl-polylib/libisl-polylib.la: FORCE
44 cd isl-polylib; $(MAKE) $(AM_MAKEFLAGS) libisl-polylib.la
45 omega/omega_lib/libomega.la: FORCE
46 cd omega/omega_lib; $(MAKE) $(AM_MAKEFLAGS) libomega.la
47 zsolve/libzsolve.la: FORCE
48 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
49 parker/libparker.la: FORCE
50 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
52 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib -Ilib \
53 @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ @ginac_CFLAGS@ \
54 @NTL_CPPFLAGS@ @ISL_CFLAGS@ @ISL_POLYLIB_CFLAGS@
55 AM_LDFLAGS = -Llib @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@ @NTL_LDFLAGS@
57 LIB_ISL = $(ISL_LA) @ISL_LIBS@
58 LIB_ISL_POLYLIB = $(ISL_POLYLIB_LA) @ISL_POLYLIB_LIBS@
60 lib_LTLIBRARIES = libbarvinok-core.la libbarvinok.la
61 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
62 barvinok_ehrhart polytope_scan iscc
63 noinst_PROGRAMS = test testlib randomtest \
64 remove_redundant_equalities \
65 barvinok_union polytope_volume test_approx \
66 barvinok_summate verify_lexsmaller piptest \
67 polyhedron_sample 4coins lexmin @bv_barvinok_bound@ \
68 @bv_cone_hilbert_basis@ cone_integer_hull \
69 polytope_lattice_width polytope_minimize \
70 polyhedron_integer_hull vector_partition_chambers \
71 semigroup_holes evalue_convert
72 EXTRA_PROGRAMS = barvinok_bound test_bound cone_hilbert_basis
73 pkginclude_HEADERS = \
82 barvinok/basis_reduction.h \
84 nodist_pkginclude_HEADERS = \
90 BR_CDD = basis_reduction_cdd.cc initcdd.cc
91 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
94 BR_GLPK = basis_reduction_glpk.c
95 POLYSIGN_GLPK = polysign_glpk.c
98 TOPCOM = topcom.c topcom.h
101 HILBERT_C = hilbert.c
103 libbarvinok_core_la_SOURCES = \
107 barvinok/barvinok.h \
110 basis_reduction_pip.c \
111 basis_reduction_pip_dual.c \
133 genfun_constructor.cc \
134 genfun_constructor.h \
152 param_polynomial.cc \
169 remove_equalities.h \
170 remove_equalities.c \
192 EXTRA_libbarvinok_core_la_SOURCES = \
193 basis_reduction_cdd.cc \
194 basis_reduction_glpk.c \
204 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
207 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
210 ZSOLVE_LA = zsolve/libzsolve.la
212 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL_POLYLIB) $(LIB_ISL) \
213 $(POLYLIB_LA) @POLYLIB_LIBS@ \
214 $(PIPLIB_LA) @PIPLIB_LIBS@ \
215 $(ZSOLVE_LA) lib/libgnu.la
216 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
219 BERNSTEIN_CC = bernstein.cc ex_convert.cc range.cc
221 BERNSTEIN_CC = dummy.c
223 libbarvinok_la_SOURCES = \
225 EXTRA_libbarvinok_la_SOURCES = \
233 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
235 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
236 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
238 LDADD = libbarvinok-core.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
239 @POLYLIB_LIBS@ @PIPLIB_LIBS@
249 barvinok_count_SOURCES = barvinok_count.c
250 barvinok_ehrhart_SOURCES = \
251 barvinok_ehrhart.cc \
255 barvinok_union_SOURCES = barvinok_union.cc
258 omega_interface/Exit.cc \
259 omega_interface/convert.cc \
260 omega_interface/count.cc
265 FDSTREAM = fdstream.cc fdstream.h
267 barvinok_enumerate_SOURCES = \
268 barvinok_enumerate.cc \
280 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
281 barvinok_enumerate_e_SOURCES = \
282 barvinok_enumerate_e.cc \
295 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
297 MONA_LIBS = -ldfa -lbdd -lmem
298 PARKER_LA = parker/libparker.la
299 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
300 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
302 barvinok_enumerate_e_CPPFLAGS = \
303 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
304 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
305 barvinok_enumerate_e_LDADD = \
306 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok-core.la \
307 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@ @PIPLIB_LIBS@
308 barvinok_bound_SOURCES = \
317 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
318 barvinok_bound_LDADD = \
319 libbarvinok-core.la libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
320 @POLYLIB_LIBS@ @PIPLIB_LIBS@
321 barvinok_summate_SOURCES = \
322 barvinok_summate.cc \
330 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
331 4coins_SOURCES = 4coins.cc
332 semigroup_holes_SOURCES = semigroup_holes.cc
344 test_approx_SOURCES = \
348 test_bound_SOURCES = \
357 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
359 libbarvinok-core.la libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
360 @POLYLIB_LIBS@ @PIPLIB_LIBS@
361 evalue_convert_SOURCES = \
362 evalue_convert_main.c \
369 libbarvinok.la libbarvinok-core.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
370 @POLYLIB_LIBS@ @PIPLIB_LIBS@
372 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
379 basis_reduction_templ.c \
381 polysign_cdd_template.cc \
382 barvinok/NTL.h.broken \
383 barvinok/NTL.h.normal \
384 barvinok/set.h.broken \
385 barvinok/set.h.normal \
388 doc/applications.tex \
398 polymake/Makefile.in \
400 polymake/autogen.sh \
401 polymake/configure.in \
402 polymake/convert.cc \
404 polymake/h_star_vector.cc \
405 polymake/lattice_points.cc
407 ACLOCAL_AMFLAGS = -I m4
410 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
411 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
414 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
417 (cd $(distdir)/polymake; \
418 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
419 (cd doc; make barvinok.pdf)
420 cp doc/barvinok.pdf $(distdir)/doc/
421 if test -f $(top_srcdir)/.git/HEAD; then \
422 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
424 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
428 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
430 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
432 check: check-testlib check-enumerate check-enumerate_e check-test \
433 check-lexmin check-approx check-evalue check-euler check-lw
434 check-testlib: testlib$(EXEEXT)
436 check-approx: test_approx$(EXEEXT)
437 @for i in $(top_srcdir)/tests/ehrhart/*; do \
438 if test -f $$i; then \
439 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
442 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
443 @for i in $(top_srcdir)/tests/evalue/*; do \
444 if test -f $$i; then \
446 if test -n "@bv_barvinok_bound@"; then \
447 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
448 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
450 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
453 check-euler: barvinok_summate$(EXEEXT)
454 @for i in $(top_srcdir)/tests/euler/*; do \
455 if test -f $$i; then \
456 for method in 'euler' 'laurent_old' 'laurent'; do \
457 opt="--summation=$$method"; \
459 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
464 TOPCOM_CD = '--chamber-decomposition=topcom'
466 check-enumerate: barvinok_enumerate$(EXEEXT)
467 @for i in $(top_srcdir)/tests/ehrhart/*; do \
468 if test -f $$i; then \
470 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
471 for spec in 'random' 'bf' 'df'; do \
472 opt="--specialization=$$spec $$options"; \
474 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
477 opt="--summation=bernoulli"; \
479 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
482 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
483 @for dir in $(BEE_TESTDIRS); do \
484 for i in $(top_srcdir)/tests/$$dir/*; do \
485 if test -f $$i; then \
486 for options in '' '--pip' '--pip --omega' '--isl'; do \
487 for spec in 'random' 'bf' 'df'; do \
488 opt="--specialization=$$spec $$options"; \
490 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
496 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
497 if test -f $$i; then \
498 for spec in 'random' 'bf' 'df'; do \
499 opt="--specialization=$$spec --scarf"; \
501 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
504 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
507 check-test: test$(EXEEXT)
509 for i in $(top_srcdir)/tests/*; do \
510 if test -f $$i; then \
511 for options in '--index=10' '--primal --index=10'; do \
512 for spec in 'random' 'bf' 'df' 'todd'; do \
513 opt="--specialization=$$spec $$options"; \
515 ./test$(EXEEXT) $$opt < $$i; \
516 if test "$$?" -ne "0"; then \
517 failed=`expr $$failed + 1`; \
526 for i in $(top_srcdir)/tests/sample/*; do \
528 ./test$(EXEEXT) < $$i; \
529 if test "$$?" -ne "0"; then \
530 failed=`expr $$failed + 1`; \
536 if test $$failed != 0; then \
537 echo "$$failed tests failed"; \
540 check-lw: test$(EXEEXT)
542 for i in $(top_srcdir)/tests/lattice_width/*; do \
543 if test -f $$i; then \
545 ./test$(EXEEXT) < $$i; \
546 if test "$$?" -ne "0"; then \
547 failed=`expr $$failed + 1`; \
554 if test $$failed != 0; then \
555 echo "$$failed tests failed"; \
559 check-lexmin: lexmin$(EXEEXT)
560 @for i in $(top_srcdir)/tests/lexmin/*; do \
561 if test -f $$i; then \
562 for spec in 'random' 'bf' 'df'; do \
563 opt="--specialization=$$spec"; \
565 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
573 version.h: @GIT_HEAD@
574 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@