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
31 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib \
32 @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ @ginac_CFLAGS@
33 AM_LDFLAGS = -Llib @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@
35 lib_LTLIBRARIES = libbarvinok-core.la libbarvinok.la
36 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
37 barvinok_ehrhart polytope_scan
38 noinst_PROGRAMS = test testlib randomtest \
39 remove_redundant_equalities \
40 barvinok_union polytope_volume test_approx \
41 barvinok_summate verify_lexsmaller piptest \
42 polyhedron_sample 4coins lexmin @bv_barvinok_bound@ \
43 @bv_cone_hilbert_basis@ cone_integer_hull \
44 polytope_lattice_width polytope_minimize \
45 polyhedron_integer_hull
46 EXTRA_PROGRAMS = barvinok_bound test_bound cone_hilbert_basis
47 pkginclude_HEADERS = \
56 barvinok/basis_reduction.h \
58 nodist_pkginclude_HEADERS = \
64 BR_CDD = basis_reduction_cdd.cc initcdd.cc
65 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
68 BR_GLPK = basis_reduction_glpk.c
69 POLYSIGN_GLPK = polysign_glpk.c
72 TOPCOM = topcom.c topcom.h
77 libbarvinok_core_la_SOURCES = \
84 basis_reduction_pip.c \
85 basis_reduction_pip_dual.c \
104 genfun_constructor.cc \
105 genfun_constructor.h \
133 remove_equalities.h \
134 remove_equalities.c \
151 EXTRA_libbarvinok_la_SOURCES = \
152 basis_reduction_cdd.cc \
153 basis_reduction_glpk.c \
166 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
169 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
172 ZSOLVE_LA = zsolve/libzsolve.la
174 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
175 $(PIPLIB_LA) @PIPLIB_LIBS@ \
176 $(ZSOLVE_LA) lib/libgnu.la
177 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
179 BERNSTEIN_CC = bernstein.cc range.cc
181 libbarvinok_la_SOURCES = \
184 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
186 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
187 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
188 LDADD = libbarvinok-core.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
198 barvinok_count_SOURCES = barvinok_count.c
199 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
200 barvinok_union_SOURCES = barvinok_union.cc
202 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
207 FDSTREAM = fdstream.cc fdstream.h
209 barvinok_enumerate_SOURCES = \
210 barvinok_enumerate.cc \
222 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
223 barvinok_enumerate_e_SOURCES = \
224 barvinok_enumerate_e.cc \
237 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
238 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
239 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
240 barvinok_enumerate_e_LDADD = \
241 @OMEGA_LIBS@ libbarvinok-core.la \
242 @POLYLIB_LIBS@ @PIPLIB_LIBS@
243 barvinok_bound_SOURCES = \
252 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
253 barvinok_bound_LDADD = \
254 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
255 barvinok_summate_SOURCES = \
264 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
265 4coins_SOURCES = 4coins.cc
277 test_approx_SOURCES = \
281 test_bound_SOURCES = \
290 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
292 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
294 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
301 basis_reduction_templ.c \
302 polysign_cdd_template.cc \
303 barvinok/NTL.h.broken \
304 barvinok/NTL.h.normal \
305 barvinok/set.h.broken \
306 barvinok/set.h.normal \
308 doc/applications.tex \
318 polymake/Makefile.in \
320 polymake/autogen.sh \
321 polymake/configure.in \
322 polymake/convert.cc \
324 polymake/h_star_vector.cc \
325 polymake/lattice_points.cc
327 ACLOCAL_AMFLAGS = -I m4
330 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
331 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
334 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
337 (cd $(distdir)/polymake; \
338 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
339 (cd doc; make barvinok.pdf)
340 cp doc/barvinok.pdf $(distdir)/doc/
341 if test -f $(top_srcdir)/.git/HEAD; then \
342 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
344 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
348 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
350 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
352 check: check-testlib check-enumerate check-enumerate_e check-test \
353 check-lexmin check-approx check-evalue check-euler check-lw
354 check-testlib: testlib$(EXEEXT)
356 check-approx: test_approx$(EXEEXT)
357 @for i in $(top_srcdir)/tests/ehrhart/*; do \
358 if test -f $$i; then \
359 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
362 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
363 @for i in $(top_srcdir)/tests/evalue/*; do \
364 if test -f $$i; then \
366 if test -n "@bv_barvinok_bound@"; then \
367 ./barvinok_bound$(EXEEXT) -T < $$i || exit; \
368 echo $$i | ./test_bound$(EXEEXT) -q || exit; \
370 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
373 check-euler: barvinok_summate$(EXEEXT)
374 @for i in $(top_srcdir)/tests/euler/*; do \
375 if test -f $$i; then \
377 ./barvinok_summate$(EXEEXT) -T --summation=euler < $$i || exit; \
381 TOPCOM_CD = '--chamber-decomposition=topcom'
383 check-enumerate: barvinok_enumerate$(EXEEXT)
384 @for i in $(top_srcdir)/tests/ehrhart/*; do \
385 if test -f $$i; then \
387 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
388 for spec in 'random' 'bf' 'df'; do \
389 opt="--specialization=$$spec $$options"; \
391 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
394 opt="--summation=bernoulli"; \
396 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
399 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
400 @for dir in $(BEE_TESTDIRS); do \
401 for i in $(top_srcdir)/tests/$$dir/*; do \
402 if test -f $$i; then \
403 for options in '' '--pip' '--pip --omega'; do \
404 for spec in 'random' 'bf' 'df'; do \
405 opt="--specialization=$$spec $$options"; \
407 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
413 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
414 if test -f $$i; then \
415 for spec in 'random' 'bf' 'df'; do \
416 opt="--specialization=$$spec --scarf"; \
418 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
421 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
424 check-test: test$(EXEEXT)
425 @for i in $(top_srcdir)/tests/*; do \
426 if test -f $$i; then \
427 for options in '--index=10' '--primal --index=10'; do \
428 for spec in 'random' 'bf' 'df' 'todd'; do \
429 opt="--specialization=$$spec $$options"; \
431 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
437 check-lw: test$(EXEEXT)
438 @for i in $(top_srcdir)/tests/lattice_width/*; do \
439 if test -f $$i; then \
441 ./test$(EXEEXT) < $$i || echo -n " NOT"; \
446 check-lexmin: lexmin$(EXEEXT)
447 @for i in $(top_srcdir)/tests/lexmin/*; do \
448 if test -f $$i; then \
449 for spec in 'random' 'bf' 'df'; do \
450 opt="--specialization=$$spec"; \
452 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
460 version.h: @GIT_HEAD@
461 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@