2 MAYBE_POLYLIB = polylib
3 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
4 LOCAL_POLYLIB_LA = polylib/libpolylibgmp.la
8 ISL_LA = $(top_builddir)/isl/libisl.la
9 LOCAL_ISL_LA = isl/libisl.la
12 ISL_LA = $(ISL_BUILDDIR)/libisl.la
16 PET_LA = $(top_builddir)/pet/libpet.la
19 PET_LA = $(PET_BUILDDIR)/libpet.la
27 SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_PET) \
28 $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . doc
29 DIST_SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_PET) \
33 polylib/libpolylibgmp.la: FORCE
34 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
36 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
38 cd pet; $(MAKE) $(AM_MAKEFLAGS) libpet.la
39 zsolve/libzsolve.la: FORCE
40 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
41 parker/libparker.la: FORCE
42 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
44 AM_CPPFLAGS = @POLYLIB_CPPFLAGS@ \
45 @ISL_CFLAGS@ @NTL_CPPFLAGS@
46 AM_LDFLAGS = @POLYLIB_LDFLAGS@ @NTL_LDFLAGS@
48 LIB_ISL = $(ISL_LA) @ISL_LIBS@
49 LIB_PET = $(PET_LA) @PET_LIBS@
50 LIB_POLYLIB = $(POLYLIB_LA) @POLYLIB_LIBS@
52 lib_LTLIBRARIES = libbarvinok.la
53 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
54 barvinok_ehrhart polytope_scan iscc
55 noinst_PROGRAMS = test testlib randomtest \
56 remove_redundant_equalities \
57 barvinok_union polytope_volume test_approx \
58 barvinok_summate verify_lexsmaller \
59 polyhedron_sample 4coins lexmin \
60 @bv_cone_hilbert_basis@ cone_integer_hull \
61 polytope_lattice_width \
62 polyhedron_integer_hull vector_partition_chambers \
64 barvinok_bound test_bound
65 EXTRA_PROGRAMS = cone_hilbert_basis
66 pkginclude_HEADERS = \
76 barvinok/basis_reduction.h
77 nodist_pkginclude_HEADERS = \
83 BR_CDD = basis_reduction_cdd.cc initcdd.cc
84 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
87 BR_GLPK = basis_reduction_glpk.c
88 POLYSIGN_GLPK = polysign_glpk.c
91 TOPCOM = topcom.c topcom.h
96 libbarvinok_la_SOURCES = \
100 barvinok/barvinok.h \
124 genfun_constructor.cc \
125 genfun_constructor.h \
150 param_polynomial.cc \
165 remove_equalities.h \
166 remove_equalities.c \
188 EXTRA_libbarvinok_la_SOURCES = \
189 basis_reduction_cdd.cc \
190 basis_reduction_glpk.c \
200 ZSOLVE_LA = zsolve/libzsolve.la
202 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL) \
203 $(LIB_POLYLIB) $(ZSOLVE_LA)
204 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
206 LDADD = libbarvinok.la $(LIB_ISL) $(LIB_POLYLIB)
214 barvinok_count_SOURCES = barvinok_count.c
215 barvinok_ehrhart_SOURCES = \
216 barvinok_ehrhart_options.c \
217 barvinok_ehrhart_options.h \
218 barvinok_ehrhart.cc \
219 evalue_convert_options.c \
223 barvinok_union_SOURCES = \
224 barvinok_union_options.c \
225 barvinok_union_options.h \
229 omega_interface/Exit.cc \
230 omega_interface/convert.h \
231 omega_interface/convert.cc \
232 omega_interface/count.h \
233 omega_interface/count.cc
238 FDSTREAM = fdstream.cc fdstream.h
240 barvinok_enumerate_SOURCES = \
241 barvinok_enumerate_options.c \
242 barvinok_enumerate_options.h \
243 barvinok_enumerate.cc \
244 evalue_convert_options.c \
254 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
255 barvinok_enumerate_e_SOURCES = \
256 barvinok_enumerate_e_options.c \
257 barvinok_enumerate_e_options.h \
258 barvinok_enumerate_e.cc \
259 evalue_convert_options.c \
272 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
274 MONA_LIBS = -ldfa -lbdd -lmem
275 PARKER_LA = parker/libparker.la
276 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
277 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
279 barvinok_enumerate_e_CPPFLAGS = \
280 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
281 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
282 barvinok_enumerate_e_LDADD = \
283 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ libbarvinok.la \
284 $(LIB_ISL) $(LIB_POLYLIB)
285 barvinok_bound_SOURCES = \
289 barvinok_summate_SOURCES = \
293 4coins_SOURCES = 4coins.cc
294 semigroup_holes_SOURCES = semigroup_holes.cc
305 test_approx_SOURCES = \
309 test_bound_SOURCES = \
319 iscc_CPPFLAGS = @PET_CFLAGS@ $(AM_CPPFLAGS)
321 libbarvinok.la $(LIB_PET) $(LIB_ISL) \
325 # dummy library that captures the dependencies on all headers
326 # that are relevant for the bindings
327 noinst_LIBRARIES = libdep.a
328 libdep_a_CPPFLAGS = $(DEFAULT_INCLUDES) @ISL_CFLAGS@ -I"@ISL_SRCDIR@"
329 libdep_a_SOURCES = interface/all_barvinok.c
331 isl.py: libdep.a interface/isl.py.top
332 (cat interface/isl.py.top; \
333 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT) \
335 $(DEFAULT_INCLUDES) @ISL_CFLAGS@ -I"@ISL_SRCDIR@" \
336 $(srcdir)/interface/all_barvinok.h) \
340 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
348 barvinok-uninstalled.sh \
349 barvinok-uninstalled.pc \
362 basis_reduction_templ.c \
364 polysign_cdd_template.cc \
365 barvinok/NTL.h.broken \
366 barvinok/NTL.h.normal \
367 barvinok/set.h.broken \
368 barvinok/set.h.normal \
372 doc/applications.tex \
382 interface/all_barvinok.h \
383 interface/isl.py.top.no_pet \
384 interface/isl.py.top.pet \
385 polymake/Makefile.in \
387 polymake/autogen.sh \
388 polymake/configure.in \
389 polymake/convert.cc \
391 polymake/h_star_vector.cc \
392 polymake/lattice_points.cc
394 ACLOCAL_AMFLAGS = -I m4
397 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
398 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
401 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
404 cp isl.py $(distdir)/
405 (cd $(distdir)/polymake; \
406 ./autogen.sh; rm -rf 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-iscc \
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; \
450 @for t in dull EML_p EML-product EML line square square_p square \
451 square_p3 triangle triangle2 triangle_p quasi; do \
452 i=$(top_srcdir)/tests/euler/$$t.pwqp; \
453 if test -f $$i; then \
454 opt="--summation=box"; \
456 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
459 @for t in dull dull_p EML line square square_p square \
460 square_p3 triangle triangle2 triangle_p; do \
461 i=$(top_srcdir)/tests/euler/$$t.pwqp; \
462 if test -f $$i; then \
463 opt="--summation=bernoulli"; \
465 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
469 TOPCOM_CD = '--chamber-decomposition=topcom'
471 ISL_CD = '--chamber-decomposition=isl'
472 check-enumerate: barvinok_enumerate$(EXEEXT)
473 @for i in $(top_srcdir)/tests/ehrhart/*; do \
474 if test -f $$i; then \
476 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
477 for spec in 'random' 'bf' 'df'; do \
478 opt="--specialization=$$spec $$options"; \
480 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
485 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
486 opt="--summation=bernoulli"; \
488 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
492 SPEC_OMEGA = '--isl --omega'
494 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
495 @for dir in $(BEE_TESTDIRS); do \
496 for i in $(top_srcdir)/tests/$$dir/*; do \
497 if test -f $$i; then \
498 for options in '' $(SPEC_OMEGA) '--isl'; do \
499 for spec in 'random' 'bf' 'df'; do \
500 opt="--specialization=$$spec $$options"; \
502 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
508 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
509 if test -f $$i; then \
510 for spec in 'random' 'bf' 'df'; do \
511 opt="--specialization=$$spec --scarf"; \
513 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
516 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
519 check-test: test$(EXEEXT)
521 for i in $(top_srcdir)/tests/*; do \
522 if test -f $$i; then \
523 for options in '--index=10' '--primal --index=10'; do \
524 for spec in 'random' 'bf' 'df' 'todd'; do \
525 opt="--specialization=$$spec $$options"; \
527 ./test$(EXEEXT) $$opt < $$i; \
528 if test "$$?" -ne "0"; then \
529 failed=`expr $$failed + 1`; \
538 for i in $(top_srcdir)/tests/sample/*; do \
540 ./test$(EXEEXT) < $$i; \
541 if test "$$?" -ne "0"; then \
542 failed=`expr $$failed + 1`; \
548 if test $$failed != 0; then \
549 echo "$$failed tests failed"; \
552 check-lexmin: lexmin$(EXEEXT)
553 @for i in $(top_srcdir)/tests/lexmin/*; do \
554 if test -f $$i; then \
555 for spec in 'random' 'bf' 'df'; do \
556 opt="--specialization=$$spec"; \
558 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
562 check-iscc: iscc$(EXEEXT)
563 @for i in $(top_srcdir)/tests/iscc/*; do \
564 if test -f $$i; then \
566 ./iscc$(EXEEXT) < $$i || exit; \
569 check-union: barvinok_union$(EXEEXT)
570 @for i in $(top_srcdir)/tests/ehrhart_union/*; do \
571 if test -f $$i; then \
572 for spec in 'random' 'bf' 'df'; do \
573 opt="--specialization=$$spec $$options"; \
575 ./barvinok_union$(EXEEXT) -c $$opt < $$i || exit; \
580 version.h: @GIT_HEAD@
581 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@