2 MAYBE_BERNSTEIN = bernstein
5 MAYBE_POLYLIB = polylib
13 SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_BERNSTEIN) \
14 lib $(MAYBE_ZSOLVE) . omega doc
18 $(MAKE) $(AM_MAKEFLAGS) -C lib libgnu.la
19 bernstein/libbernstein.la: FORCE
20 $(MAKE) $(AM_MAKEFLAGS) -C bernstein libbernstein.la
21 polylib/libpolylibgmp.la: FORCE
22 $(MAKE) $(AM_MAKEFLAGS) -C polylib libpolylibgmp.la
23 piplib/libpiplibMP.la: FORCE
24 $(MAKE) $(AM_MAKEFLAGS) -C piplib libpiplibMP.la
25 zsolve/libzsolve.la: FORCE
26 $(MAKE) $(AM_MAKEFLAGS) -C zsolve libzsolve.la
28 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib \
29 @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ @ginac_CFLAGS@
30 AM_LDFLAGS = -Llib @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@
32 lib_LTLIBRARIES = libbarvinok-core.la libbarvinok.la
33 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
34 barvinok_ehrhart polytope_scan
35 noinst_PROGRAMS = test testlib randomtest \
36 remove_redundant_equalities \
37 barvinok_union polytope_volume test_approx \
38 barvinok_summate verify_lexsmaller piptest \
39 polyhedron_sample 4coins lexmin @bv_barvinok_maximize@ \
40 @bv_cone_hilbert_basis@ cone_integer_hull \
41 polytope_lattice_width polytope_minimize \
42 polyhedron_integer_hull
43 EXTRA_PROGRAMS = barvinok_maximize cone_hilbert_basis
44 pkginclude_HEADERS = \
53 barvinok/basis_reduction.h \
55 nodist_pkginclude_HEADERS = \
61 BR_CDD = basis_reduction_cdd.cc initcdd.cc
62 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
65 BR_GLPK = basis_reduction_glpk.c
66 POLYSIGN_GLPK = polysign_glpk.c
69 TOPCOM = topcom.c topcom.h
74 libbarvinok_core_la_SOURCES = \
81 basis_reduction_pip.c \
82 basis_reduction_pip_dual.c \
101 genfun_constructor.cc \
102 genfun_constructor.h \
128 remove_equalities.h \
129 remove_equalities.c \
146 EXTRA_libbarvinok_la_SOURCES = \
147 basis_reduction_cdd.cc \
148 basis_reduction_glpk.c \
159 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
162 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
165 ZSOLVE_LA = zsolve/libzsolve.la
167 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
168 $(PIPLIB_LA) @PIPLIB_LIBS@ \
169 $(ZSOLVE_LA) lib/libgnu.la
170 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
172 BERNSTEIN_CC = bernstein.cc
174 libbarvinok_la_SOURCES = \
177 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
179 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
180 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
181 LDADD = libbarvinok-core.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
191 barvinok_count_SOURCES = barvinok_count.c
192 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
193 barvinok_union_SOURCES = barvinok_union.cc
195 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
200 FDSTREAM = fdstream.cc fdstream.h
202 barvinok_enumerate_SOURCES = \
203 barvinok_enumerate.cc \
215 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
216 barvinok_enumerate_e_SOURCES = \
217 barvinok_enumerate_e.cc \
230 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
231 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
232 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
233 barvinok_enumerate_e_LDADD = \
234 @OMEGA_LIBS@ libbarvinok-core.la \
235 @POLYLIB_LIBS@ @PIPLIB_LIBS@
236 barvinok_maximize_SOURCES = \
245 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
246 barvinok_maximize_LDADD = \
247 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
248 barvinok_summate_SOURCES = \
257 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
258 4coins_SOURCES = 4coins.cc
270 test_approx_SOURCES = \
275 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
282 basis_reduction_templ.c \
283 polysign_cdd_template.cc \
284 barvinok/NTL.h.broken \
285 barvinok/NTL.h.normal \
286 barvinok/set.h.broken \
287 barvinok/set.h.normal \
289 doc/applications.tex \
299 polymake/Makefile.in \
301 polymake/autogen.sh \
302 polymake/configure.in \
303 polymake/convert.cc \
305 polymake/h_star_vector.cc \
306 polymake/lattice_points.cc
308 ACLOCAL_AMFLAGS = -I m4
311 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
312 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
315 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
318 (cd $(distdir)/polymake; \
319 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
320 (cd doc; make barvinok.pdf)
321 cp doc/barvinok.pdf $(distdir)/doc/
322 if test -f $(top_srcdir)/.git/HEAD; then \
323 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
325 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
329 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
331 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
333 check: check-testlib check-enumerate check-enumerate_e check-test \
334 check-lexmin check-approx check-evalue check-euler check-lw
335 check-testlib: testlib$(EXEEXT)
337 check-approx: test_approx$(EXEEXT)
338 @for i in $(top_srcdir)/tests/ehrhart/*; do \
339 if test -f $$i; then \
340 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
343 check-evalue: @bv_barvinok_maximize@ barvinok_summate$(EXEEXT)
344 @for i in $(top_srcdir)/tests/evalue/*; do \
345 if test -f $$i; then \
347 if test -n "@bv_barvinok_maximize@"; then \
348 ./barvinok_maximize$(EXEEXT) -T < $$i || exit; \
350 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
353 check-euler: barvinok_summate$(EXEEXT)
354 @for i in $(top_srcdir)/tests/euler/*; do \
355 if test -f $$i; then \
357 ./barvinok_summate$(EXEEXT) -T --summation=euler < $$i || exit; \
361 TOPCOM_CD = '--chamber-decomposition=topcom'
363 check-enumerate: barvinok_enumerate$(EXEEXT)
364 @for i in $(top_srcdir)/tests/ehrhart/*; do \
365 if test -f $$i; then \
367 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
368 for spec in 'random' 'bf' 'df'; do \
369 opt="--specialization=$$spec $$options"; \
371 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
376 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
377 @for dir in $(BEE_TESTDIRS); do \
378 for i in $(top_srcdir)/tests/$$dir/*; do \
379 if test -f $$i; then \
380 for options in '' '--pip' '--pip --omega'; do \
381 for spec in 'random' 'bf' 'df'; do \
382 opt="--specialization=$$spec $$options"; \
384 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
390 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
391 if test -f $$i; then \
392 for spec in 'random' 'bf' 'df'; do \
393 opt="--specialization=$$spec --scarf"; \
395 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
398 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
401 check-test: test$(EXEEXT)
402 @for i in $(top_srcdir)/tests/*; do \
403 if test -f $$i; then \
404 for options in '--index=10' '--primal --index=10'; do \
405 for spec in 'random' 'bf' 'df' 'todd'; do \
406 opt="--specialization=$$spec $$options"; \
408 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
414 check-lw: test$(EXEEXT)
415 @for i in $(top_srcdir)/tests/lattice_width/*; do \
416 if test -f $$i; then \
418 ./test$(EXEEXT) < $$i || echo -n " NOT"; \
423 check-lexmin: lexmin$(EXEEXT)
424 @for i in $(top_srcdir)/tests/lexmin/*; do \
425 if test -f $$i; then \
426 for spec in 'random' 'bf' 'df'; do \
427 opt="--specialization=$$spec"; \
429 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
437 version.h: @GIT_HEAD@
438 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@