2 MAYBE_POLYLIB = polylib
3 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
4 LOCAL_POLYLIB_LA = polylib/libpolylibgmp.la
11 ISL_LA = $(top_builddir)/isl/libisl.la
12 LOCAL_ISL_LA = isl/libisl.la
15 ISL_LA = $(ISL_BUILDDIR)/libisl.la
17 if BUNDLED_ISL_POLYLIB
18 MAYBE_ISL_POLYLIB = isl-polylib
19 ISL_POLYLIB_LA = $(top_builddir)/isl-polylib/libisl-polylib.la
23 OMEGA_LA = $(top_builddir)/omega/omega_lib/libomega.la
31 SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_ISL_POLYLIB) \
33 $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . doc
34 DIST_SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_ISL) \
35 $(MAYBE_ISL_POLYLIB) $(MAYBE_OMEGA) \
39 polylib/libpolylibgmp.la: FORCE
40 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
41 piplib/libpiplibMP.la: FORCE
42 cd piplib; $(MAKE) $(AM_MAKEFLAGS) libpiplibMP.la
44 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
45 isl-polylib/libisl-polylib.la: $(LOCAL_ISL_LA) $(LOCAL_POLYLIB_LA) FORCE
46 cd isl-polylib; $(MAKE) $(AM_MAKEFLAGS) libisl-polylib.la
47 omega/omega_lib/libomega.la: FORCE
48 cd omega/omega_lib; $(MAKE) $(AM_MAKEFLAGS) libomega.la
49 zsolve/libzsolve.la: FORCE
50 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
51 parker/libparker.la: FORCE
52 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
54 AM_CPPFLAGS = @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ \
55 @ISL_CFLAGS@ @ISL_POLYLIB_CFLAGS@ @NTL_CPPFLAGS@
56 AM_LDFLAGS = @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@ @NTL_LDFLAGS@
58 LIB_ISL = $(ISL_LA) @ISL_LIBS@
59 LIB_ISL_POLYLIB = $(ISL_POLYLIB_LA) @ISL_POLYLIB_LIBS@
61 lib_LTLIBRARIES = libbarvinok.la
62 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
63 barvinok_ehrhart polytope_scan iscc
64 noinst_PROGRAMS = test testlib randomtest \
65 remove_redundant_equalities \
66 barvinok_union polytope_volume test_approx \
67 barvinok_summate verify_lexsmaller \
68 polyhedron_sample 4coins lexmin \
69 @bv_cone_hilbert_basis@ cone_integer_hull \
70 polytope_lattice_width \
71 polyhedron_integer_hull vector_partition_chambers \
72 semigroup_holes evalue_convert \
73 barvinok_bound test_bound
74 EXTRA_PROGRAMS = cone_hilbert_basis
75 pkginclude_HEADERS = \
85 barvinok/basis_reduction.h
86 nodist_pkginclude_HEADERS = \
92 BR_CDD = basis_reduction_cdd.cc initcdd.cc
93 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
96 BR_GLPK = basis_reduction_glpk.c
97 POLYSIGN_GLPK = polysign_glpk.c
100 TOPCOM = topcom.c topcom.h
103 HILBERT_C = hilbert.c
106 BR_PIP = basis_reduction_pip.c basis_reduction_pip_dual.c
107 POLYSIGN_PIP = polysign_pip.c
109 libbarvinok_la_SOURCES = \
113 barvinok/barvinok.h \
137 genfun_constructor.cc \
138 genfun_constructor.h \
158 param_polynomial.cc \
173 remove_equalities.h \
174 remove_equalities.c \
197 EXTRA_libbarvinok_la_SOURCES = \
198 basis_reduction_cdd.cc \
199 basis_reduction_glpk.c \
209 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
212 ZSOLVE_LA = zsolve/libzsolve.la
214 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL_POLYLIB) $(LIB_ISL) \
215 $(POLYLIB_LA) @POLYLIB_LIBS@ \
216 $(PIPLIB_LA) @PIPLIB_LIBS@ \
218 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
220 LDADD = libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
221 @POLYLIB_LIBS@ @PIPLIB_LIBS@
231 barvinok_count_SOURCES = barvinok_count.c
232 barvinok_ehrhart_SOURCES = \
233 barvinok_ehrhart_options.c \
234 barvinok_ehrhart_options.h \
235 barvinok_ehrhart.cc \
236 evalue_convert_options.c \
240 barvinok_union_SOURCES = \
241 barvinok_union_options.c \
242 barvinok_union_options.h \
246 omega_interface/Exit.cc \
247 omega_interface/convert.h \
248 omega_interface/convert.cc \
249 omega_interface/count.h \
250 omega_interface/count.cc
255 FDSTREAM = fdstream.cc fdstream.h
257 barvinok_enumerate_SOURCES = \
258 barvinok_enumerate_options.c \
259 barvinok_enumerate_options.h \
260 barvinok_enumerate.cc \
261 evalue_convert_options.c \
273 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
274 barvinok_enumerate_e_SOURCES = \
275 barvinok_enumerate_e_options.c \
276 barvinok_enumerate_e_options.h \
277 barvinok_enumerate_e.cc \
278 evalue_convert_options.c \
291 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
293 MONA_LIBS = -ldfa -lbdd -lmem
294 PARKER_LA = parker/libparker.la
295 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
296 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
298 barvinok_enumerate_e_CPPFLAGS = \
299 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
300 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
301 barvinok_enumerate_e_LDADD = \
302 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok.la \
303 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@ @PIPLIB_LIBS@
304 barvinok_bound_SOURCES = \
308 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
309 barvinok_bound_LDADD = \
310 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
311 @POLYLIB_LIBS@ @PIPLIB_LIBS@
312 barvinok_summate_SOURCES = \
316 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
317 4coins_SOURCES = 4coins.cc
318 semigroup_holes_SOURCES = semigroup_holes.cc
329 test_approx_SOURCES = \
333 test_bound_SOURCES = \
337 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
339 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
340 @POLYLIB_LIBS@ @PIPLIB_LIBS@
341 evalue_convert_SOURCES = \
342 evalue_convert_main.c \
343 evalue_convert_options.c \
355 iscc_CPPFLAGS = @CLOOG_CFLAGS@ $(AM_CPPFLAGS)
357 libbarvinok.la @CLOOG_LIBS@ @CLOOG_LIBS@ @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
358 @POLYLIB_LIBS@ @PIPLIB_LIBS@
360 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
367 basis_reduction_templ.c \
369 polysign_cdd_template.cc \
370 barvinok/NTL.h.broken \
371 barvinok/NTL.h.normal \
372 barvinok/set.h.broken \
373 barvinok/set.h.normal \
376 doc/applications.tex \
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 (cd $(distdir)/polymake; \
405 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
406 (cd doc; make barvinok.pdf)
407 cp doc/barvinok.pdf $(distdir)/doc/
408 if test -f $(top_srcdir)/.git/HEAD; then \
409 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
411 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
415 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
417 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
419 check: check-testlib check-enumerate check-enumerate_e check-test \
420 check-lexmin check-approx check-pwqp check-euler check-lw
421 check-testlib: testlib$(EXEEXT)
423 check-approx: test_approx$(EXEEXT)
424 @for i in $(top_srcdir)/tests/ehrhart/*; do \
425 if test -f $$i; then \
426 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
429 check-pwqp: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
430 @for i in $(top_srcdir)/tests/pwqp/*; do \
431 if test -f $$i; then \
433 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
434 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
435 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
438 check-euler: barvinok_summate$(EXEEXT)
439 @for i in $(top_srcdir)/tests/euler/*; do \
440 if test -f $$i; then \
441 for method in 'euler' 'laurent_old' 'laurent'; do \
442 opt="--summation=$$method"; \
444 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
449 TOPCOM_CD = '--chamber-decomposition=topcom'
451 ISL_CD = '--chamber-decomposition=isl'
452 check-enumerate: barvinok_enumerate$(EXEEXT)
453 @for i in $(top_srcdir)/tests/ehrhart/*; do \
454 if test -f $$i; then \
456 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
457 for spec in 'random' 'bf' 'df'; do \
458 opt="--specialization=$$spec $$options"; \
460 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
463 opt="--summation=bernoulli"; \
465 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
469 SPEC_OMEGA = '--isl --omega'
471 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
472 @for dir in $(BEE_TESTDIRS); do \
473 for i in $(top_srcdir)/tests/$$dir/*; do \
474 if test -f $$i; then \
475 for options in '' $(SPEC_OMEGA) '--isl'; do \
476 for spec in 'random' 'bf' 'df'; do \
477 opt="--specialization=$$spec $$options"; \
479 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
485 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
486 if test -f $$i; then \
487 for spec in 'random' 'bf' 'df'; do \
488 opt="--specialization=$$spec --scarf"; \
490 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
493 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
496 check-test: test$(EXEEXT)
498 for i in $(top_srcdir)/tests/*; do \
499 if test -f $$i; then \
500 for options in '--index=10' '--primal --index=10'; do \
501 for spec in 'random' 'bf' 'df' 'todd'; do \
502 opt="--specialization=$$spec $$options"; \
504 ./test$(EXEEXT) $$opt < $$i; \
505 if test "$$?" -ne "0"; then \
506 failed=`expr $$failed + 1`; \
515 for i in $(top_srcdir)/tests/sample/*; do \
517 ./test$(EXEEXT) < $$i; \
518 if test "$$?" -ne "0"; then \
519 failed=`expr $$failed + 1`; \
525 if test $$failed != 0; then \
526 echo "$$failed tests failed"; \
529 check-lw: test$(EXEEXT)
531 for i in $(top_srcdir)/tests/lattice_width/*; do \
532 if test -f $$i; then \
534 ./test$(EXEEXT) < $$i; \
535 if test "$$?" -ne "0"; then \
536 failed=`expr $$failed + 1`; \
543 if test $$failed != 0; then \
544 echo "$$failed tests failed"; \
548 check-lexmin: lexmin$(EXEEXT)
549 @for i in $(top_srcdir)/tests/lexmin/*; do \
550 if test -f $$i; then \
551 for spec in 'random' 'bf' 'df'; do \
552 opt="--specialization=$$spec"; \
554 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
562 version.h: @GIT_HEAD@
563 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@