2 MAYBE_POLYLIB = polylib
9 ISL_LA = $(top_builddir)/isl/libisl.la
12 ISL_LA = $(ISL_BUILDDIR)/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) \
30 $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . doc
31 DIST_SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_ISL) \
32 $(MAYBE_ISL_POLYLIB) $(MAYBE_OMEGA) \
36 polylib/libpolylibgmp.la: FORCE
37 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
38 piplib/libpiplibMP.la: FORCE
39 cd piplib; $(MAKE) $(AM_MAKEFLAGS) libpiplibMP.la
41 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
42 isl-polylib/libisl-polylib.la: FORCE
43 cd isl-polylib; $(MAKE) $(AM_MAKEFLAGS) libisl-polylib.la
44 omega/omega_lib/libomega.la: FORCE
45 cd omega/omega_lib; $(MAKE) $(AM_MAKEFLAGS) libomega.la
46 zsolve/libzsolve.la: FORCE
47 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
48 parker/libparker.la: FORCE
49 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
51 AM_CPPFLAGS = @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ \
52 @NTL_CPPFLAGS@ @ISL_CFLAGS@ @ISL_POLYLIB_CFLAGS@
53 AM_LDFLAGS = @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@ @NTL_LDFLAGS@
55 LIB_ISL = $(ISL_LA) @ISL_LIBS@
56 LIB_ISL_POLYLIB = $(ISL_POLYLIB_LA) @ISL_POLYLIB_LIBS@
58 lib_LTLIBRARIES = libbarvinok.la
59 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
60 barvinok_ehrhart polytope_scan iscc
61 noinst_PROGRAMS = test testlib randomtest \
62 remove_redundant_equalities \
63 barvinok_union polytope_volume test_approx \
64 barvinok_summate verify_lexsmaller \
65 polyhedron_sample 4coins lexmin \
66 @bv_cone_hilbert_basis@ cone_integer_hull \
67 polytope_lattice_width polytope_minimize \
68 polyhedron_integer_hull vector_partition_chambers \
69 semigroup_holes evalue_convert \
70 barvinok_bound test_bound
71 EXTRA_PROGRAMS = cone_hilbert_basis
72 pkginclude_HEADERS = \
81 barvinok/basis_reduction.h
82 nodist_pkginclude_HEADERS = \
88 BR_CDD = basis_reduction_cdd.cc initcdd.cc
89 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
92 BR_GLPK = basis_reduction_glpk.c
93 POLYSIGN_GLPK = polysign_glpk.c
96 TOPCOM = topcom.c topcom.h
102 BR_PIP = basis_reduction_pip.c basis_reduction_pip_dual.c
103 POLYSIGN_PIP = polysign_pip.c
105 libbarvinok_la_SOURCES = \
109 barvinok/barvinok.h \
133 genfun_constructor.cc \
134 genfun_constructor.h \
154 param_polynomial.cc \
169 remove_equalities.h \
170 remove_equalities.c \
193 EXTRA_libbarvinok_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_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL_POLYLIB) $(LIB_ISL) \
214 $(POLYLIB_LA) @POLYLIB_LIBS@ \
215 $(PIPLIB_LA) @PIPLIB_LIBS@ \
217 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
219 LDADD = libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
220 @POLYLIB_LIBS@ @PIPLIB_LIBS@
230 barvinok_count_SOURCES = barvinok_count.c
231 barvinok_ehrhart_SOURCES = \
232 barvinok_ehrhart_options.c \
233 barvinok_ehrhart_options.h \
234 barvinok_ehrhart.cc \
235 evalue_convert_options.c \
239 barvinok_union_SOURCES = \
240 barvinok_union_options.c \
241 barvinok_union_options.h \
245 omega_interface/Exit.cc \
246 omega_interface/convert.h \
247 omega_interface/convert.cc \
248 omega_interface/count.h \
249 omega_interface/count.cc
254 FDSTREAM = fdstream.cc fdstream.h
256 barvinok_enumerate_SOURCES = \
257 barvinok_enumerate_options.c \
258 barvinok_enumerate_options.h \
259 barvinok_enumerate.cc \
260 evalue_convert_options.c \
272 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
273 barvinok_enumerate_e_SOURCES = \
274 barvinok_enumerate_e_options.c \
275 barvinok_enumerate_e_options.h \
276 barvinok_enumerate_e.cc \
277 evalue_convert_options.c \
290 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
292 MONA_LIBS = -ldfa -lbdd -lmem
293 PARKER_LA = parker/libparker.la
294 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
295 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
297 barvinok_enumerate_e_CPPFLAGS = \
298 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
299 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
300 barvinok_enumerate_e_LDADD = \
301 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok.la \
302 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@ @PIPLIB_LIBS@
303 barvinok_bound_SOURCES = \
307 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
308 barvinok_bound_LDADD = \
309 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
310 @POLYLIB_LIBS@ @PIPLIB_LIBS@
311 barvinok_summate_SOURCES = \
315 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
316 4coins_SOURCES = 4coins.cc
317 semigroup_holes_SOURCES = semigroup_holes.cc
330 test_approx_SOURCES = \
334 test_bound_SOURCES = \
338 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
340 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
341 @POLYLIB_LIBS@ @PIPLIB_LIBS@
342 evalue_convert_SOURCES = \
343 evalue_convert_main.c \
344 evalue_convert_options.c \
356 iscc_CPPFLAGS = @CLOOG_CFLAGS@ $(AM_CPPFLAGS)
358 libbarvinok.la @CLOOG_LIBS@ @CLOOG_LIBS@ @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
359 @POLYLIB_LIBS@ @PIPLIB_LIBS@
361 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
368 basis_reduction_templ.c \
370 polysign_cdd_template.cc \
371 barvinok/NTL.h.broken \
372 barvinok/NTL.h.normal \
373 barvinok/set.h.broken \
374 barvinok/set.h.normal \
377 doc/applications.tex \
386 polymake/Makefile.in \
388 polymake/autogen.sh \
389 polymake/configure.in \
390 polymake/convert.cc \
392 polymake/h_star_vector.cc \
393 polymake/lattice_points.cc
395 ACLOCAL_AMFLAGS = -I m4
398 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
399 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
402 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
405 (cd $(distdir)/polymake; \
406 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
407 (cd doc; make barvinok.pdf)
408 cp doc/barvinok.pdf $(distdir)/doc/
409 if test -f $(top_srcdir)/.git/HEAD; then \
410 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
412 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
416 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
418 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
420 check: check-testlib check-enumerate check-enumerate_e check-test \
421 check-lexmin check-approx check-pwqp check-euler check-lw
422 check-testlib: testlib$(EXEEXT)
424 check-approx: test_approx$(EXEEXT)
425 @for i in $(top_srcdir)/tests/ehrhart/*; do \
426 if test -f $$i; then \
427 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
430 check-pwqp: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
431 @for i in $(top_srcdir)/tests/pwqp/*; do \
432 if test -f $$i; then \
434 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
435 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
436 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
439 check-euler: barvinok_summate$(EXEEXT)
440 @for i in $(top_srcdir)/tests/euler/*; do \
441 if test -f $$i; then \
442 for method in 'euler' 'laurent_old' 'laurent'; do \
443 opt="--summation=$$method"; \
445 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
450 TOPCOM_CD = '--chamber-decomposition=topcom'
452 ISL_CD = '--chamber-decomposition=isl'
453 check-enumerate: barvinok_enumerate$(EXEEXT)
454 @for i in $(top_srcdir)/tests/ehrhart/*; do \
455 if test -f $$i; then \
457 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
458 for spec in 'random' 'bf' 'df'; do \
459 opt="--specialization=$$spec $$options"; \
461 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
464 opt="--summation=bernoulli"; \
466 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
470 SPEC_OMEGA = '--isl --omega'
472 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
473 @for dir in $(BEE_TESTDIRS); do \
474 for i in $(top_srcdir)/tests/$$dir/*; do \
475 if test -f $$i; then \
476 for options in '' $(SPEC_OMEGA) '--isl'; do \
477 for spec in 'random' 'bf' 'df'; do \
478 opt="--specialization=$$spec $$options"; \
480 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
486 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
487 if test -f $$i; then \
488 for spec in 'random' 'bf' 'df'; do \
489 opt="--specialization=$$spec --scarf"; \
491 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
494 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
497 check-test: test$(EXEEXT)
499 for i in $(top_srcdir)/tests/*; do \
500 if test -f $$i; then \
501 for options in '--index=10' '--primal --index=10'; do \
502 for spec in 'random' 'bf' 'df' 'todd'; do \
503 opt="--specialization=$$spec $$options"; \
505 ./test$(EXEEXT) $$opt < $$i; \
506 if test "$$?" -ne "0"; then \
507 failed=`expr $$failed + 1`; \
516 for i in $(top_srcdir)/tests/sample/*; do \
518 ./test$(EXEEXT) < $$i; \
519 if test "$$?" -ne "0"; then \
520 failed=`expr $$failed + 1`; \
526 if test $$failed != 0; then \
527 echo "$$failed tests failed"; \
530 check-lw: test$(EXEEXT)
532 for i in $(top_srcdir)/tests/lattice_width/*; do \
533 if test -f $$i; then \
535 ./test$(EXEEXT) < $$i; \
536 if test "$$?" -ne "0"; then \
537 failed=`expr $$failed + 1`; \
544 if test $$failed != 0; then \
545 echo "$$failed tests failed"; \
549 check-lexmin: lexmin$(EXEEXT)
550 @for i in $(top_srcdir)/tests/lexmin/*; do \
551 if test -f $$i; then \
552 for spec in 'random' 'bf' 'df'; do \
553 opt="--specialization=$$spec"; \
555 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
563 version.h: @GIT_HEAD@
564 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@