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@
67 lib_LTLIBRARIES = libbarvinok.la
68 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
69 barvinok_ehrhart polytope_scan iscc
70 noinst_PROGRAMS = test testlib randomtest \
71 remove_redundant_equalities \
72 barvinok_union polytope_volume test_approx \
73 barvinok_summate verify_lexsmaller \
74 polyhedron_sample 4coins lexmin \
75 @bv_cone_hilbert_basis@ cone_integer_hull \
76 polytope_lattice_width \
77 polyhedron_integer_hull vector_partition_chambers \
79 barvinok_bound test_bound
80 EXTRA_PROGRAMS = cone_hilbert_basis
81 pkginclude_HEADERS = \
91 barvinok/basis_reduction.h
92 nodist_pkginclude_HEADERS = \
98 BR_CDD = basis_reduction_cdd.cc initcdd.cc
99 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
102 BR_GLPK = basis_reduction_glpk.c
103 POLYSIGN_GLPK = polysign_glpk.c
106 TOPCOM = topcom.c topcom.h
109 HILBERT_C = hilbert.c
111 libbarvinok_la_SOURCES = \
115 barvinok/barvinok.h \
139 genfun_constructor.cc \
140 genfun_constructor.h \
160 param_polynomial.cc \
176 remove_equalities.h \
177 remove_equalities.c \
200 EXTRA_libbarvinok_la_SOURCES = \
201 basis_reduction_cdd.cc \
202 basis_reduction_glpk.c \
212 ZSOLVE_LA = zsolve/libzsolve.la
214 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL_POLYLIB) $(LIB_ISL) \
215 $(POLYLIB_LA) @POLYLIB_LIBS@ \
217 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
219 LDADD = libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
228 barvinok_count_SOURCES = barvinok_count.c
229 barvinok_ehrhart_SOURCES = \
230 barvinok_ehrhart_options.c \
231 barvinok_ehrhart_options.h \
232 barvinok_ehrhart.cc \
233 evalue_convert_options.c \
237 barvinok_union_SOURCES = \
238 barvinok_union_options.c \
239 barvinok_union_options.h \
243 omega_interface/Exit.cc \
244 omega_interface/convert.h \
245 omega_interface/convert.cc \
246 omega_interface/count.h \
247 omega_interface/count.cc
252 FDSTREAM = fdstream.cc fdstream.h
254 barvinok_enumerate_SOURCES = \
255 barvinok_enumerate_options.c \
256 barvinok_enumerate_options.h \
257 barvinok_enumerate.cc \
258 evalue_convert_options.c \
270 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
271 barvinok_enumerate_e_SOURCES = \
272 barvinok_enumerate_e_options.c \
273 barvinok_enumerate_e_options.h \
274 barvinok_enumerate_e.cc \
275 evalue_convert_options.c \
288 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
290 MONA_LIBS = -ldfa -lbdd -lmem
291 PARKER_LA = parker/libparker.la
292 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
293 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
295 barvinok_enumerate_e_CPPFLAGS = \
296 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
297 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
298 barvinok_enumerate_e_LDADD = \
299 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ libbarvinok.la \
300 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@
301 barvinok_bound_SOURCES = \
305 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
306 barvinok_bound_LDADD = \
307 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
309 barvinok_summate_SOURCES = \
313 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
314 4coins_SOURCES = 4coins.cc
315 semigroup_holes_SOURCES = semigroup_holes.cc
326 test_approx_SOURCES = \
330 test_bound_SOURCES = \
334 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
336 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
344 iscc_CPPFLAGS = @PET_CFLAGS@ @CLOOG_CFLAGS@ $(AM_CPPFLAGS)
346 libbarvinok.la $(LIB_CLOOG) @ISL_POLYLIB_LIBS@ $(LIB_PET) @ISL_LIBS@ \
349 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
356 basis_reduction_templ.c \
358 polysign_cdd_template.cc \
359 barvinok/NTL.h.broken \
360 barvinok/NTL.h.normal \
361 barvinok/set.h.broken \
362 barvinok/set.h.normal \
365 doc/applications.tex \
374 polymake/Makefile.in \
376 polymake/autogen.sh \
377 polymake/configure.in \
378 polymake/convert.cc \
380 polymake/h_star_vector.cc \
381 polymake/lattice_points.cc
383 ACLOCAL_AMFLAGS = -I m4
386 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
387 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
390 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
393 (cd $(distdir)/polymake; \
394 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
395 (cd doc; make barvinok.pdf)
396 cp doc/barvinok.pdf $(distdir)/doc/
397 if test -f $(top_srcdir)/.git/HEAD; then \
398 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
400 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
404 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
406 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
408 check: check-testlib check-enumerate check-enumerate_e check-test \
409 check-lexmin check-approx check-pwqp check-euler check-lw check-iscc
410 check-testlib: testlib$(EXEEXT)
412 check-approx: test_approx$(EXEEXT)
413 @for i in $(top_srcdir)/tests/ehrhart/*; do \
414 if test -f $$i; then \
415 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
418 check-pwqp: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
419 @for i in $(top_srcdir)/tests/pwqp/*; do \
420 if test -f $$i; then \
422 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
423 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
424 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
427 check-euler: barvinok_summate$(EXEEXT)
428 @for i in $(top_srcdir)/tests/euler/*; do \
429 if test -f $$i; then \
430 for method in 'euler' 'laurent_old' 'laurent'; do \
431 opt="--summation=$$method"; \
433 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
438 TOPCOM_CD = '--chamber-decomposition=topcom'
440 ISL_CD = '--chamber-decomposition=isl'
441 check-enumerate: barvinok_enumerate$(EXEEXT)
442 @for i in $(top_srcdir)/tests/ehrhart/*; do \
443 if test -f $$i; then \
445 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
446 for spec in 'random' 'bf' 'df'; do \
447 opt="--specialization=$$spec $$options"; \
449 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
452 opt="--summation=bernoulli"; \
454 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
458 SPEC_OMEGA = '--isl --omega'
460 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
461 @for dir in $(BEE_TESTDIRS); do \
462 for i in $(top_srcdir)/tests/$$dir/*; do \
463 if test -f $$i; then \
464 for options in '' $(SPEC_OMEGA) '--isl'; do \
465 for spec in 'random' 'bf' 'df'; do \
466 opt="--specialization=$$spec $$options"; \
468 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
474 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
475 if test -f $$i; then \
476 for spec in 'random' 'bf' 'df'; do \
477 opt="--specialization=$$spec --scarf"; \
479 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
482 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
485 check-test: test$(EXEEXT)
487 for i in $(top_srcdir)/tests/*; do \
488 if test -f $$i; then \
489 for options in '--index=10' '--primal --index=10'; do \
490 for spec in 'random' 'bf' 'df' 'todd'; do \
491 opt="--specialization=$$spec $$options"; \
493 ./test$(EXEEXT) $$opt < $$i; \
494 if test "$$?" -ne "0"; then \
495 failed=`expr $$failed + 1`; \
504 for i in $(top_srcdir)/tests/sample/*; do \
506 ./test$(EXEEXT) < $$i; \
507 if test "$$?" -ne "0"; then \
508 failed=`expr $$failed + 1`; \
514 if test $$failed != 0; then \
515 echo "$$failed tests failed"; \
518 check-lw: test$(EXEEXT)
520 for i in $(top_srcdir)/tests/lattice_width/*; do \
521 if test -f $$i; then \
523 ./test$(EXEEXT) < $$i; \
524 if test "$$?" -ne "0"; then \
525 failed=`expr $$failed + 1`; \
532 if test $$failed != 0; then \
533 echo "$$failed tests failed"; \
536 check-lexmin: lexmin$(EXEEXT)
537 @for i in $(top_srcdir)/tests/lexmin/*; do \
538 if test -f $$i; then \
539 for spec in 'random' 'bf' 'df'; do \
540 opt="--specialization=$$spec"; \
542 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
546 check-iscc: iscc$(EXEEXT)
547 @for i in $(top_srcdir)/tests/iscc/*; do \
548 if test -f $$i; then \
550 ./iscc$(EXEEXT) < $$i || exit; \
554 version.h: @GIT_HEAD@
555 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@