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
222 BERNSTEIN_CC = dummy.c
224 libbarvinok_la_SOURCES = \
228 EXTRA_libbarvinok_la_SOURCES = \
232 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
234 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
235 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
237 LDADD = libbarvinok-core.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
238 @POLYLIB_LIBS@ @PIPLIB_LIBS@
248 barvinok_count_SOURCES = barvinok_count.c
249 barvinok_ehrhart_SOURCES = \
250 barvinok_ehrhart.cc \
254 barvinok_union_SOURCES = barvinok_union.cc
257 omega_interface/Exit.cc \
258 omega_interface/convert.h \
259 omega_interface/convert.cc \
260 omega_interface/count.h \
261 omega_interface/count.cc
266 FDSTREAM = fdstream.cc fdstream.h
268 barvinok_enumerate_SOURCES = \
269 barvinok_enumerate.cc \
281 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
282 barvinok_enumerate_e_SOURCES = \
283 barvinok_enumerate_e.cc \
296 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
298 MONA_LIBS = -ldfa -lbdd -lmem
299 PARKER_LA = parker/libparker.la
300 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
301 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
303 barvinok_enumerate_e_CPPFLAGS = \
304 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
305 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
306 barvinok_enumerate_e_LDADD = \
307 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok-core.la \
308 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@ @PIPLIB_LIBS@
309 barvinok_bound_SOURCES = \
318 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
319 barvinok_bound_LDADD = \
320 libbarvinok-core.la libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
321 @POLYLIB_LIBS@ @PIPLIB_LIBS@
322 barvinok_summate_SOURCES = \
323 barvinok_summate.cc \
331 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
332 4coins_SOURCES = 4coins.cc
333 semigroup_holes_SOURCES = semigroup_holes.cc
345 test_approx_SOURCES = \
349 test_bound_SOURCES = \
358 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
360 libbarvinok-core.la libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
361 @POLYLIB_LIBS@ @PIPLIB_LIBS@
362 evalue_convert_SOURCES = \
363 evalue_convert_main.c \
374 libbarvinok.la libbarvinok-core.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
375 @POLYLIB_LIBS@ @PIPLIB_LIBS@
377 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
384 basis_reduction_templ.c \
386 polysign_cdd_template.cc \
387 barvinok/NTL.h.broken \
388 barvinok/NTL.h.normal \
389 barvinok/set.h.broken \
390 barvinok/set.h.normal \
393 doc/applications.tex \
403 polymake/Makefile.in \
405 polymake/autogen.sh \
406 polymake/configure.in \
407 polymake/convert.cc \
409 polymake/h_star_vector.cc \
410 polymake/lattice_points.cc
412 ACLOCAL_AMFLAGS = -I m4
415 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
416 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
419 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
422 (cd $(distdir)/polymake; \
423 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
424 (cd doc; make barvinok.pdf)
425 cp doc/barvinok.pdf $(distdir)/doc/
426 if test -f $(top_srcdir)/.git/HEAD; then \
427 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
429 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
433 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
435 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
437 check: check-testlib check-enumerate check-enumerate_e check-test \
438 check-lexmin check-approx check-evalue check-euler check-lw
439 check-testlib: testlib$(EXEEXT)
441 check-approx: test_approx$(EXEEXT)
442 @for i in $(top_srcdir)/tests/ehrhart/*; do \
443 if test -f $$i; then \
444 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
447 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
448 @for i in $(top_srcdir)/tests/evalue/*; do \
449 if test -f $$i; then \
451 if test -n "@bv_barvinok_bound@"; then \
452 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
453 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
455 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
458 check-euler: barvinok_summate$(EXEEXT)
459 @for i in $(top_srcdir)/tests/euler/*; do \
460 if test -f $$i; then \
461 for method in 'euler' 'laurent_old' 'laurent'; do \
462 opt="--summation=$$method"; \
464 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
469 TOPCOM_CD = '--chamber-decomposition=topcom'
471 check-enumerate: barvinok_enumerate$(EXEEXT)
472 @for i in $(top_srcdir)/tests/ehrhart/*; do \
473 if test -f $$i; then \
475 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
476 for spec in 'random' 'bf' 'df'; do \
477 opt="--specialization=$$spec $$options"; \
479 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
482 opt="--summation=bernoulli"; \
484 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
487 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
488 @for dir in $(BEE_TESTDIRS); do \
489 for i in $(top_srcdir)/tests/$$dir/*; do \
490 if test -f $$i; then \
491 for options in '' '--isl --omega' '--isl'; do \
492 for spec in 'random' 'bf' 'df'; do \
493 opt="--specialization=$$spec $$options"; \
495 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
501 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
502 if test -f $$i; then \
503 for spec in 'random' 'bf' 'df'; do \
504 opt="--specialization=$$spec --scarf"; \
506 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
509 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
512 check-test: test$(EXEEXT)
514 for i in $(top_srcdir)/tests/*; do \
515 if test -f $$i; then \
516 for options in '--index=10' '--primal --index=10'; do \
517 for spec in 'random' 'bf' 'df' 'todd'; do \
518 opt="--specialization=$$spec $$options"; \
520 ./test$(EXEEXT) $$opt < $$i; \
521 if test "$$?" -ne "0"; then \
522 failed=`expr $$failed + 1`; \
531 for i in $(top_srcdir)/tests/sample/*; do \
533 ./test$(EXEEXT) < $$i; \
534 if test "$$?" -ne "0"; then \
535 failed=`expr $$failed + 1`; \
541 if test $$failed != 0; then \
542 echo "$$failed tests failed"; \
545 check-lw: test$(EXEEXT)
547 for i in $(top_srcdir)/tests/lattice_width/*; do \
548 if test -f $$i; then \
550 ./test$(EXEEXT) < $$i; \
551 if test "$$?" -ne "0"; then \
552 failed=`expr $$failed + 1`; \
559 if test $$failed != 0; then \
560 echo "$$failed tests failed"; \
564 check-lexmin: lexmin$(EXEEXT)
565 @for i in $(top_srcdir)/tests/lexmin/*; do \
566 if test -f $$i; then \
567 for spec in 'random' 'bf' 'df'; do \
568 opt="--specialization=$$spec"; \
570 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
578 version.h: @GIT_HEAD@
579 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@