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
56 EXTRA_PROGRAMS = barvinok_bound test_bound cone_hilbert_basis
57 pkginclude_HEADERS = \
66 barvinok/basis_reduction.h \
68 nodist_pkginclude_HEADERS = \
74 BR_CDD = basis_reduction_cdd.cc initcdd.cc
75 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
78 BR_GLPK = basis_reduction_glpk.c
79 POLYSIGN_GLPK = polysign_glpk.c
82 TOPCOM = topcom.c topcom.h
87 libbarvinok_core_la_SOURCES = \
94 basis_reduction_pip.c \
95 basis_reduction_pip_dual.c \
116 genfun_constructor.cc \
117 genfun_constructor.h \
148 remove_equalities.h \
149 remove_equalities.c \
169 EXTRA_libbarvinok_core_la_SOURCES = \
170 basis_reduction_cdd.cc \
171 basis_reduction_glpk.c \
181 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
184 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
187 ZSOLVE_LA = zsolve/libzsolve.la
189 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
190 $(PIPLIB_LA) @PIPLIB_LIBS@ \
191 $(ZSOLVE_LA) lib/libgnu.la
192 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
195 BERNSTEIN_CC = bernstein.cc ex_convert.cc range.cc
197 BERNSTEIN_CC = dummy.c
199 libbarvinok_la_SOURCES = \
201 EXTRA_libbarvinok_la_SOURCES = \
209 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
211 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
212 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
214 LDADD = libbarvinok-core.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
224 barvinok_count_SOURCES = barvinok_count.c
225 barvinok_ehrhart_SOURCES = \
226 barvinok_ehrhart.cc \
230 barvinok_union_SOURCES = barvinok_union.cc
233 omega_interface/Exit.cc \
234 omega_interface/convert.cc \
235 omega_interface/count.cc
240 FDSTREAM = fdstream.cc fdstream.h
242 barvinok_enumerate_SOURCES = \
243 barvinok_enumerate.cc \
255 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
256 barvinok_enumerate_e_SOURCES = \
257 barvinok_enumerate_e.cc \
270 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
272 MONA_LIBS = -ldfa -lbdd -lmem
273 PARKER_LA = parker/libparker.la
274 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
275 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
277 barvinok_enumerate_e_CPPFLAGS = \
278 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
279 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
280 barvinok_enumerate_e_LDADD = \
281 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok-core.la \
282 @POLYLIB_LIBS@ @PIPLIB_LIBS@
283 barvinok_bound_SOURCES = \
292 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
293 barvinok_bound_LDADD = \
294 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
295 barvinok_summate_SOURCES = \
296 barvinok_summate.cc \
304 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
305 4coins_SOURCES = 4coins.cc
317 test_approx_SOURCES = \
321 test_bound_SOURCES = \
330 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
332 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
334 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
341 basis_reduction_templ.c \
343 polysign_cdd_template.cc \
344 barvinok/NTL.h.broken \
345 barvinok/NTL.h.normal \
346 barvinok/set.h.broken \
347 barvinok/set.h.normal \
349 doc/applications.tex \
359 polymake/Makefile.in \
361 polymake/autogen.sh \
362 polymake/configure.in \
363 polymake/convert.cc \
365 polymake/h_star_vector.cc \
366 polymake/lattice_points.cc
368 ACLOCAL_AMFLAGS = -I m4
371 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
372 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
375 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
378 (cd $(distdir)/polymake; \
379 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
380 (cd doc; make barvinok.pdf)
381 cp doc/barvinok.pdf $(distdir)/doc/
382 if test -f $(top_srcdir)/.git/HEAD; then \
383 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
385 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
389 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
391 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
393 check: check-testlib check-enumerate check-enumerate_e check-test \
394 check-lexmin check-approx check-evalue check-euler check-lw
395 check-testlib: testlib$(EXEEXT)
397 check-approx: test_approx$(EXEEXT)
398 @for i in $(top_srcdir)/tests/ehrhart/*; do \
399 if test -f $$i; then \
400 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
403 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
404 @for i in $(top_srcdir)/tests/evalue/*; do \
405 if test -f $$i; then \
407 if test -n "@bv_barvinok_bound@"; then \
408 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
409 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
411 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
414 check-euler: barvinok_summate$(EXEEXT)
415 @for i in $(top_srcdir)/tests/euler/*; do \
416 if test -f $$i; then \
417 for method in 'euler' 'laurent'; do \
418 opt="--summation=$$method"; \
420 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
425 TOPCOM_CD = '--chamber-decomposition=topcom'
427 check-enumerate: barvinok_enumerate$(EXEEXT)
428 @for i in $(top_srcdir)/tests/ehrhart/*; do \
429 if test -f $$i; then \
431 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
432 for spec in 'random' 'bf' 'df'; do \
433 opt="--specialization=$$spec $$options"; \
435 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
438 opt="--summation=bernoulli"; \
440 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
443 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
444 @for dir in $(BEE_TESTDIRS); do \
445 for i in $(top_srcdir)/tests/$$dir/*; do \
446 if test -f $$i; then \
447 for options in '' '--pip' '--pip --omega'; do \
448 for spec in 'random' 'bf' 'df'; do \
449 opt="--specialization=$$spec $$options"; \
451 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
457 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
458 if test -f $$i; then \
459 for spec in 'random' 'bf' 'df'; do \
460 opt="--specialization=$$spec --scarf"; \
462 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
465 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
468 check-test: test$(EXEEXT)
469 @for i in $(top_srcdir)/tests/*; do \
470 if test -f $$i; then \
471 for options in '--index=10' '--primal --index=10'; do \
472 for spec in 'random' 'bf' 'df' 'todd'; do \
473 opt="--specialization=$$spec $$options"; \
475 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
481 check-lw: test$(EXEEXT)
482 @for i in $(top_srcdir)/tests/lattice_width/*; do \
483 if test -f $$i; then \
485 ./test$(EXEEXT) < $$i || echo -n " NOT"; \
490 check-lexmin: lexmin$(EXEEXT)
491 @for i in $(top_srcdir)/tests/lexmin/*; do \
492 if test -f $$i; then \
493 for spec in 'random' 'bf' 'df'; do \
494 opt="--specialization=$$spec"; \
496 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
504 version.h: @GIT_HEAD@
505 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@