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 \
151 param_polynomial.cc \
167 remove_equalities.h \
168 remove_equalities.c \
191 EXTRA_libbarvinok_la_SOURCES = \
192 basis_reduction_cdd.cc \
193 basis_reduction_glpk.c \
203 ZSOLVE_LA = zsolve/libzsolve.la
205 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL) \
206 $(LIB_POLYLIB) $(ZSOLVE_LA)
207 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
209 LDADD = libbarvinok.la $(LIB_ISL) $(LIB_POLYLIB)
217 barvinok_count_SOURCES = barvinok_count.c
218 barvinok_ehrhart_SOURCES = \
219 barvinok_ehrhart_options.c \
220 barvinok_ehrhart_options.h \
221 barvinok_ehrhart.cc \
222 evalue_convert_options.c \
226 barvinok_union_SOURCES = \
227 barvinok_union_options.c \
228 barvinok_union_options.h \
232 omega_interface/Exit.cc \
233 omega_interface/convert.h \
234 omega_interface/convert.cc \
235 omega_interface/count.h \
236 omega_interface/count.cc
241 FDSTREAM = fdstream.cc fdstream.h
243 barvinok_enumerate_SOURCES = \
244 barvinok_enumerate_options.c \
245 barvinok_enumerate_options.h \
246 barvinok_enumerate.cc \
247 evalue_convert_options.c \
259 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
260 barvinok_enumerate_e_SOURCES = \
261 barvinok_enumerate_e_options.c \
262 barvinok_enumerate_e_options.h \
263 barvinok_enumerate_e.cc \
264 evalue_convert_options.c \
277 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
279 MONA_LIBS = -ldfa -lbdd -lmem
280 PARKER_LA = parker/libparker.la
281 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
282 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
284 barvinok_enumerate_e_CPPFLAGS = \
285 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
286 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
287 barvinok_enumerate_e_LDADD = \
288 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ libbarvinok.la \
289 $(LIB_ISL) $(LIB_POLYLIB)
290 barvinok_bound_SOURCES = \
294 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
295 barvinok_summate_SOURCES = \
299 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
300 4coins_SOURCES = 4coins.cc
301 semigroup_holes_SOURCES = semigroup_holes.cc
312 test_approx_SOURCES = \
316 test_bound_SOURCES = \
320 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
327 iscc_CPPFLAGS = @PET_CFLAGS@ $(AM_CPPFLAGS)
329 libbarvinok.la $(LIB_PET) $(LIB_ISL) \
332 isl.py: interface/isl.py.top
333 (cat $(srcdir)/interface/isl.py.top; \
334 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT) $(DEFAULT_INCLUDES) @ISL_CFLAGS@ $(srcdir)/interface/all.h) \
337 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
344 basis_reduction_templ.c \
346 polysign_cdd_template.cc \
347 barvinok/NTL.h.broken \
348 barvinok/NTL.h.normal \
349 barvinok/set.h.broken \
350 barvinok/set.h.normal \
353 doc/applications.tex \
363 interface/isl.py.top \
364 polymake/Makefile.in \
366 polymake/autogen.sh \
367 polymake/configure.in \
368 polymake/convert.cc \
370 polymake/h_star_vector.cc \
371 polymake/lattice_points.cc
373 ACLOCAL_AMFLAGS = -I m4
376 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
377 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
380 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
383 cp isl.py $(distdir)/
384 (cd $(distdir)/polymake; \
385 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
386 (cd doc; make barvinok.pdf)
387 cp doc/barvinok.pdf $(distdir)/doc/
388 if test -f $(top_srcdir)/.git/HEAD; then \
389 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
391 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
395 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
397 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
399 check: check-testlib check-enumerate check-enumerate_e check-test \
400 check-lexmin check-approx check-pwqp check-euler check-lw check-iscc
401 check-testlib: testlib$(EXEEXT)
403 check-approx: test_approx$(EXEEXT)
404 @for i in $(top_srcdir)/tests/ehrhart/*; do \
405 if test -f $$i; then \
406 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
409 check-pwqp: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
410 @for i in $(top_srcdir)/tests/pwqp/*; do \
411 if test -f $$i; then \
413 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
414 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
415 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
418 check-euler: barvinok_summate$(EXEEXT)
419 @for i in $(top_srcdir)/tests/euler/*; do \
420 if test -f $$i; then \
421 for method in 'euler' 'laurent_old' 'laurent'; do \
422 opt="--summation=$$method"; \
424 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
429 TOPCOM_CD = '--chamber-decomposition=topcom'
431 ISL_CD = '--chamber-decomposition=isl'
432 check-enumerate: barvinok_enumerate$(EXEEXT)
433 @for i in $(top_srcdir)/tests/ehrhart/*; do \
434 if test -f $$i; then \
436 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
437 for spec in 'random' 'bf' 'df'; do \
438 opt="--specialization=$$spec $$options"; \
440 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
443 opt="--summation=bernoulli"; \
445 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
449 SPEC_OMEGA = '--isl --omega'
451 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
452 @for dir in $(BEE_TESTDIRS); do \
453 for i in $(top_srcdir)/tests/$$dir/*; do \
454 if test -f $$i; then \
455 for options in '' $(SPEC_OMEGA) '--isl'; do \
456 for spec in 'random' 'bf' 'df'; do \
457 opt="--specialization=$$spec $$options"; \
459 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
465 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
466 if test -f $$i; then \
467 for spec in 'random' 'bf' 'df'; do \
468 opt="--specialization=$$spec --scarf"; \
470 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
473 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
476 check-test: test$(EXEEXT)
478 for i in $(top_srcdir)/tests/*; do \
479 if test -f $$i; then \
480 for options in '--index=10' '--primal --index=10'; do \
481 for spec in 'random' 'bf' 'df' 'todd'; do \
482 opt="--specialization=$$spec $$options"; \
484 ./test$(EXEEXT) $$opt < $$i; \
485 if test "$$?" -ne "0"; then \
486 failed=`expr $$failed + 1`; \
495 for i in $(top_srcdir)/tests/sample/*; do \
497 ./test$(EXEEXT) < $$i; \
498 if test "$$?" -ne "0"; then \
499 failed=`expr $$failed + 1`; \
505 if test $$failed != 0; then \
506 echo "$$failed tests failed"; \
509 check-lw: test$(EXEEXT)
511 for i in $(top_srcdir)/tests/lattice_width/*; do \
512 if test -f $$i; then \
514 ./test$(EXEEXT) < $$i; \
515 if test "$$?" -ne "0"; then \
516 failed=`expr $$failed + 1`; \
523 if test $$failed != 0; then \
524 echo "$$failed tests failed"; \
527 check-lexmin: lexmin$(EXEEXT)
528 @for i in $(top_srcdir)/tests/lexmin/*; do \
529 if test -f $$i; then \
530 for spec in 'random' 'bf' 'df'; do \
531 opt="--specialization=$$spec"; \
533 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
537 check-iscc: iscc$(EXEEXT)
538 @for i in $(top_srcdir)/tests/iscc/*; do \
539 if test -f $$i; then \
541 ./iscc$(EXEEXT) < $$i || exit; \
545 version.h: @GIT_HEAD@
546 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@