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 \
170 EXTRA_libbarvinok_core_la_SOURCES = \
171 basis_reduction_cdd.cc \
172 basis_reduction_glpk.c \
182 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
185 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
188 ZSOLVE_LA = zsolve/libzsolve.la
190 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
191 $(PIPLIB_LA) @PIPLIB_LIBS@ \
192 $(ZSOLVE_LA) lib/libgnu.la
193 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
196 BERNSTEIN_CC = bernstein.cc ex_convert.cc range.cc
198 BERNSTEIN_CC = dummy.c
200 libbarvinok_la_SOURCES = \
202 EXTRA_libbarvinok_la_SOURCES = \
210 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
212 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
213 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
215 LDADD = libbarvinok-core.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
225 barvinok_count_SOURCES = barvinok_count.c
226 barvinok_ehrhart_SOURCES = \
227 barvinok_ehrhart.cc \
231 barvinok_union_SOURCES = barvinok_union.cc
234 omega_interface/Exit.cc \
235 omega_interface/convert.cc \
236 omega_interface/count.cc
241 FDSTREAM = fdstream.cc fdstream.h
243 barvinok_enumerate_SOURCES = \
244 barvinok_enumerate.cc \
256 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
257 barvinok_enumerate_e_SOURCES = \
258 barvinok_enumerate_e.cc \
271 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
273 MONA_LIBS = -ldfa -lbdd -lmem
274 PARKER_LA = parker/libparker.la
275 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
276 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
278 barvinok_enumerate_e_CPPFLAGS = \
279 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
280 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
281 barvinok_enumerate_e_LDADD = \
282 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok-core.la \
283 @POLYLIB_LIBS@ @PIPLIB_LIBS@
284 barvinok_bound_SOURCES = \
293 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
294 barvinok_bound_LDADD = \
295 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
296 barvinok_summate_SOURCES = \
297 barvinok_summate.cc \
305 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
306 4coins_SOURCES = 4coins.cc
307 semigroup_holes_SOURCES = semigroup_holes.cc
319 test_approx_SOURCES = \
323 test_bound_SOURCES = \
332 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
334 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
336 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
343 basis_reduction_templ.c \
345 polysign_cdd_template.cc \
346 barvinok/NTL.h.broken \
347 barvinok/NTL.h.normal \
348 barvinok/set.h.broken \
349 barvinok/set.h.normal \
351 doc/applications.tex \
361 polymake/Makefile.in \
363 polymake/autogen.sh \
364 polymake/configure.in \
365 polymake/convert.cc \
367 polymake/h_star_vector.cc \
368 polymake/lattice_points.cc
370 ACLOCAL_AMFLAGS = -I m4
373 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
374 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
377 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
380 (cd $(distdir)/polymake; \
381 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
382 (cd doc; make barvinok.pdf)
383 cp doc/barvinok.pdf $(distdir)/doc/
384 if test -f $(top_srcdir)/.git/HEAD; then \
385 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
387 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
391 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
393 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
395 check: check-testlib check-enumerate check-enumerate_e check-test \
396 check-lexmin check-approx check-evalue check-euler check-lw
397 check-testlib: testlib$(EXEEXT)
399 check-approx: test_approx$(EXEEXT)
400 @for i in $(top_srcdir)/tests/ehrhart/*; do \
401 if test -f $$i; then \
402 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
405 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
406 @for i in $(top_srcdir)/tests/evalue/*; do \
407 if test -f $$i; then \
409 if test -n "@bv_barvinok_bound@"; then \
410 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
411 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
413 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
416 check-euler: barvinok_summate$(EXEEXT)
417 @for i in $(top_srcdir)/tests/euler/*; do \
418 if test -f $$i; then \
419 for method in 'euler' 'laurent'; do \
420 opt="--summation=$$method"; \
422 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
427 TOPCOM_CD = '--chamber-decomposition=topcom'
429 check-enumerate: barvinok_enumerate$(EXEEXT)
430 @for i in $(top_srcdir)/tests/ehrhart/*; do \
431 if test -f $$i; then \
433 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
434 for spec in 'random' 'bf' 'df'; do \
435 opt="--specialization=$$spec $$options"; \
437 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
440 opt="--summation=bernoulli"; \
442 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
445 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
446 @for dir in $(BEE_TESTDIRS); do \
447 for i in $(top_srcdir)/tests/$$dir/*; do \
448 if test -f $$i; then \
449 for options in '' '--pip' '--pip --omega'; do \
450 for spec in 'random' 'bf' 'df'; do \
451 opt="--specialization=$$spec $$options"; \
453 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
459 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
460 if test -f $$i; then \
461 for spec in 'random' 'bf' 'df'; do \
462 opt="--specialization=$$spec --scarf"; \
464 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
467 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
470 check-test: test$(EXEEXT)
471 @for i in $(top_srcdir)/tests/*; do \
472 if test -f $$i; then \
473 for options in '--index=10' '--primal --index=10'; do \
474 for spec in 'random' 'bf' 'df' 'todd'; do \
475 opt="--specialization=$$spec $$options"; \
477 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
483 for i in $(top_srcdir)/tests/sample/*; do \
485 ./test$(EXEEXT) < $$i || echo -n " NOT"; \
488 check-lw: test$(EXEEXT)
489 @for i in $(top_srcdir)/tests/lattice_width/*; do \
490 if test -f $$i; then \
492 ./test$(EXEEXT) < $$i || echo -n " NOT"; \
497 check-lexmin: lexmin$(EXEEXT)
498 @for i in $(top_srcdir)/tests/lexmin/*; do \
499 if test -f $$i; then \
500 for spec in 'random' 'bf' 'df'; do \
501 opt="--specialization=$$spec"; \
503 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
511 version.h: @GIT_HEAD@
512 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@