2 MAYBE_POLYLIB = polylib
9 ISL_LA = $(top_builddir)/isl/libisl.la
11 if BUNDLED_ISL_POLYLIB
12 MAYBE_ISL_POLYLIB = isl-polylib
13 ISL_POLYLIB_LA = $(top_builddir)/isl-polylib/libisl-polylib.la
17 OMEGA_LA = $(top_builddir)/omega/omega_lib/libomega.la
25 SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_ISL_POLYLIB) \
27 $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . doc
28 DIST_SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_ISL) \
29 $(MAYBE_ISL_POLYLIB) $(MAYBE_OMEGA) \
33 polylib/libpolylibgmp.la: FORCE
34 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
35 piplib/libpiplibMP.la: FORCE
36 cd piplib; $(MAKE) $(AM_MAKEFLAGS) libpiplibMP.la
38 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
39 isl-polylib/libisl-polylib.la: FORCE
40 cd isl-polylib; $(MAKE) $(AM_MAKEFLAGS) libisl-polylib.la
41 omega/omega_lib/libomega.la: FORCE
42 cd omega/omega_lib; $(MAKE) $(AM_MAKEFLAGS) libomega.la
43 zsolve/libzsolve.la: FORCE
44 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
45 parker/libparker.la: FORCE
46 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
48 AM_CPPFLAGS = @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ \
49 @NTL_CPPFLAGS@ @ISL_CFLAGS@ @ISL_POLYLIB_CFLAGS@
50 AM_LDFLAGS = @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@ @NTL_LDFLAGS@
52 LIB_ISL = $(ISL_LA) @ISL_LIBS@
53 LIB_ISL_POLYLIB = $(ISL_POLYLIB_LA) @ISL_POLYLIB_LIBS@
55 lib_LTLIBRARIES = libbarvinok.la
56 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
57 barvinok_ehrhart polytope_scan iscc
58 noinst_PROGRAMS = test testlib randomtest \
59 remove_redundant_equalities \
60 barvinok_union polytope_volume test_approx \
61 barvinok_summate verify_lexsmaller \
62 polyhedron_sample 4coins lexmin \
63 @bv_cone_hilbert_basis@ cone_integer_hull \
64 polytope_lattice_width polytope_minimize \
65 polyhedron_integer_hull vector_partition_chambers \
66 semigroup_holes evalue_convert \
67 barvinok_bound test_bound
68 EXTRA_PROGRAMS = cone_hilbert_basis
69 pkginclude_HEADERS = \
78 barvinok/basis_reduction.h
79 nodist_pkginclude_HEADERS = \
85 BR_CDD = basis_reduction_cdd.cc initcdd.cc
86 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
89 BR_GLPK = basis_reduction_glpk.c
90 POLYSIGN_GLPK = polysign_glpk.c
93 TOPCOM = topcom.c topcom.h
98 libbarvinok_la_SOURCES = \
102 barvinok/barvinok.h \
105 basis_reduction_pip.c \
106 basis_reduction_pip_dual.c \
128 genfun_constructor.cc \
129 genfun_constructor.h \
149 param_polynomial.cc \
164 remove_equalities.h \
165 remove_equalities.c \
187 EXTRA_libbarvinok_la_SOURCES = \
188 basis_reduction_cdd.cc \
189 basis_reduction_glpk.c \
199 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
202 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
205 ZSOLVE_LA = zsolve/libzsolve.la
207 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL_POLYLIB) $(LIB_ISL) \
208 $(POLYLIB_LA) @POLYLIB_LIBS@ \
209 $(PIPLIB_LA) @PIPLIB_LIBS@ \
211 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
213 LDADD = libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
214 @POLYLIB_LIBS@ @PIPLIB_LIBS@
224 barvinok_count_SOURCES = barvinok_count.c
225 barvinok_ehrhart_SOURCES = \
226 barvinok_ehrhart_options.c \
227 barvinok_ehrhart_options.h \
228 barvinok_ehrhart.cc \
229 evalue_convert_options.c \
233 barvinok_union_SOURCES = \
234 barvinok_union_options.c \
235 barvinok_union_options.h \
239 omega_interface/Exit.cc \
240 omega_interface/convert.h \
241 omega_interface/convert.cc \
242 omega_interface/count.h \
243 omega_interface/count.cc
248 FDSTREAM = fdstream.cc fdstream.h
250 barvinok_enumerate_SOURCES = \
251 barvinok_enumerate_options.c \
252 barvinok_enumerate_options.h \
253 barvinok_enumerate.cc \
254 evalue_convert_options.c \
266 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
267 barvinok_enumerate_e_SOURCES = \
268 barvinok_enumerate_e_options.c \
269 barvinok_enumerate_e_options.h \
270 barvinok_enumerate_e.cc \
271 evalue_convert_options.c \
284 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
286 MONA_LIBS = -ldfa -lbdd -lmem
287 PARKER_LA = parker/libparker.la
288 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
289 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
291 barvinok_enumerate_e_CPPFLAGS = \
292 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
293 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
294 barvinok_enumerate_e_LDADD = \
295 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok.la \
296 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@ @PIPLIB_LIBS@
297 barvinok_bound_SOURCES = \
298 evalue_convert_options.c \
309 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
310 barvinok_bound_LDADD = \
311 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
312 @POLYLIB_LIBS@ @PIPLIB_LIBS@
313 barvinok_summate_SOURCES = \
314 barvinok_summate_options.c \
315 barvinok_summate_options.h \
316 barvinok_summate.cc \
317 evalue_convert_options.c \
325 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
326 4coins_SOURCES = 4coins.cc
327 semigroup_holes_SOURCES = semigroup_holes.cc
340 test_approx_SOURCES = \
344 test_bound_SOURCES = \
346 evalue_convert_options.c \
354 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
356 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
357 @POLYLIB_LIBS@ @PIPLIB_LIBS@
358 evalue_convert_SOURCES = \
359 evalue_convert_main.c \
360 evalue_convert_options.c \
371 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
372 @POLYLIB_LIBS@ @PIPLIB_LIBS@
374 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
381 basis_reduction_templ.c \
383 polysign_cdd_template.cc \
384 barvinok/NTL.h.broken \
385 barvinok/NTL.h.normal \
386 barvinok/set.h.broken \
387 barvinok/set.h.normal \
390 doc/applications.tex \
399 polymake/Makefile.in \
401 polymake/autogen.sh \
402 polymake/configure.in \
403 polymake/convert.cc \
405 polymake/h_star_vector.cc \
406 polymake/lattice_points.cc
408 ACLOCAL_AMFLAGS = -I m4
411 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
412 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
415 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
418 (cd $(distdir)/polymake; \
419 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
420 (cd doc; make barvinok.pdf)
421 cp doc/barvinok.pdf $(distdir)/doc/
422 if test -f $(top_srcdir)/.git/HEAD; then \
423 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
425 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
429 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
431 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
433 check: check-testlib check-enumerate check-enumerate_e check-test \
434 check-lexmin check-approx check-evalue check-euler check-lw
435 check-testlib: testlib$(EXEEXT)
437 check-approx: test_approx$(EXEEXT)
438 @for i in $(top_srcdir)/tests/ehrhart/*; do \
439 if test -f $$i; then \
440 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
443 check-evalue: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
444 @for i in $(top_srcdir)/tests/evalue/*; do \
445 if test -f $$i; then \
447 if test -n "@bv_barvinok_bound@"; then \
448 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
449 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
451 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
454 check-euler: barvinok_summate$(EXEEXT)
455 @for i in $(top_srcdir)/tests/euler/*; do \
456 if test -f $$i; then \
457 for method in 'euler' 'laurent_old' 'laurent'; do \
458 opt="--summation=$$method"; \
460 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
465 TOPCOM_CD = '--chamber-decomposition=topcom'
467 ISL_CD = '--chamber-decomposition=isl'
468 check-enumerate: barvinok_enumerate$(EXEEXT)
469 @for i in $(top_srcdir)/tests/ehrhart/*; do \
470 if test -f $$i; then \
472 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
473 for spec in 'random' 'bf' 'df'; do \
474 opt="--specialization=$$spec $$options"; \
476 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
479 opt="--summation=bernoulli"; \
481 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
485 SPEC_OMEGA = '--isl --omega'
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 '' $(SPEC_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@'"' > $@