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 $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . doc
31 DIST_SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_ISL) \
32 $(MAYBE_ISL_POLYLIB) bernstein $(MAYBE_OMEGA) \
36 bernstein/libbernstein.la: FORCE
37 cd bernstein; $(MAKE) $(AM_MAKEFLAGS) libbernstein.la
38 polylib/libpolylibgmp.la: FORCE
39 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
40 piplib/libpiplibMP.la: FORCE
41 cd piplib; $(MAKE) $(AM_MAKEFLAGS) libpiplibMP.la
43 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
44 isl-polylib/libisl-polylib.la: FORCE
45 cd isl-polylib; $(MAKE) $(AM_MAKEFLAGS) libisl-polylib.la
46 omega/omega_lib/libomega.la: FORCE
47 cd omega/omega_lib; $(MAKE) $(AM_MAKEFLAGS) libomega.la
48 zsolve/libzsolve.la: FORCE
49 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
50 parker/libparker.la: FORCE
51 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
53 AM_CPPFLAGS = -I$(srcdir)/bernstein/include \
54 @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ @ginac_CFLAGS@ \
55 @NTL_CPPFLAGS@ @ISL_CFLAGS@ @ISL_POLYLIB_CFLAGS@
56 AM_LDFLAGS = @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@ @NTL_LDFLAGS@
58 LIB_ISL = $(ISL_LA) @ISL_LIBS@
59 LIB_ISL_POLYLIB = $(ISL_POLYLIB_LA) @ISL_POLYLIB_LIBS@
61 lib_LTLIBRARIES = libbarvinok-core.la libbarvinok.la
62 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
63 barvinok_ehrhart polytope_scan iscc
64 noinst_PROGRAMS = test testlib randomtest \
65 remove_redundant_equalities \
66 barvinok_union polytope_volume test_approx \
67 barvinok_summate verify_lexsmaller \
68 polyhedron_sample 4coins lexmin @bv_barvinok_bound@ \
69 @bv_cone_hilbert_basis@ cone_integer_hull \
70 polytope_lattice_width polytope_minimize \
71 polyhedron_integer_hull vector_partition_chambers \
72 semigroup_holes evalue_convert
73 EXTRA_PROGRAMS = barvinok_bound test_bound cone_hilbert_basis
74 pkginclude_HEADERS = \
83 barvinok/basis_reduction.h \
85 nodist_pkginclude_HEADERS = \
91 BR_CDD = basis_reduction_cdd.cc initcdd.cc
92 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
95 BR_GLPK = basis_reduction_glpk.c
96 POLYSIGN_GLPK = polysign_glpk.c
99 TOPCOM = topcom.c topcom.h
102 HILBERT_C = hilbert.c
104 libbarvinok_core_la_SOURCES = \
108 barvinok/barvinok.h \
111 basis_reduction_pip.c \
112 basis_reduction_pip_dual.c \
134 genfun_constructor.cc \
135 genfun_constructor.h \
153 param_polynomial.cc \
168 remove_equalities.h \
169 remove_equalities.c \
191 EXTRA_libbarvinok_core_la_SOURCES = \
192 basis_reduction_cdd.cc \
193 basis_reduction_glpk.c \
203 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
206 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
209 ZSOLVE_LA = zsolve/libzsolve.la
211 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL_POLYLIB) $(LIB_ISL) \
212 $(POLYLIB_LA) @POLYLIB_LIBS@ \
213 $(PIPLIB_LA) @PIPLIB_LIBS@ \
215 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
218 BERNSTEIN_CC = bernstein.cc
220 BERNSTEIN_CC = dummy.c
222 libbarvinok_la_SOURCES = \
226 EXTRA_libbarvinok_la_SOURCES = \
230 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
232 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
233 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
235 LDADD = libbarvinok-core.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
236 @POLYLIB_LIBS@ @PIPLIB_LIBS@
246 barvinok_count_SOURCES = barvinok_count.c
247 barvinok_ehrhart_SOURCES = \
248 barvinok_ehrhart_options.c \
249 barvinok_ehrhart_options.h \
250 barvinok_ehrhart.cc \
251 evalue_convert_options.c \
255 barvinok_union_SOURCES = \
256 barvinok_union_options.c \
257 barvinok_union_options.h \
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_options.c \
274 barvinok_enumerate_options.h \
275 barvinok_enumerate.cc \
276 evalue_convert_options.c \
288 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
289 barvinok_enumerate_e_SOURCES = \
290 barvinok_enumerate_e_options.c \
291 barvinok_enumerate_e_options.h \
292 barvinok_enumerate_e.cc \
293 evalue_convert_options.c \
306 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
308 MONA_LIBS = -ldfa -lbdd -lmem
309 PARKER_LA = parker/libparker.la
310 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
311 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
313 barvinok_enumerate_e_CPPFLAGS = \
314 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
315 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
316 barvinok_enumerate_e_LDADD = \
317 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok-core.la \
318 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@ @PIPLIB_LIBS@
319 barvinok_bound_SOURCES = \
320 evalue_convert_options.c \
331 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
332 barvinok_bound_LDADD = \
333 libbarvinok-core.la libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
334 @POLYLIB_LIBS@ @PIPLIB_LIBS@
335 barvinok_summate_SOURCES = \
336 barvinok_summate_options.c \
337 barvinok_summate_options.h \
338 barvinok_summate.cc \
339 evalue_convert_options.c \
347 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
348 4coins_SOURCES = 4coins.cc
349 semigroup_holes_SOURCES = semigroup_holes.cc
362 test_approx_SOURCES = \
366 test_bound_SOURCES = \
368 evalue_convert_options.c \
376 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
378 libbarvinok-core.la libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
379 @POLYLIB_LIBS@ @PIPLIB_LIBS@
380 evalue_convert_SOURCES = \
381 evalue_convert_main.c \
382 evalue_convert_options.c \
393 libbarvinok.la libbarvinok-core.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
394 @POLYLIB_LIBS@ @PIPLIB_LIBS@
396 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
403 basis_reduction_templ.c \
405 polysign_cdd_template.cc \
406 barvinok/NTL.h.broken \
407 barvinok/NTL.h.normal \
408 barvinok/set.h.broken \
409 barvinok/set.h.normal \
412 doc/applications.tex \
421 polymake/Makefile.in \
423 polymake/autogen.sh \
424 polymake/configure.in \
425 polymake/convert.cc \
427 polymake/h_star_vector.cc \
428 polymake/lattice_points.cc
430 ACLOCAL_AMFLAGS = -I m4
433 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
434 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
437 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
440 (cd $(distdir)/polymake; \
441 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
442 (cd doc; make barvinok.pdf)
443 cp doc/barvinok.pdf $(distdir)/doc/
444 if test -f $(top_srcdir)/.git/HEAD; then \
445 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
447 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
451 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
453 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
455 check: check-testlib check-enumerate check-enumerate_e check-test \
456 check-lexmin check-approx check-evalue check-euler check-lw
457 check-testlib: testlib$(EXEEXT)
459 check-approx: test_approx$(EXEEXT)
460 @for i in $(top_srcdir)/tests/ehrhart/*; do \
461 if test -f $$i; then \
462 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
465 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
466 @for i in $(top_srcdir)/tests/evalue/*; do \
467 if test -f $$i; then \
469 if test -n "@bv_barvinok_bound@"; then \
470 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
471 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
473 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
476 check-euler: barvinok_summate$(EXEEXT)
477 @for i in $(top_srcdir)/tests/euler/*; do \
478 if test -f $$i; then \
479 for method in 'euler' 'laurent_old' 'laurent'; do \
480 opt="--summation=$$method"; \
482 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
487 TOPCOM_CD = '--chamber-decomposition=topcom'
489 check-enumerate: barvinok_enumerate$(EXEEXT)
490 @for i in $(top_srcdir)/tests/ehrhart/*; do \
491 if test -f $$i; then \
493 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
494 for spec in 'random' 'bf' 'df'; do \
495 opt="--specialization=$$spec $$options"; \
497 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
500 opt="--summation=bernoulli"; \
502 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
506 SPEC_OMEGA = '--isl --omega'
508 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
509 @for dir in $(BEE_TESTDIRS); do \
510 for i in $(top_srcdir)/tests/$$dir/*; do \
511 if test -f $$i; then \
512 for options in '' $(SPEC_OMEGA) '--isl'; do \
513 for spec in 'random' 'bf' 'df'; do \
514 opt="--specialization=$$spec $$options"; \
516 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
522 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
523 if test -f $$i; then \
524 for spec in 'random' 'bf' 'df'; do \
525 opt="--specialization=$$spec --scarf"; \
527 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
530 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
533 check-test: test$(EXEEXT)
535 for i in $(top_srcdir)/tests/*; do \
536 if test -f $$i; then \
537 for options in '--index=10' '--primal --index=10'; do \
538 for spec in 'random' 'bf' 'df' 'todd'; do \
539 opt="--specialization=$$spec $$options"; \
541 ./test$(EXEEXT) $$opt < $$i; \
542 if test "$$?" -ne "0"; then \
543 failed=`expr $$failed + 1`; \
552 for i in $(top_srcdir)/tests/sample/*; do \
554 ./test$(EXEEXT) < $$i; \
555 if test "$$?" -ne "0"; then \
556 failed=`expr $$failed + 1`; \
562 if test $$failed != 0; then \
563 echo "$$failed tests failed"; \
566 check-lw: test$(EXEEXT)
568 for i in $(top_srcdir)/tests/lattice_width/*; do \
569 if test -f $$i; then \
571 ./test$(EXEEXT) < $$i; \
572 if test "$$?" -ne "0"; then \
573 failed=`expr $$failed + 1`; \
580 if test $$failed != 0; then \
581 echo "$$failed tests failed"; \
585 check-lexmin: lexmin$(EXEEXT)
586 @for i in $(top_srcdir)/tests/lexmin/*; do \
587 if test -f $$i; then \
588 for spec in 'random' 'bf' 'df'; do \
589 opt="--specialization=$$spec"; \
591 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
599 version.h: @GIT_HEAD@
600 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@