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 = \
224 EXTRA_libbarvinok_la_SOURCES = \
228 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
230 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
231 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
233 LDADD = libbarvinok-core.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
234 @POLYLIB_LIBS@ @PIPLIB_LIBS@
244 barvinok_count_SOURCES = barvinok_count.c
245 barvinok_ehrhart_SOURCES = \
246 barvinok_ehrhart_options.c \
247 barvinok_ehrhart_options.h \
248 barvinok_ehrhart.cc \
249 evalue_convert_options.c \
253 barvinok_union_SOURCES = \
254 barvinok_union_options.c \
255 barvinok_union_options.h \
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_options.c \
272 barvinok_enumerate_options.h \
273 barvinok_enumerate.cc \
274 evalue_convert_options.c \
286 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
287 barvinok_enumerate_e_SOURCES = \
288 barvinok_enumerate_e_options.c \
289 barvinok_enumerate_e_options.h \
290 barvinok_enumerate_e.cc \
291 evalue_convert_options.c \
304 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
306 MONA_LIBS = -ldfa -lbdd -lmem
307 PARKER_LA = parker/libparker.la
308 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
309 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
311 barvinok_enumerate_e_CPPFLAGS = \
312 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
313 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
314 barvinok_enumerate_e_LDADD = \
315 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok-core.la \
316 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@ @PIPLIB_LIBS@
317 barvinok_bound_SOURCES = \
318 evalue_convert_options.c \
329 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
330 barvinok_bound_LDADD = \
331 libbarvinok-core.la libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
332 @POLYLIB_LIBS@ @PIPLIB_LIBS@
333 barvinok_summate_SOURCES = \
334 barvinok_summate_options.c \
335 barvinok_summate_options.h \
336 barvinok_summate.cc \
337 evalue_convert_options.c \
345 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
346 4coins_SOURCES = 4coins.cc
347 semigroup_holes_SOURCES = semigroup_holes.cc
360 test_approx_SOURCES = \
364 test_bound_SOURCES = \
366 evalue_convert_options.c \
374 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
376 libbarvinok-core.la libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
377 @POLYLIB_LIBS@ @PIPLIB_LIBS@
378 evalue_convert_SOURCES = \
379 evalue_convert_main.c \
380 evalue_convert_options.c \
391 libbarvinok.la libbarvinok-core.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
392 @POLYLIB_LIBS@ @PIPLIB_LIBS@
394 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
401 basis_reduction_templ.c \
403 polysign_cdd_template.cc \
404 barvinok/NTL.h.broken \
405 barvinok/NTL.h.normal \
406 barvinok/set.h.broken \
407 barvinok/set.h.normal \
410 doc/applications.tex \
419 polymake/Makefile.in \
421 polymake/autogen.sh \
422 polymake/configure.in \
423 polymake/convert.cc \
425 polymake/h_star_vector.cc \
426 polymake/lattice_points.cc
428 ACLOCAL_AMFLAGS = -I m4
431 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
432 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
435 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
438 (cd $(distdir)/polymake; \
439 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
440 (cd doc; make barvinok.pdf)
441 cp doc/barvinok.pdf $(distdir)/doc/
442 if test -f $(top_srcdir)/.git/HEAD; then \
443 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
445 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
449 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
451 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
453 check: check-testlib check-enumerate check-enumerate_e check-test \
454 check-lexmin check-approx check-evalue check-euler check-lw
455 check-testlib: testlib$(EXEEXT)
457 check-approx: test_approx$(EXEEXT)
458 @for i in $(top_srcdir)/tests/ehrhart/*; do \
459 if test -f $$i; then \
460 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
463 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
464 @for i in $(top_srcdir)/tests/evalue/*; do \
465 if test -f $$i; then \
467 if test -n "@bv_barvinok_bound@"; then \
468 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
469 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
471 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
474 check-euler: barvinok_summate$(EXEEXT)
475 @for i in $(top_srcdir)/tests/euler/*; do \
476 if test -f $$i; then \
477 for method in 'euler' 'laurent_old' 'laurent'; do \
478 opt="--summation=$$method"; \
480 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
485 TOPCOM_CD = '--chamber-decomposition=topcom'
487 check-enumerate: barvinok_enumerate$(EXEEXT)
488 @for i in $(top_srcdir)/tests/ehrhart/*; do \
489 if test -f $$i; then \
491 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
492 for spec in 'random' 'bf' 'df'; do \
493 opt="--specialization=$$spec $$options"; \
495 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
498 opt="--summation=bernoulli"; \
500 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
504 SPEC_OMEGA = '--isl --omega'
506 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
507 @for dir in $(BEE_TESTDIRS); do \
508 for i in $(top_srcdir)/tests/$$dir/*; do \
509 if test -f $$i; then \
510 for options in '' $(SPEC_OMEGA) '--isl'; do \
511 for spec in 'random' 'bf' 'df'; do \
512 opt="--specialization=$$spec $$options"; \
514 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
520 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
521 if test -f $$i; then \
522 for spec in 'random' 'bf' 'df'; do \
523 opt="--specialization=$$spec --scarf"; \
525 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
528 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
531 check-test: test$(EXEEXT)
533 for i in $(top_srcdir)/tests/*; do \
534 if test -f $$i; then \
535 for options in '--index=10' '--primal --index=10'; do \
536 for spec in 'random' 'bf' 'df' 'todd'; do \
537 opt="--specialization=$$spec $$options"; \
539 ./test$(EXEEXT) $$opt < $$i; \
540 if test "$$?" -ne "0"; then \
541 failed=`expr $$failed + 1`; \
550 for i in $(top_srcdir)/tests/sample/*; do \
552 ./test$(EXEEXT) < $$i; \
553 if test "$$?" -ne "0"; then \
554 failed=`expr $$failed + 1`; \
560 if test $$failed != 0; then \
561 echo "$$failed tests failed"; \
564 check-lw: test$(EXEEXT)
566 for i in $(top_srcdir)/tests/lattice_width/*; do \
567 if test -f $$i; then \
569 ./test$(EXEEXT) < $$i; \
570 if test "$$?" -ne "0"; then \
571 failed=`expr $$failed + 1`; \
578 if test $$failed != 0; then \
579 echo "$$failed tests failed"; \
583 check-lexmin: lexmin$(EXEEXT)
584 @for i in $(top_srcdir)/tests/lexmin/*; do \
585 if test -f $$i; then \
586 for spec in 'random' 'bf' 'df'; do \
587 opt="--specialization=$$spec"; \
589 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
597 version.h: @GIT_HEAD@
598 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@