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
21 if BUNDLED_ISL_POLYLIB
22 MAYBE_ISL_POLYLIB = isl-polylib
23 ISL_POLYLIB_LA = $(top_builddir)/isl-polylib/libisl-polylib.la
27 CLOOG_LA = $(top_builddir)/cloog/libcloog-isl.la
35 SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_PET) $(MAYBE_ISL_POLYLIB) \
37 $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . doc
38 DIST_SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_PET) \
39 $(MAYBE_ISL_POLYLIB) $(MAYBE_CLOOG) \
43 polylib/libpolylibgmp.la: FORCE
44 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
46 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
48 cd pet; $(MAKE) $(AM_MAKEFLAGS) libpet.la
49 isl-polylib/libisl-polylib.la: $(LOCAL_ISL_LA) $(LOCAL_POLYLIB_LA) FORCE
50 cd isl-polylib; $(MAKE) $(AM_MAKEFLAGS) libisl-polylib.la
51 cloog/libcloog-isl.la: $(LOCAL_ISL_LA) FORCE
52 cd cloog; $(MAKE) $(AM_MAKEFLAGS) libcloog-isl.la
53 zsolve/libzsolve.la: FORCE
54 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
55 parker/libparker.la: FORCE
56 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
58 AM_CPPFLAGS = @POLYLIB_CPPFLAGS@ \
59 @ISL_CFLAGS@ @ISL_POLYLIB_CFLAGS@ @NTL_CPPFLAGS@
60 AM_LDFLAGS = @POLYLIB_LDFLAGS@ @NTL_LDFLAGS@
62 LIB_ISL = $(ISL_LA) @ISL_LIBS@
63 LIB_PET = $(PET_LA) @PET_LIBS@
64 LIB_ISL_POLYLIB = $(ISL_POLYLIB_LA) @ISL_POLYLIB_LIBS@
65 LIB_CLOOG = $(CLOOG_LA) @CLOOG_LIBS@
66 LIB_POLYLIB = $(POLYLIB_LA) @POLYLIB_LIBS@
68 lib_LTLIBRARIES = libbarvinok.la
69 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
70 barvinok_ehrhart polytope_scan iscc
71 noinst_PROGRAMS = test testlib randomtest \
72 remove_redundant_equalities \
73 barvinok_union polytope_volume test_approx \
74 barvinok_summate verify_lexsmaller \
75 polyhedron_sample 4coins lexmin \
76 @bv_cone_hilbert_basis@ cone_integer_hull \
77 polytope_lattice_width \
78 polyhedron_integer_hull vector_partition_chambers \
80 barvinok_bound test_bound
81 EXTRA_PROGRAMS = cone_hilbert_basis
82 pkginclude_HEADERS = \
92 barvinok/basis_reduction.h
93 nodist_pkginclude_HEADERS = \
99 BR_CDD = basis_reduction_cdd.cc initcdd.cc
100 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
103 BR_GLPK = basis_reduction_glpk.c
104 POLYSIGN_GLPK = polysign_glpk.c
107 TOPCOM = topcom.c topcom.h
110 HILBERT_C = hilbert.c
112 libbarvinok_la_SOURCES = \
116 barvinok/barvinok.h \
140 genfun_constructor.cc \
141 genfun_constructor.h \
161 param_polynomial.cc \
177 remove_equalities.h \
178 remove_equalities.c \
201 EXTRA_libbarvinok_la_SOURCES = \
202 basis_reduction_cdd.cc \
203 basis_reduction_glpk.c \
213 ZSOLVE_LA = zsolve/libzsolve.la
215 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL_POLYLIB) $(LIB_ISL) \
216 $(LIB_POLYLIB) $(ZSOLVE_LA)
217 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
219 LDADD = libbarvinok.la $(LIB_ISL_POLYLIB) $(LIB_ISL) $(LIB_POLYLIB)
227 barvinok_count_SOURCES = barvinok_count.c
228 barvinok_ehrhart_SOURCES = \
229 barvinok_ehrhart_options.c \
230 barvinok_ehrhart_options.h \
231 barvinok_ehrhart.cc \
232 evalue_convert_options.c \
236 barvinok_union_SOURCES = \
237 barvinok_union_options.c \
238 barvinok_union_options.h \
242 omega_interface/Exit.cc \
243 omega_interface/convert.h \
244 omega_interface/convert.cc \
245 omega_interface/count.h \
246 omega_interface/count.cc
251 FDSTREAM = fdstream.cc fdstream.h
253 barvinok_enumerate_SOURCES = \
254 barvinok_enumerate_options.c \
255 barvinok_enumerate_options.h \
256 barvinok_enumerate.cc \
257 evalue_convert_options.c \
269 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
270 barvinok_enumerate_e_SOURCES = \
271 barvinok_enumerate_e_options.c \
272 barvinok_enumerate_e_options.h \
273 barvinok_enumerate_e.cc \
274 evalue_convert_options.c \
287 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
289 MONA_LIBS = -ldfa -lbdd -lmem
290 PARKER_LA = parker/libparker.la
291 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
292 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
294 barvinok_enumerate_e_CPPFLAGS = \
295 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
296 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
297 barvinok_enumerate_e_LDADD = \
298 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ libbarvinok.la \
299 $(LIB_ISL_POLYLIB) $(LIB_ISL) $(LIB_POLYLIB)
300 barvinok_bound_SOURCES = \
304 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
305 barvinok_summate_SOURCES = \
309 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
310 4coins_SOURCES = 4coins.cc
311 semigroup_holes_SOURCES = semigroup_holes.cc
322 test_approx_SOURCES = \
326 test_bound_SOURCES = \
330 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
337 iscc_CPPFLAGS = @PET_CFLAGS@ @CLOOG_CFLAGS@ $(AM_CPPFLAGS)
339 libbarvinok.la $(LIB_CLOOG) $(LIB_ISL_POLYLIB) $(LIB_PET) $(LIB_ISL) \
342 isl.py: interface/isl.py.top
343 (cat $(srcdir)/interface/isl.py.top; \
344 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT) $(DEFAULT_INCLUDES) @ISL_CFLAGS@ $(srcdir)/interface/all.h) \
347 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
354 basis_reduction_templ.c \
356 polysign_cdd_template.cc \
357 barvinok/NTL.h.broken \
358 barvinok/NTL.h.normal \
359 barvinok/set.h.broken \
360 barvinok/set.h.normal \
363 doc/applications.tex \
372 polymake/Makefile.in \
374 polymake/autogen.sh \
375 polymake/configure.in \
376 polymake/convert.cc \
378 polymake/h_star_vector.cc \
379 polymake/lattice_points.cc
381 ACLOCAL_AMFLAGS = -I m4
384 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
385 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
388 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
391 (cd $(distdir)/polymake; \
392 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
393 (cd doc; make barvinok.pdf)
394 cp doc/barvinok.pdf $(distdir)/doc/
395 if test -f $(top_srcdir)/.git/HEAD; then \
396 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
398 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
402 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
404 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
406 check: check-testlib check-enumerate check-enumerate_e check-test \
407 check-lexmin check-approx check-pwqp check-euler check-lw check-iscc
408 check-testlib: testlib$(EXEEXT)
410 check-approx: test_approx$(EXEEXT)
411 @for i in $(top_srcdir)/tests/ehrhart/*; do \
412 if test -f $$i; then \
413 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
416 check-pwqp: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
417 @for i in $(top_srcdir)/tests/pwqp/*; do \
418 if test -f $$i; then \
420 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
421 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
422 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
425 check-euler: barvinok_summate$(EXEEXT)
426 @for i in $(top_srcdir)/tests/euler/*; do \
427 if test -f $$i; then \
428 for method in 'euler' 'laurent_old' 'laurent'; do \
429 opt="--summation=$$method"; \
431 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
436 TOPCOM_CD = '--chamber-decomposition=topcom'
438 ISL_CD = '--chamber-decomposition=isl'
439 check-enumerate: barvinok_enumerate$(EXEEXT)
440 @for i in $(top_srcdir)/tests/ehrhart/*; do \
441 if test -f $$i; then \
443 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
444 for spec in 'random' 'bf' 'df'; do \
445 opt="--specialization=$$spec $$options"; \
447 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
450 opt="--summation=bernoulli"; \
452 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
456 SPEC_OMEGA = '--isl --omega'
458 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
459 @for dir in $(BEE_TESTDIRS); do \
460 for i in $(top_srcdir)/tests/$$dir/*; do \
461 if test -f $$i; then \
462 for options in '' $(SPEC_OMEGA) '--isl'; do \
463 for spec in 'random' 'bf' 'df'; do \
464 opt="--specialization=$$spec $$options"; \
466 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
472 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
473 if test -f $$i; then \
474 for spec in 'random' 'bf' 'df'; do \
475 opt="--specialization=$$spec --scarf"; \
477 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
480 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
483 check-test: test$(EXEEXT)
485 for i in $(top_srcdir)/tests/*; do \
486 if test -f $$i; then \
487 for options in '--index=10' '--primal --index=10'; do \
488 for spec in 'random' 'bf' 'df' 'todd'; do \
489 opt="--specialization=$$spec $$options"; \
491 ./test$(EXEEXT) $$opt < $$i; \
492 if test "$$?" -ne "0"; then \
493 failed=`expr $$failed + 1`; \
502 for i in $(top_srcdir)/tests/sample/*; do \
504 ./test$(EXEEXT) < $$i; \
505 if test "$$?" -ne "0"; then \
506 failed=`expr $$failed + 1`; \
512 if test $$failed != 0; then \
513 echo "$$failed tests failed"; \
516 check-lw: test$(EXEEXT)
518 for i in $(top_srcdir)/tests/lattice_width/*; do \
519 if test -f $$i; then \
521 ./test$(EXEEXT) < $$i; \
522 if test "$$?" -ne "0"; then \
523 failed=`expr $$failed + 1`; \
530 if test $$failed != 0; then \
531 echo "$$failed tests failed"; \
534 check-lexmin: lexmin$(EXEEXT)
535 @for i in $(top_srcdir)/tests/lexmin/*; do \
536 if test -f $$i; then \
537 for spec in 'random' 'bf' 'df'; do \
538 opt="--specialization=$$spec"; \
540 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
544 check-iscc: iscc$(EXEEXT)
545 @for i in $(top_srcdir)/tests/iscc/*; do \
546 if test -f $$i; then \
548 ./iscc$(EXEEXT) < $$i || exit; \
552 version.h: @GIT_HEAD@
553 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@