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 \
422 polymake/Makefile.in \
424 polymake/autogen.sh \
425 polymake/configure.in \
426 polymake/convert.cc \
428 polymake/h_star_vector.cc \
429 polymake/lattice_points.cc
431 ACLOCAL_AMFLAGS = -I m4
434 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
435 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
438 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
441 (cd $(distdir)/polymake; \
442 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
443 (cd doc; make barvinok.pdf)
444 cp doc/barvinok.pdf $(distdir)/doc/
445 if test -f $(top_srcdir)/.git/HEAD; then \
446 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
448 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
452 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
454 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
456 check: check-testlib check-enumerate check-enumerate_e check-test \
457 check-lexmin check-approx check-evalue check-euler check-lw
458 check-testlib: testlib$(EXEEXT)
460 check-approx: test_approx$(EXEEXT)
461 @for i in $(top_srcdir)/tests/ehrhart/*; do \
462 if test -f $$i; then \
463 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
466 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
467 @for i in $(top_srcdir)/tests/evalue/*; do \
468 if test -f $$i; then \
470 if test -n "@bv_barvinok_bound@"; then \
471 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
472 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
474 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
477 check-euler: barvinok_summate$(EXEEXT)
478 @for i in $(top_srcdir)/tests/euler/*; do \
479 if test -f $$i; then \
480 for method in 'euler' 'laurent_old' 'laurent'; do \
481 opt="--summation=$$method"; \
483 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
488 TOPCOM_CD = '--chamber-decomposition=topcom'
490 check-enumerate: barvinok_enumerate$(EXEEXT)
491 @for i in $(top_srcdir)/tests/ehrhart/*; do \
492 if test -f $$i; then \
494 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
495 for spec in 'random' 'bf' 'df'; do \
496 opt="--specialization=$$spec $$options"; \
498 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
501 opt="--summation=bernoulli"; \
503 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
507 SPEC_OMEGA = '--isl --omega'
509 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
510 @for dir in $(BEE_TESTDIRS); do \
511 for i in $(top_srcdir)/tests/$$dir/*; do \
512 if test -f $$i; then \
513 for options in '' $(SPEC_OMEGA) '--isl'; do \
514 for spec in 'random' 'bf' 'df'; do \
515 opt="--specialization=$$spec $$options"; \
517 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
523 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
524 if test -f $$i; then \
525 for spec in 'random' 'bf' 'df'; do \
526 opt="--specialization=$$spec --scarf"; \
528 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
531 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
534 check-test: test$(EXEEXT)
536 for i in $(top_srcdir)/tests/*; do \
537 if test -f $$i; then \
538 for options in '--index=10' '--primal --index=10'; do \
539 for spec in 'random' 'bf' 'df' 'todd'; do \
540 opt="--specialization=$$spec $$options"; \
542 ./test$(EXEEXT) $$opt < $$i; \
543 if test "$$?" -ne "0"; then \
544 failed=`expr $$failed + 1`; \
553 for i in $(top_srcdir)/tests/sample/*; do \
555 ./test$(EXEEXT) < $$i; \
556 if test "$$?" -ne "0"; then \
557 failed=`expr $$failed + 1`; \
563 if test $$failed != 0; then \
564 echo "$$failed tests failed"; \
567 check-lw: test$(EXEEXT)
569 for i in $(top_srcdir)/tests/lattice_width/*; do \
570 if test -f $$i; then \
572 ./test$(EXEEXT) < $$i; \
573 if test "$$?" -ne "0"; then \
574 failed=`expr $$failed + 1`; \
581 if test $$failed != 0; then \
582 echo "$$failed tests failed"; \
586 check-lexmin: lexmin$(EXEEXT)
587 @for i in $(top_srcdir)/tests/lexmin/*; do \
588 if test -f $$i; then \
589 for spec in 'random' 'bf' 'df'; do \
590 opt="--specialization=$$spec"; \
592 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
600 version.h: @GIT_HEAD@
601 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@