2 MAYBE_BERNSTEIN = bernstein
5 MAYBE_POLYLIB = polylib
10 SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_BERNSTEIN) lib zsolve . omega doc
14 $(MAKE) $(AM_MAKEFLAGS) -C lib libgnu.la
15 bernstein/libbernstein.la: FORCE
16 $(MAKE) $(AM_MAKEFLAGS) -C bernstein libbernstein.la
17 polylib/libpolylibgmp.la: FORCE
18 $(MAKE) $(AM_MAKEFLAGS) -C polylib libpolylibgmp.la
19 piplib/libpiplibMP.la: FORCE
20 $(MAKE) $(AM_MAKEFLAGS) -C piplib libpiplibMP.la
21 zsolve/libzsolve.la: FORCE
22 $(MAKE) $(AM_MAKEFLAGS) -C zsolve libzsolve.la
24 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib \
25 @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ @ginac_CFLAGS@
26 AM_LDFLAGS = -Llib @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@
28 lib_LTLIBRARIES = libbarvinok.la
29 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
30 barvinok_ehrhart polytope_scan
31 noinst_PROGRAMS = test testlib randomtest \
32 remove_redundant_equalities \
33 barvinok_union polytope_volume test_approx \
34 barvinok_summate verify_lexsmaller piptest \
35 polyhedron_sample 4coins lexmin @bv_barvinok_maximize@ \
36 cone_hilbert_basis cone_integer_hull \
37 polytope_lattice_width polytope_minimize \
38 polyhedron_integer_hull
39 EXTRA_PROGRAMS = barvinok_maximize
40 pkginclude_HEADERS = \
49 barvinok/basis_reduction.h \
51 nodist_pkginclude_HEADERS = \
57 BERNSTEIN_CC = bernstein.cc
60 BR_CDD = basis_reduction_cdd.cc initcdd.cc
61 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
64 BR_GLPK = basis_reduction_glpk.c
65 POLYSIGN_GLPK = polysign_glpk.c
68 TOPCOM = topcom.c topcom.h
70 libbarvinok_la_SOURCES = \
77 basis_reduction_pip.c \
78 basis_reduction_pip_dual.c \
97 genfun_constructor.cc \
98 genfun_constructor.h \
124 remove_equalities.h \
125 remove_equalities.c \
143 EXTRA_libbarvinok_la_SOURCES = \
144 basis_reduction_cdd.cc \
145 basis_reduction_glpk.c \
155 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
158 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
161 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
163 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
164 $(PIPLIB_LA) @PIPLIB_LIBS@ $(BERNSTEIN_LA) \
165 zsolve/libzsolve.la lib/libgnu.la
166 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
167 LDADD = libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
177 barvinok_count_SOURCES = barvinok_count.c
178 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
179 barvinok_union_SOURCES = barvinok_union.cc
181 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
186 FDSTREAM = fdstream.cc fdstream.h
188 barvinok_enumerate_SOURCES = \
189 barvinok_enumerate.cc \
201 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
202 barvinok_enumerate_e_SOURCES = \
203 barvinok_enumerate_e.cc \
216 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
217 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
218 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
219 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
220 barvinok_maximize_SOURCES = \
229 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
230 barvinok_summate_SOURCES = \
239 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
240 4coins_SOURCES = 4coins.cc
252 test_approx_SOURCES = \
257 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
264 basis_reduction_templ.c \
265 polysign_cdd_template.cc \
266 barvinok/NTL.h.broken \
267 barvinok/NTL.h.normal \
268 barvinok/set.h.broken \
269 barvinok/set.h.normal \
271 doc/applications.tex \
281 polymake/Makefile.in \
283 polymake/autogen.sh \
284 polymake/configure.in \
285 polymake/convert.cc \
287 polymake/h_star_vector.cc \
288 polymake/lattice_points.cc
290 ACLOCAL_AMFLAGS = -I m4
293 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
294 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
297 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
300 (cd $(distdir)/polymake; \
301 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
302 (cd doc; make barvinok.pdf)
303 cp doc/barvinok.pdf $(distdir)/doc/
304 if test -f $(top_srcdir)/.git/HEAD; then \
305 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
307 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
311 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
313 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
315 check: check-testlib check-enumerate check-enumerate_e check-test \
316 check-lexmin check-approx check-evalue check-euler check-lw
317 check-testlib: testlib$(EXEEXT)
319 check-approx: test_approx$(EXEEXT)
320 @for i in $(top_srcdir)/tests/ehrhart/*; do \
321 if test -f $$i; then \
322 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
325 check-evalue: @bv_barvinok_maximize@ barvinok_summate$(EXEEXT)
326 @for i in $(top_srcdir)/tests/evalue/*; do \
327 if test -f $$i; then \
329 if test -n "@bv_barvinok_maximize@"; then \
330 ./barvinok_maximize$(EXEEXT) -T < $$i || exit; \
332 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
335 check-euler: barvinok_summate$(EXEEXT)
336 @for i in $(top_srcdir)/tests/euler/*; do \
337 if test -f $$i; then \
339 ./barvinok_summate$(EXEEXT) -T --summation=euler < $$i || exit; \
343 TOPCOM_CD = '--chamber-decomposition=topcom'
345 check-enumerate: barvinok_enumerate$(EXEEXT)
346 @for i in $(top_srcdir)/tests/ehrhart/*; do \
347 if test -f $$i; then \
349 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
350 for spec in 'random' 'bf' 'df'; do \
351 opt="--specialization=$$spec $$options"; \
353 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
358 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
359 @for dir in $(BEE_TESTDIRS); do \
360 for i in $(top_srcdir)/tests/$$dir/*; do \
361 if test -f $$i; then \
362 for options in '' '--pip' '--pip --omega'; do \
363 for spec in 'random' 'bf' 'df'; do \
364 opt="--specialization=$$spec $$options"; \
366 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
372 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
373 if test -f $$i; then \
374 for spec in 'random' 'bf' 'df'; do \
375 opt="--specialization=$$spec --scarf"; \
377 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
381 check-test: test$(EXEEXT)
382 @for i in $(top_srcdir)/tests/*; do \
383 if test -f $$i; then \
384 for options in '--index=10' '--primal --index=10'; do \
385 for spec in 'random' 'bf' 'df' 'todd'; do \
386 opt="--specialization=$$spec $$options"; \
388 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
394 check-lw: test$(EXEEXT)
395 @for i in $(top_srcdir)/tests/lattice_width/*; do \
396 if test -f $$i; then \
398 ./test$(EXEEXT) < $$i || echo -n " NOT"; \
403 check-lexmin: lexmin$(EXEEXT)
404 @for i in $(top_srcdir)/tests/lexmin/*; do \
405 if test -f $$i; then \
406 for spec in 'random' 'bf' 'df'; do \
407 opt="--specialization=$$spec"; \
409 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
417 version.h: @GIT_HEAD@
418 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@