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 = \
82 barvinok/basis_reduction.h
83 nodist_pkginclude_HEADERS = \
89 BR_CDD = basis_reduction_cdd.cc initcdd.cc
90 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
93 BR_GLPK = basis_reduction_glpk.c
94 POLYSIGN_GLPK = polysign_glpk.c
97 TOPCOM = topcom.c topcom.h
100 HILBERT_C = hilbert.c
103 BR_PIP = basis_reduction_pip.c basis_reduction_pip_dual.c
104 POLYSIGN_PIP = polysign_pip.c
106 libbarvinok_la_SOURCES = \
110 barvinok/barvinok.h \
134 genfun_constructor.cc \
135 genfun_constructor.h \
155 param_polynomial.cc \
170 remove_equalities.h \
171 remove_equalities.c \
194 EXTRA_libbarvinok_la_SOURCES = \
195 basis_reduction_cdd.cc \
196 basis_reduction_glpk.c \
206 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
209 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
212 ZSOLVE_LA = zsolve/libzsolve.la
214 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL_POLYLIB) $(LIB_ISL) \
215 $(POLYLIB_LA) @POLYLIB_LIBS@ \
216 $(PIPLIB_LA) @PIPLIB_LIBS@ \
218 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
220 LDADD = libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
221 @POLYLIB_LIBS@ @PIPLIB_LIBS@
231 barvinok_count_SOURCES = barvinok_count.c
232 barvinok_ehrhart_SOURCES = \
233 barvinok_ehrhart_options.c \
234 barvinok_ehrhart_options.h \
235 barvinok_ehrhart.cc \
236 evalue_convert_options.c \
240 barvinok_union_SOURCES = \
241 barvinok_union_options.c \
242 barvinok_union_options.h \
246 omega_interface/Exit.cc \
247 omega_interface/convert.h \
248 omega_interface/convert.cc \
249 omega_interface/count.h \
250 omega_interface/count.cc
255 FDSTREAM = fdstream.cc fdstream.h
257 barvinok_enumerate_SOURCES = \
258 barvinok_enumerate_options.c \
259 barvinok_enumerate_options.h \
260 barvinok_enumerate.cc \
261 evalue_convert_options.c \
273 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
274 barvinok_enumerate_e_SOURCES = \
275 barvinok_enumerate_e_options.c \
276 barvinok_enumerate_e_options.h \
277 barvinok_enumerate_e.cc \
278 evalue_convert_options.c \
291 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
293 MONA_LIBS = -ldfa -lbdd -lmem
294 PARKER_LA = parker/libparker.la
295 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
296 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
298 barvinok_enumerate_e_CPPFLAGS = \
299 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
300 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
301 barvinok_enumerate_e_LDADD = \
302 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok.la \
303 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@ @PIPLIB_LIBS@
304 barvinok_bound_SOURCES = \
308 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
309 barvinok_bound_LDADD = \
310 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
311 @POLYLIB_LIBS@ @PIPLIB_LIBS@
312 barvinok_summate_SOURCES = \
316 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
317 4coins_SOURCES = 4coins.cc
318 semigroup_holes_SOURCES = semigroup_holes.cc
331 test_approx_SOURCES = \
335 test_bound_SOURCES = \
339 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
341 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
342 @POLYLIB_LIBS@ @PIPLIB_LIBS@
343 evalue_convert_SOURCES = \
344 evalue_convert_main.c \
345 evalue_convert_options.c \
357 iscc_CPPFLAGS = @CLOOG_CFLAGS@ $(AM_CPPFLAGS)
359 libbarvinok.la @CLOOG_LIBS@ @CLOOG_LIBS@ @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
360 @POLYLIB_LIBS@ @PIPLIB_LIBS@
362 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
369 basis_reduction_templ.c \
371 polysign_cdd_template.cc \
372 barvinok/NTL.h.broken \
373 barvinok/NTL.h.normal \
374 barvinok/set.h.broken \
375 barvinok/set.h.normal \
378 doc/applications.tex \
387 polymake/Makefile.in \
389 polymake/autogen.sh \
390 polymake/configure.in \
391 polymake/convert.cc \
393 polymake/h_star_vector.cc \
394 polymake/lattice_points.cc
396 ACLOCAL_AMFLAGS = -I m4
399 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
400 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
403 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
406 (cd $(distdir)/polymake; \
407 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
408 (cd doc; make barvinok.pdf)
409 cp doc/barvinok.pdf $(distdir)/doc/
410 if test -f $(top_srcdir)/.git/HEAD; then \
411 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
413 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
417 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
419 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
421 check: check-testlib check-enumerate check-enumerate_e check-test \
422 check-lexmin check-approx check-pwqp check-euler check-lw
423 check-testlib: testlib$(EXEEXT)
425 check-approx: test_approx$(EXEEXT)
426 @for i in $(top_srcdir)/tests/ehrhart/*; do \
427 if test -f $$i; then \
428 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
431 check-pwqp: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
432 @for i in $(top_srcdir)/tests/pwqp/*; do \
433 if test -f $$i; then \
435 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
436 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
437 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
440 check-euler: barvinok_summate$(EXEEXT)
441 @for i in $(top_srcdir)/tests/euler/*; do \
442 if test -f $$i; then \
443 for method in 'euler' 'laurent_old' 'laurent'; do \
444 opt="--summation=$$method"; \
446 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
451 TOPCOM_CD = '--chamber-decomposition=topcom'
453 ISL_CD = '--chamber-decomposition=isl'
454 check-enumerate: barvinok_enumerate$(EXEEXT)
455 @for i in $(top_srcdir)/tests/ehrhart/*; do \
456 if test -f $$i; then \
458 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
459 for spec in 'random' 'bf' 'df'; do \
460 opt="--specialization=$$spec $$options"; \
462 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
465 opt="--summation=bernoulli"; \
467 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
471 SPEC_OMEGA = '--isl --omega'
473 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
474 @for dir in $(BEE_TESTDIRS); do \
475 for i in $(top_srcdir)/tests/$$dir/*; do \
476 if test -f $$i; then \
477 for options in '' $(SPEC_OMEGA) '--isl'; do \
478 for spec in 'random' 'bf' 'df'; do \
479 opt="--specialization=$$spec $$options"; \
481 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
487 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
488 if test -f $$i; then \
489 for spec in 'random' 'bf' 'df'; do \
490 opt="--specialization=$$spec --scarf"; \
492 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
495 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
498 check-test: test$(EXEEXT)
500 for i in $(top_srcdir)/tests/*; do \
501 if test -f $$i; then \
502 for options in '--index=10' '--primal --index=10'; do \
503 for spec in 'random' 'bf' 'df' 'todd'; do \
504 opt="--specialization=$$spec $$options"; \
506 ./test$(EXEEXT) $$opt < $$i; \
507 if test "$$?" -ne "0"; then \
508 failed=`expr $$failed + 1`; \
517 for i in $(top_srcdir)/tests/sample/*; do \
519 ./test$(EXEEXT) < $$i; \
520 if test "$$?" -ne "0"; then \
521 failed=`expr $$failed + 1`; \
527 if test $$failed != 0; then \
528 echo "$$failed tests failed"; \
531 check-lw: test$(EXEEXT)
533 for i in $(top_srcdir)/tests/lattice_width/*; do \
534 if test -f $$i; then \
536 ./test$(EXEEXT) < $$i; \
537 if test "$$?" -ne "0"; then \
538 failed=`expr $$failed + 1`; \
545 if test $$failed != 0; then \
546 echo "$$failed tests failed"; \
550 check-lexmin: lexmin$(EXEEXT)
551 @for i in $(top_srcdir)/tests/lexmin/*; do \
552 if test -f $$i; then \
553 for spec in 'random' 'bf' 'df'; do \
554 opt="--specialization=$$spec"; \
556 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
564 version.h: @GIT_HEAD@
565 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@