2 MAYBE_POLYLIB = polylib
3 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
7 ISL_LA = $(top_builddir)/isl/libisl.la
8 LOCAL_ISL_LA = isl/libisl.la
11 ISL_LA = $(ISL_BUILDDIR)/libisl.la
15 PET_LA = $(top_builddir)/pet/libpet.la
18 PET_LA = $(PET_BUILDDIR)/libpet.la
26 SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_PET) \
27 $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . doc
28 DIST_SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_PET) \
32 polylib/libpolylibgmp.la: FORCE
33 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
35 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
36 pet/libpet.la: $(LOCAL_ISL_LA) FORCE
37 cd pet; $(MAKE) $(AM_MAKEFLAGS) libpet.la
38 zsolve/libzsolve.la: FORCE
39 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
40 parker/libparker.la: FORCE
41 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
43 AM_CPPFLAGS = @POLYLIB_CPPFLAGS@ \
44 @ISL_CFLAGS@ @NTL_CPPFLAGS@
45 AM_LDFLAGS = @BV_LDFLAGS@ @POLYLIB_LDFLAGS@ @NTL_LDFLAGS@
47 LIB_ISL = $(ISL_LA) @ISL_LIBS@
48 LIB_PET = $(PET_LA) @PET_LIBS@
49 LIB_POLYLIB = $(POLYLIB_LA) @POLYLIB_LIBS@
51 lib_LTLIBRARIES = libbarvinok.la
52 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
54 noinst_PROGRAMS = test testlib randomtest \
55 barvinok_union polytope_volume test_approx \
58 @bv_cone_hilbert_basis@ cone_integer_hull \
59 polyhedron_integer_hull vector_partition_chambers \
61 barvinok_bound test_bound
62 EXTRA_PROGRAMS = cone_hilbert_basis
63 pkginclude_HEADERS = \
73 barvinok/basis_reduction.h
74 nodist_pkginclude_HEADERS = \
80 BR_CDD = basis_reduction_cdd.cc initcdd.cc
81 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
84 BR_GLPK = basis_reduction_glpk.c
85 POLYSIGN_GLPK = polysign_glpk.c
88 TOPCOM = topcom.c topcom.h
93 libbarvinok_la_SOURCES = \
121 genfun_constructor.cc \
122 genfun_constructor.h \
147 param_polynomial.cc \
162 remove_equalities.h \
163 remove_equalities.c \
185 EXTRA_libbarvinok_la_SOURCES = \
186 basis_reduction_cdd.cc \
187 basis_reduction_glpk.c \
197 ZSOLVE_LA = zsolve/libzsolve.la
199 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL) \
200 $(LIB_POLYLIB) $(ZSOLVE_LA)
201 libbarvinok_la_LDFLAGS = @BV_LIB_LDFLAGS@ -version-info @versioninfo@ \
203 LDADD = libbarvinok.la $(LIB_ISL) $(LIB_POLYLIB)
211 barvinok_count_SOURCES = barvinok_count.c
212 barvinok_ehrhart_SOURCES = \
213 barvinok_ehrhart_options.c \
214 barvinok_ehrhart_options.h \
215 barvinok_ehrhart.cc \
216 evalue_convert_options.c \
220 barvinok_union_SOURCES = \
221 barvinok_union_options.c \
222 barvinok_union_options.h \
226 omega_interface/Exit.cc \
227 omega_interface/convert.h \
228 omega_interface/convert.cc \
229 omega_interface/count.h \
230 omega_interface/count.cc
235 FDSTREAM = fdstream.cc fdstream.h
237 barvinok_enumerate_SOURCES = \
238 barvinok_enumerate_options.c \
239 barvinok_enumerate_options.h \
240 barvinok_enumerate.cc \
241 evalue_convert_options.c \
251 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
252 barvinok_enumerate_e_SOURCES = \
253 barvinok_enumerate_e_options.c \
254 barvinok_enumerate_e_options.h \
255 barvinok_enumerate_e.cc \
256 evalue_convert_options.c \
269 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
271 MONA_LIBS = -ldfa -lbdd -lmem
272 PARKER_LA = parker/libparker.la
273 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
274 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
276 barvinok_enumerate_e_CPPFLAGS = \
277 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
278 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
279 barvinok_enumerate_e_LDADD = \
280 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ libbarvinok.la \
281 $(LIB_ISL) $(LIB_POLYLIB)
282 barvinok_bound_SOURCES = \
286 barvinok_summate_SOURCES = \
290 4coins_SOURCES = 4coins.cc
291 semigroup_holes_SOURCES = semigroup_holes.cc
302 test_approx_SOURCES = \
306 test_bound_SOURCES = \
316 iscc_CPPFLAGS = @PET_CFLAGS@ $(AM_CPPFLAGS)
318 libbarvinok.la $(LIB_PET) $(LIB_ISL) \
322 # dummy library that captures the dependencies on all headers
323 # that are relevant for the bindings
324 noinst_LIBRARIES = libdep.a
325 libdep_a_CPPFLAGS = $(DEFAULT_INCLUDES) @ISL_CFLAGS@ -I"@ISL_SRCDIR@"
326 libdep_a_SOURCES = interface/all_barvinok.c
328 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT):
329 $(MAKE) -C @ISL_BUILDDIR@ interface/extract_interface$(EXEEXT)
331 isl.py: libdep.a interface/isl.py.top \
332 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT)
333 (cat interface/isl.py.top && \
334 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT) \
336 $(DEFAULT_INCLUDES) @ISL_CFLAGS@ -I"@ISL_SRCDIR@" \
337 $(srcdir)/interface/all_barvinok.h) \
338 > $@ || (rm $@ && false)
341 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
349 barvinok-uninstalled.sh \
350 barvinok-uninstalled.pc \
363 basis_reduction_templ.c \
365 polysign_cdd_template.cc \
366 barvinok/NTL.h.broken \
367 barvinok/NTL.h.normal \
368 barvinok/set.h.broken \
369 barvinok/set.h.normal \
373 doc/applications.tex \
383 interface/all_barvinok.h \
384 interface/isl.py.top.no_pet \
385 interface/isl.py.top.pet \
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 cp isl.py $(distdir)/
406 (cd $(distdir)/polymake; \
407 ./autogen.sh; rm -rf 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-iscc \
424 check-testlib: testlib$(EXEEXT)
426 check-approx: test_approx$(EXEEXT)
427 @for i in $(top_srcdir)/tests/ehrhart/*; do \
428 if test -f $$i; then \
429 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
432 check-pwqp: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
433 @for i in $(top_srcdir)/tests/pwqp/*; do \
434 if test -f $$i; then \
436 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
437 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
438 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
441 @echo $(top_srcdir)/tests/pwqp/hong1.pwqp --iterate
442 @./barvinok_bound$(EXEEXT) --iterate -T -r30 < \
443 $(top_srcdir)/tests/pwqp/hong1.pwqp || exit
444 check-euler: barvinok_summate$(EXEEXT)
445 @for i in $(top_srcdir)/tests/euler/*; do \
446 if test -f $$i; then \
447 for method in 'euler' 'laurent_old' 'laurent'; do \
448 opt="--summation=$$method"; \
450 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
454 @for t in dull EML_p EML-product EML line square square_p square_p2 \
455 square_p3 triangle triangle2 triangle_p quasi; do \
456 i=$(top_srcdir)/tests/euler/$$t.pwqp; \
457 if test -f $$i; then \
458 opt="--summation=box"; \
460 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
463 @for t in dull dull_p EML line square square_p square_p2 \
464 square_p3 triangle triangle2 triangle_p; do \
465 i=$(top_srcdir)/tests/euler/$$t.pwqp; \
466 if test -f $$i; then \
467 opt="--summation=bernoulli"; \
469 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
473 TOPCOM_CD = '--chamber-decomposition=topcom'
475 ISL_CD = '--chamber-decomposition=isl'
476 check-enumerate: barvinok_enumerate$(EXEEXT)
477 @for i in $(top_srcdir)/tests/ehrhart/*; do \
478 if test -f $$i; then \
480 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
481 for spec in 'random' 'bf' 'df'; do \
482 opt="--specialization=$$spec $$options"; \
484 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
489 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
490 opt="--summation=bernoulli"; \
492 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
496 SPEC_OMEGA = '--isl --omega'
498 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
499 @for dir in $(BEE_TESTDIRS); do \
500 for i in $(top_srcdir)/tests/$$dir/*; do \
501 if test -f $$i; then \
502 for options in '' $(SPEC_OMEGA) '--isl'; do \
503 for spec in 'random' 'bf' 'df'; do \
504 opt="--specialization=$$spec $$options"; \
506 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
512 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
513 if test -f $$i; then \
514 for spec in 'random' 'bf' 'df'; do \
515 opt="--specialization=$$spec --scarf"; \
517 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
520 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
523 check-test: iscc$(EXEEXT)
525 for i in $(top_srcdir)/tests/iscc/count/*; do \
526 if test -f $$i; then \
527 for options in '--index=10' '--primal --index=10'; do \
528 for spec in 'random' 'bf' 'df' 'todd'; do \
529 opt="--specialization=$$spec $$options"; \
531 ./iscc$(EXEEXT) $$opt < $$i; \
532 if test "$$?" -ne "0"; then \
533 failed=`expr $$failed + 1`; \
542 if test $$failed != 0; then \
543 echo "$$failed tests failed"; \
546 check-lexmin: lexmin$(EXEEXT)
547 @for i in $(top_srcdir)/tests/lexmin/*; do \
548 if test -f $$i; then \
549 for spec in 'random' 'bf' 'df'; do \
550 opt="--specialization=$$spec"; \
552 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
556 check-iscc: iscc$(EXEEXT)
557 @for i in $(top_srcdir)/tests/iscc/*; do \
558 if test -f $$i; then \
560 ./iscc$(EXEEXT) < $$i || exit; \
563 check-union: barvinok_union$(EXEEXT)
564 @for i in $(top_srcdir)/tests/ehrhart_union/*; do \
565 if test -f $$i; then \
566 for spec in 'random' 'bf' 'df'; do \
567 opt="--specialization=$$spec $$options"; \
569 ./barvinok_union$(EXEEXT) -c $$opt < $$i || exit; \
574 version.h: @GIT_HEAD@
575 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@