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 \
131 remove_equalities.h \
132 remove_equalities.c \
149 EXTRA_libbarvinok_la_SOURCES = \
150 basis_reduction_cdd.cc \
151 basis_reduction_glpk.c \
164 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
167 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
170 ZSOLVE_LA = zsolve/libzsolve.la
172 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
173 $(PIPLIB_LA) @PIPLIB_LIBS@ \
174 $(ZSOLVE_LA) lib/libgnu.la
175 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
177 BERNSTEIN_CC = bernstein.cc range.cc
179 libbarvinok_la_SOURCES = \
182 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
184 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
185 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
186 LDADD = libbarvinok-core.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
196 barvinok_count_SOURCES = barvinok_count.c
197 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
198 barvinok_union_SOURCES = barvinok_union.cc
200 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
205 FDSTREAM = fdstream.cc fdstream.h
207 barvinok_enumerate_SOURCES = \
208 barvinok_enumerate.cc \
220 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
221 barvinok_enumerate_e_SOURCES = \
222 barvinok_enumerate_e.cc \
235 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
236 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
237 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
238 barvinok_enumerate_e_LDADD = \
239 @OMEGA_LIBS@ libbarvinok-core.la \
240 @POLYLIB_LIBS@ @PIPLIB_LIBS@
241 barvinok_bound_SOURCES = \
250 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
251 barvinok_bound_LDADD = \
252 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
253 barvinok_summate_SOURCES = \
262 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
263 4coins_SOURCES = 4coins.cc
275 test_approx_SOURCES = \
279 test_bound_SOURCES = \
288 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
290 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
292 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
299 basis_reduction_templ.c \
300 polysign_cdd_template.cc \
301 barvinok/NTL.h.broken \
302 barvinok/NTL.h.normal \
303 barvinok/set.h.broken \
304 barvinok/set.h.normal \
306 doc/applications.tex \
316 polymake/Makefile.in \
318 polymake/autogen.sh \
319 polymake/configure.in \
320 polymake/convert.cc \
322 polymake/h_star_vector.cc \
323 polymake/lattice_points.cc
325 ACLOCAL_AMFLAGS = -I m4
328 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
329 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
332 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
335 (cd $(distdir)/polymake; \
336 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
337 (cd doc; make barvinok.pdf)
338 cp doc/barvinok.pdf $(distdir)/doc/
339 if test -f $(top_srcdir)/.git/HEAD; then \
340 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
342 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
346 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
348 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
350 check: check-testlib check-enumerate check-enumerate_e check-test \
351 check-lexmin check-approx check-evalue check-euler check-lw
352 check-testlib: testlib$(EXEEXT)
354 check-approx: test_approx$(EXEEXT)
355 @for i in $(top_srcdir)/tests/ehrhart/*; do \
356 if test -f $$i; then \
357 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
360 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
361 @for i in $(top_srcdir)/tests/evalue/*; do \
362 if test -f $$i; then \
364 if test -n "@bv_barvinok_bound@"; then \
365 ./barvinok_bound$(EXEEXT) -T < $$i || exit; \
366 echo $$i | ./test_bound$(EXEEXT) -q || exit; \
368 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
371 check-euler: barvinok_summate$(EXEEXT)
372 @for i in $(top_srcdir)/tests/euler/*; do \
373 if test -f $$i; then \
375 ./barvinok_summate$(EXEEXT) -T --summation=euler < $$i || exit; \
379 TOPCOM_CD = '--chamber-decomposition=topcom'
381 check-enumerate: barvinok_enumerate$(EXEEXT)
382 @for i in $(top_srcdir)/tests/ehrhart/*; do \
383 if test -f $$i; then \
385 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
386 for spec in 'random' 'bf' 'df'; do \
387 opt="--specialization=$$spec $$options"; \
389 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
392 opt="--summation=bernoulli"; \
394 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
397 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
398 @for dir in $(BEE_TESTDIRS); do \
399 for i in $(top_srcdir)/tests/$$dir/*; do \
400 if test -f $$i; then \
401 for options in '' '--pip' '--pip --omega'; do \
402 for spec in 'random' 'bf' 'df'; do \
403 opt="--specialization=$$spec $$options"; \
405 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
411 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
412 if test -f $$i; then \
413 for spec in 'random' 'bf' 'df'; do \
414 opt="--specialization=$$spec --scarf"; \
416 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
419 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
422 check-test: test$(EXEEXT)
423 @for i in $(top_srcdir)/tests/*; do \
424 if test -f $$i; then \
425 for options in '--index=10' '--primal --index=10'; do \
426 for spec in 'random' 'bf' 'df' 'todd'; do \
427 opt="--specialization=$$spec $$options"; \
429 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
435 check-lw: test$(EXEEXT)
436 @for i in $(top_srcdir)/tests/lattice_width/*; do \
437 if test -f $$i; then \
439 ./test$(EXEEXT) < $$i || echo -n " NOT"; \
444 check-lexmin: lexmin$(EXEEXT)
445 @for i in $(top_srcdir)/tests/lexmin/*; do \
446 if test -f $$i; then \
447 for spec in 'random' 'bf' 'df'; do \
448 opt="--specialization=$$spec"; \
450 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
458 version.h: @GIT_HEAD@
459 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@