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 \
370 iscc_CPPFLAGS = @CLOOG_CFLAGS@ $(AM_CPPFLAGS)
372 libbarvinok.la @CLOOG_LIBS@ @CLOOG_LIBS@ @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
373 @POLYLIB_LIBS@ @PIPLIB_LIBS@
375 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
382 basis_reduction_templ.c \
384 polysign_cdd_template.cc \
385 barvinok/NTL.h.broken \
386 barvinok/NTL.h.normal \
387 barvinok/set.h.broken \
388 barvinok/set.h.normal \
391 doc/applications.tex \
400 polymake/Makefile.in \
402 polymake/autogen.sh \
403 polymake/configure.in \
404 polymake/convert.cc \
406 polymake/h_star_vector.cc \
407 polymake/lattice_points.cc
409 ACLOCAL_AMFLAGS = -I m4
412 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
413 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
416 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
419 (cd $(distdir)/polymake; \
420 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
421 (cd doc; make barvinok.pdf)
422 cp doc/barvinok.pdf $(distdir)/doc/
423 if test -f $(top_srcdir)/.git/HEAD; then \
424 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
426 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
430 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
432 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
434 check: check-testlib check-enumerate check-enumerate_e check-test \
435 check-lexmin check-approx check-evalue check-euler check-lw
436 check-testlib: testlib$(EXEEXT)
438 check-approx: test_approx$(EXEEXT)
439 @for i in $(top_srcdir)/tests/ehrhart/*; do \
440 if test -f $$i; then \
441 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
444 check-evalue: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
445 @for i in $(top_srcdir)/tests/evalue/*; do \
446 if test -f $$i; then \
448 if test -n "@bv_barvinok_bound@"; then \
449 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
450 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
452 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
455 check-euler: barvinok_summate$(EXEEXT)
456 @for i in $(top_srcdir)/tests/euler/*; do \
457 if test -f $$i; then \
458 for method in 'euler' 'laurent_old' 'laurent'; do \
459 opt="--summation=$$method"; \
461 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
466 TOPCOM_CD = '--chamber-decomposition=topcom'
468 ISL_CD = '--chamber-decomposition=isl'
469 check-enumerate: barvinok_enumerate$(EXEEXT)
470 @for i in $(top_srcdir)/tests/ehrhart/*; do \
471 if test -f $$i; then \
473 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
474 for spec in 'random' 'bf' 'df'; do \
475 opt="--specialization=$$spec $$options"; \
477 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
480 opt="--summation=bernoulli"; \
482 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
486 SPEC_OMEGA = '--isl --omega'
488 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
489 @for dir in $(BEE_TESTDIRS); do \
490 for i in $(top_srcdir)/tests/$$dir/*; do \
491 if test -f $$i; then \
492 for options in '' $(SPEC_OMEGA) '--isl'; do \
493 for spec in 'random' 'bf' 'df'; do \
494 opt="--specialization=$$spec $$options"; \
496 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
502 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
503 if test -f $$i; then \
504 for spec in 'random' 'bf' 'df'; do \
505 opt="--specialization=$$spec --scarf"; \
507 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
510 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
513 check-test: test$(EXEEXT)
515 for i in $(top_srcdir)/tests/*; do \
516 if test -f $$i; then \
517 for options in '--index=10' '--primal --index=10'; do \
518 for spec in 'random' 'bf' 'df' 'todd'; do \
519 opt="--specialization=$$spec $$options"; \
521 ./test$(EXEEXT) $$opt < $$i; \
522 if test "$$?" -ne "0"; then \
523 failed=`expr $$failed + 1`; \
532 for i in $(top_srcdir)/tests/sample/*; do \
534 ./test$(EXEEXT) < $$i; \
535 if test "$$?" -ne "0"; then \
536 failed=`expr $$failed + 1`; \
542 if test $$failed != 0; then \
543 echo "$$failed tests failed"; \
546 check-lw: test$(EXEEXT)
548 for i in $(top_srcdir)/tests/lattice_width/*; do \
549 if test -f $$i; then \
551 ./test$(EXEEXT) < $$i; \
552 if test "$$?" -ne "0"; then \
553 failed=`expr $$failed + 1`; \
560 if test $$failed != 0; then \
561 echo "$$failed tests failed"; \
565 check-lexmin: lexmin$(EXEEXT)
566 @for i in $(top_srcdir)/tests/lexmin/*; do \
567 if test -f $$i; then \
568 for spec in 'random' 'bf' 'df'; do \
569 opt="--specialization=$$spec"; \
571 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
579 version.h: @GIT_HEAD@
580 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@