2 MAYBE_BERNSTEIN = bernstein
5 MAYBE_POLYLIB = polylib
16 SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_BERNSTEIN) \
17 lib $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . omega doc
21 $(MAKE) $(AM_MAKEFLAGS) -C lib libgnu.la
22 bernstein/libbernstein.la: FORCE
23 $(MAKE) $(AM_MAKEFLAGS) -C bernstein libbernstein.la
24 polylib/libpolylibgmp.la: FORCE
25 $(MAKE) $(AM_MAKEFLAGS) -C polylib libpolylibgmp.la
26 piplib/libpiplibMP.la: FORCE
27 $(MAKE) $(AM_MAKEFLAGS) -C piplib libpiplibMP.la
28 zsolve/libzsolve.la: FORCE
29 $(MAKE) $(AM_MAKEFLAGS) -C zsolve libzsolve.la
30 parker/libparker.la: FORCE
31 $(MAKE) $(AM_MAKEFLAGS) -C parker libparker.la
33 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib \
34 @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ @ginac_CFLAGS@ \
36 AM_LDFLAGS = -Llib @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@ @NTL_LDFLAGS@
38 lib_LTLIBRARIES = libbarvinok-core.la libbarvinok.la
39 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
40 barvinok_ehrhart polytope_scan
41 noinst_PROGRAMS = test testlib randomtest \
42 remove_redundant_equalities \
43 barvinok_union polytope_volume test_approx \
44 barvinok_summate verify_lexsmaller piptest \
45 polyhedron_sample 4coins lexmin @bv_barvinok_bound@ \
46 @bv_cone_hilbert_basis@ cone_integer_hull \
47 polytope_lattice_width polytope_minimize \
48 polyhedron_integer_hull
49 EXTRA_PROGRAMS = barvinok_bound test_bound cone_hilbert_basis
50 pkginclude_HEADERS = \
59 barvinok/basis_reduction.h \
61 nodist_pkginclude_HEADERS = \
67 BR_CDD = basis_reduction_cdd.cc initcdd.cc
68 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
71 BR_GLPK = basis_reduction_glpk.c
72 POLYSIGN_GLPK = polysign_glpk.c
75 TOPCOM = topcom.c topcom.h
80 libbarvinok_core_la_SOURCES = \
87 basis_reduction_pip.c \
88 basis_reduction_pip_dual.c \
109 genfun_constructor.cc \
110 genfun_constructor.h \
141 remove_equalities.h \
142 remove_equalities.c \
162 EXTRA_libbarvinok_la_SOURCES = \
163 basis_reduction_cdd.cc \
164 basis_reduction_glpk.c \
179 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
182 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
185 ZSOLVE_LA = zsolve/libzsolve.la
187 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
188 $(PIPLIB_LA) @PIPLIB_LIBS@ \
189 $(ZSOLVE_LA) lib/libgnu.la
190 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
193 BERNSTEIN_CC = bernstein.cc ex_convert.cc range.cc
195 libbarvinok_la_SOURCES = \
198 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
200 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
201 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
203 LDADD = libbarvinok-core.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
213 barvinok_count_SOURCES = barvinok_count.c
214 barvinok_ehrhart_SOURCES = \
215 barvinok_ehrhart.cc \
219 barvinok_union_SOURCES = barvinok_union.cc
221 BEEO_SOURCES = omega/Exit.cc omega/convert.cc omega/count.cc
226 FDSTREAM = fdstream.cc fdstream.h
228 barvinok_enumerate_SOURCES = \
229 barvinok_enumerate.cc \
241 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
242 barvinok_enumerate_e_SOURCES = \
243 barvinok_enumerate_e.cc \
256 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
258 MONA_LIBS = -ldfa -lbdd -lmem
259 PARKER_LA = parker/libparker.la
260 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
261 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
263 barvinok_enumerate_e_CPPFLAGS = \
264 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
265 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
266 barvinok_enumerate_e_LDADD = \
267 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ libbarvinok-core.la \
268 @POLYLIB_LIBS@ @PIPLIB_LIBS@
269 barvinok_bound_SOURCES = \
278 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
279 barvinok_bound_LDADD = \
280 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
281 barvinok_summate_SOURCES = \
282 barvinok_summate.cc \
290 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
291 4coins_SOURCES = 4coins.cc
303 test_approx_SOURCES = \
307 test_bound_SOURCES = \
316 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
318 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
320 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
327 basis_reduction_templ.c \
329 polysign_cdd_template.cc \
330 barvinok/NTL.h.broken \
331 barvinok/NTL.h.normal \
332 barvinok/set.h.broken \
333 barvinok/set.h.normal \
335 doc/applications.tex \
345 polymake/Makefile.in \
347 polymake/autogen.sh \
348 polymake/configure.in \
349 polymake/convert.cc \
351 polymake/h_star_vector.cc \
352 polymake/lattice_points.cc
354 ACLOCAL_AMFLAGS = -I m4
357 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
358 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
361 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
364 (cd $(distdir)/polymake; \
365 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
366 (cd doc; make barvinok.pdf)
367 cp doc/barvinok.pdf $(distdir)/doc/
368 if test -f $(top_srcdir)/.git/HEAD; then \
369 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
371 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
375 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
377 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
379 check: check-testlib check-enumerate check-enumerate_e check-test \
380 check-lexmin check-approx check-evalue check-euler check-lw
381 check-testlib: testlib$(EXEEXT)
383 check-approx: test_approx$(EXEEXT)
384 @for i in $(top_srcdir)/tests/ehrhart/*; do \
385 if test -f $$i; then \
386 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
389 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
390 @for i in $(top_srcdir)/tests/evalue/*; do \
391 if test -f $$i; then \
393 if test -n "@bv_barvinok_bound@"; then \
394 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
395 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
397 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
400 check-euler: barvinok_summate$(EXEEXT)
401 @for i in $(top_srcdir)/tests/euler/*; do \
402 if test -f $$i; then \
403 for method in 'euler' 'laurent'; do \
404 opt="--summation=$$method"; \
406 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
411 TOPCOM_CD = '--chamber-decomposition=topcom'
413 check-enumerate: barvinok_enumerate$(EXEEXT)
414 @for i in $(top_srcdir)/tests/ehrhart/*; do \
415 if test -f $$i; then \
417 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
418 for spec in 'random' 'bf' 'df'; do \
419 opt="--specialization=$$spec $$options"; \
421 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
424 opt="--summation=bernoulli"; \
426 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
429 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
430 @for dir in $(BEE_TESTDIRS); do \
431 for i in $(top_srcdir)/tests/$$dir/*; do \
432 if test -f $$i; then \
433 for options in '' '--pip' '--pip --omega'; do \
434 for spec in 'random' 'bf' 'df'; do \
435 opt="--specialization=$$spec $$options"; \
437 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
443 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
444 if test -f $$i; then \
445 for spec in 'random' 'bf' 'df'; do \
446 opt="--specialization=$$spec --scarf"; \
448 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
451 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
454 check-test: test$(EXEEXT)
455 @for i in $(top_srcdir)/tests/*; do \
456 if test -f $$i; then \
457 for options in '--index=10' '--primal --index=10'; do \
458 for spec in 'random' 'bf' 'df' 'todd'; do \
459 opt="--specialization=$$spec $$options"; \
461 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
467 check-lw: test$(EXEEXT)
468 @for i in $(top_srcdir)/tests/lattice_width/*; do \
469 if test -f $$i; then \
471 ./test$(EXEEXT) < $$i || echo -n " NOT"; \
476 check-lexmin: lexmin$(EXEEXT)
477 @for i in $(top_srcdir)/tests/lexmin/*; do \
478 if test -f $$i; then \
479 for spec in 'random' 'bf' 'df'; do \
480 opt="--specialization=$$spec"; \
482 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
490 version.h: @GIT_HEAD@
491 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@