2 MAYBE_BERNSTEIN = bernstein
5 MAYBE_POLYLIB = polylib
12 OMEGA_LA = $(top_builddir)/omega/omega_lib/libomega.la
20 SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_BERNSTEIN) \
22 lib $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . omega_interface doc
26 cd lib; $(MAKE) $(AM_MAKEFLAGS) libgnu.la
27 bernstein/libbernstein.la: FORCE
28 cd bernstein; $(MAKE) $(AM_MAKEFLAGS) libbernstein.la
29 polylib/libpolylibgmp.la: FORCE
30 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
31 piplib/libpiplibMP.la: FORCE
32 cd piplib; $(MAKE) $(AM_MAKEFLAGS) libpiplibMP.la
33 omega/omega_lib/libomega.la: FORCE
34 cd omega/omega_lib; $(MAKE) $(AM_MAKEFLAGS) libomega.la
35 zsolve/libzsolve.la: FORCE
36 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
37 parker/libparker.la: FORCE
38 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
40 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib -Ilib \
41 @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ @ginac_CFLAGS@ \
43 AM_LDFLAGS = -Llib @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@ @NTL_LDFLAGS@
45 lib_LTLIBRARIES = libbarvinok-core.la libbarvinok.la
46 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
47 barvinok_ehrhart polytope_scan
48 noinst_PROGRAMS = test testlib randomtest \
49 remove_redundant_equalities \
50 barvinok_union polytope_volume test_approx \
51 barvinok_summate verify_lexsmaller piptest \
52 polyhedron_sample 4coins lexmin @bv_barvinok_bound@ \
53 @bv_cone_hilbert_basis@ cone_integer_hull \
54 polytope_lattice_width polytope_minimize \
55 polyhedron_integer_hull vector_partition_chambers \
57 EXTRA_PROGRAMS = barvinok_bound test_bound cone_hilbert_basis
58 pkginclude_HEADERS = \
67 barvinok/basis_reduction.h \
69 nodist_pkginclude_HEADERS = \
75 BR_CDD = basis_reduction_cdd.cc initcdd.cc
76 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
79 BR_GLPK = basis_reduction_glpk.c
80 POLYSIGN_GLPK = polysign_glpk.c
83 TOPCOM = topcom.c topcom.h
88 libbarvinok_core_la_SOURCES = \
95 basis_reduction_pip.c \
96 basis_reduction_pip_dual.c \
117 genfun_constructor.cc \
118 genfun_constructor.h \
149 remove_equalities.h \
150 remove_equalities.c \
172 EXTRA_libbarvinok_core_la_SOURCES = \
173 basis_reduction_cdd.cc \
174 basis_reduction_glpk.c \
184 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
187 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
190 ZSOLVE_LA = zsolve/libzsolve.la
192 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
193 $(PIPLIB_LA) @PIPLIB_LIBS@ \
194 $(ZSOLVE_LA) lib/libgnu.la
195 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
198 BERNSTEIN_CC = bernstein.cc ex_convert.cc range.cc
200 BERNSTEIN_CC = dummy.c
202 libbarvinok_la_SOURCES = \
204 EXTRA_libbarvinok_la_SOURCES = \
212 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
214 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
215 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
217 LDADD = libbarvinok-core.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
227 barvinok_count_SOURCES = barvinok_count.c
228 barvinok_ehrhart_SOURCES = \
229 barvinok_ehrhart.cc \
233 barvinok_union_SOURCES = barvinok_union.cc
236 omega_interface/Exit.cc \
237 omega_interface/convert.cc \
238 omega_interface/count.cc
243 FDSTREAM = fdstream.cc fdstream.h
245 barvinok_enumerate_SOURCES = \
246 barvinok_enumerate.cc \
258 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
259 barvinok_enumerate_e_SOURCES = \
260 barvinok_enumerate_e.cc \
273 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
275 MONA_LIBS = -ldfa -lbdd -lmem
276 PARKER_LA = parker/libparker.la
277 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
278 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
280 barvinok_enumerate_e_CPPFLAGS = \
281 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
282 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
283 barvinok_enumerate_e_LDADD = \
284 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok-core.la \
285 @POLYLIB_LIBS@ @PIPLIB_LIBS@
286 barvinok_bound_SOURCES = \
295 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
296 barvinok_bound_LDADD = \
297 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
298 barvinok_summate_SOURCES = \
299 barvinok_summate.cc \
307 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
308 4coins_SOURCES = 4coins.cc
309 semigroup_holes_SOURCES = semigroup_holes.cc
321 test_approx_SOURCES = \
325 test_bound_SOURCES = \
334 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
336 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
338 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
345 basis_reduction_templ.c \
347 polysign_cdd_template.cc \
348 barvinok/NTL.h.broken \
349 barvinok/NTL.h.normal \
350 barvinok/set.h.broken \
351 barvinok/set.h.normal \
353 doc/applications.tex \
363 polymake/Makefile.in \
365 polymake/autogen.sh \
366 polymake/configure.in \
367 polymake/convert.cc \
369 polymake/h_star_vector.cc \
370 polymake/lattice_points.cc
372 ACLOCAL_AMFLAGS = -I m4
375 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
376 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
379 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
382 (cd $(distdir)/polymake; \
383 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
384 (cd doc; make barvinok.pdf)
385 cp doc/barvinok.pdf $(distdir)/doc/
386 if test -f $(top_srcdir)/.git/HEAD; then \
387 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
389 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
393 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
395 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
397 check: check-testlib check-enumerate check-enumerate_e check-test \
398 check-lexmin check-approx check-evalue check-euler check-lw
399 check-testlib: testlib$(EXEEXT)
401 check-approx: test_approx$(EXEEXT)
402 @for i in $(top_srcdir)/tests/ehrhart/*; do \
403 if test -f $$i; then \
404 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
407 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
408 @for i in $(top_srcdir)/tests/evalue/*; do \
409 if test -f $$i; then \
411 if test -n "@bv_barvinok_bound@"; then \
412 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
413 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'; do \
422 opt="--summation=$$method"; \
424 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
429 TOPCOM_CD = '--chamber-decomposition=topcom'
431 check-enumerate: barvinok_enumerate$(EXEEXT)
432 @for i in $(top_srcdir)/tests/ehrhart/*; do \
433 if test -f $$i; then \
435 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
436 for spec in 'random' 'bf' 'df'; do \
437 opt="--specialization=$$spec $$options"; \
439 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
442 opt="--summation=bernoulli"; \
444 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
447 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
448 @for dir in $(BEE_TESTDIRS); do \
449 for i in $(top_srcdir)/tests/$$dir/*; do \
450 if test -f $$i; then \
451 for options in '' '--pip' '--pip --omega'; do \
452 for spec in 'random' 'bf' 'df'; do \
453 opt="--specialization=$$spec $$options"; \
455 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
461 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
462 if test -f $$i; then \
463 for spec in 'random' 'bf' 'df'; do \
464 opt="--specialization=$$spec --scarf"; \
466 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
469 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
472 check-test: test$(EXEEXT)
474 for i in $(top_srcdir)/tests/*; do \
475 if test -f $$i; then \
476 for options in '--index=10' '--primal --index=10'; do \
477 for spec in 'random' 'bf' 'df' 'todd'; do \
478 opt="--specialization=$$spec $$options"; \
480 ./test$(EXEEXT) $$opt < $$i; \
481 if test "$$?" -ne "0"; then \
482 failed=`expr $$failed + 1`; \
491 for i in $(top_srcdir)/tests/sample/*; do \
493 ./test$(EXEEXT) < $$i; \
494 if test "$$?" -ne "0"; then \
495 failed=`expr $$failed + 1`; \
501 if test $$failed != 0; then \
502 echo "$$failed tests failed"; \
505 check-lw: test$(EXEEXT)
507 for i in $(top_srcdir)/tests/lattice_width/*; do \
508 if test -f $$i; then \
510 ./test$(EXEEXT) < $$i; \
511 if test "$$?" -ne "0"; then \
512 failed=`expr $$failed + 1`; \
519 if test $$failed != 0; then \
520 echo "$$failed tests failed"; \
524 check-lexmin: lexmin$(EXEEXT)
525 @for i in $(top_srcdir)/tests/lexmin/*; do \
526 if test -f $$i; then \
527 for spec in 'random' 'bf' 'df'; do \
528 opt="--specialization=$$spec"; \
530 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
538 version.h: @GIT_HEAD@
539 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@