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 EXTRA_PROGRAMS = barvinok_maximize
39 pkginclude_HEADERS = \
48 barvinok/basis_reduction.h \
50 nodist_pkginclude_HEADERS = \
56 BERNSTEIN_CC = bernstein.cc
59 BR_CDD = basis_reduction_cdd.cc initcdd.cc
60 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
63 BR_GLPK = basis_reduction_glpk.c
64 POLYSIGN_GLPK = polysign_glpk.c
67 TOPCOM = topcom.c topcom.h
69 libbarvinok_la_SOURCES = \
76 basis_reduction_pip.c \
77 basis_reduction_pip_dual.c \
96 genfun_constructor.cc \
97 genfun_constructor.h \
121 remove_equalities.h \
122 remove_equalities.c \
140 EXTRA_libbarvinok_la_SOURCES = \
141 basis_reduction_cdd.cc \
142 basis_reduction_glpk.c \
152 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
155 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
158 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
160 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
161 $(PIPLIB_LA) @PIPLIB_LIBS@ $(BERNSTEIN_LA) \
162 zsolve/libzsolve.la lib/libgnu.la
163 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
164 LDADD = libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
174 barvinok_count_SOURCES = barvinok_count.c
175 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
176 barvinok_union_SOURCES = barvinok_union.cc
178 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
183 FDSTREAM = fdstream.cc fdstream.h
185 barvinok_enumerate_SOURCES = \
186 barvinok_enumerate.cc \
198 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
199 barvinok_enumerate_e_SOURCES = \
200 barvinok_enumerate_e.cc \
213 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
214 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
215 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
216 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
217 barvinok_maximize_SOURCES = \
226 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
227 barvinok_summate_SOURCES = \
236 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
237 4coins_SOURCES = 4coins.cc
249 test_approx_SOURCES = \
254 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
261 basis_reduction_templ.c \
262 polysign_cdd_template.cc \
263 barvinok/NTL.h.broken \
264 barvinok/NTL.h.normal \
265 barvinok/set.h.broken \
266 barvinok/set.h.normal \
268 doc/applications.tex \
278 polymake/Makefile.in \
280 polymake/autogen.sh \
281 polymake/configure.in \
282 polymake/convert.cc \
284 polymake/h_star_vector.cc \
285 polymake/lattice_points.cc
287 ACLOCAL_AMFLAGS = -I m4
290 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
291 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
294 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
297 (cd $(distdir)/polymake; \
298 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
299 (cd doc; make barvinok.pdf)
300 cp doc/barvinok.pdf $(distdir)/doc/
301 if test -f $(top_srcdir)/.git/HEAD; then \
302 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
304 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
308 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
310 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
312 check: check-testlib check-enumerate check-enumerate_e check-test \
313 check-lexmin check-approx check-evalue check-euler check-lw
314 check-testlib: testlib$(EXEEXT)
316 check-approx: test_approx$(EXEEXT)
317 @for i in $(top_srcdir)/tests/ehrhart/*; do \
318 if test -f $$i; then \
319 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
322 check-evalue: @bv_barvinok_maximize@ barvinok_summate$(EXEEXT)
323 @for i in $(top_srcdir)/tests/evalue/*; do \
324 if test -f $$i; then \
326 if test -n "@bv_barvinok_maximize@"; then \
327 ./barvinok_maximize$(EXEEXT) -T < $$i || exit; \
329 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
332 check-euler: barvinok_summate$(EXEEXT)
333 @for i in $(top_srcdir)/tests/euler/*; do \
334 if test -f $$i; then \
336 ./barvinok_summate$(EXEEXT) -T --summation=euler < $$i || exit; \
340 TOPCOM_CD = '--chamber-decomposition=topcom'
342 check-enumerate: barvinok_enumerate$(EXEEXT)
343 @for i in $(top_srcdir)/tests/ehrhart/*; do \
344 if test -f $$i; then \
346 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
347 for spec in 'random' 'bf' 'df'; do \
348 opt="--specialization=$$spec $$options"; \
350 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
355 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
356 @for dir in $(BEE_TESTDIRS); do \
357 for i in $(top_srcdir)/tests/$$dir/*; do \
358 if test -f $$i; then \
359 for options in '' '--pip' '--pip --omega'; do \
360 for spec in 'random' 'bf' 'df'; do \
361 opt="--specialization=$$spec $$options"; \
363 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
369 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
370 if test -f $$i; then \
371 for spec in 'random' 'bf' 'df'; do \
372 opt="--specialization=$$spec --scarf"; \
374 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
378 check-test: test$(EXEEXT)
379 @for i in $(top_srcdir)/tests/*; do \
380 if test -f $$i; then \
381 for options in '--index=10' '--primal --index=10'; do \
382 for spec in 'random' 'bf' 'df' 'todd'; do \
383 opt="--specialization=$$spec $$options"; \
385 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
391 check-lw: test$(EXEEXT)
392 @for i in $(top_srcdir)/tests/lattice_width/*; do \
393 if test -f $$i; then \
395 ./test$(EXEEXT) < $$i || echo -n " NOT"; \
400 check-lexmin: lexmin$(EXEEXT)
401 @for i in $(top_srcdir)/tests/lexmin/*; do \
402 if test -f $$i; then \
403 for spec in 'random' 'bf' 'df'; do \
404 opt="--specialization=$$spec"; \
406 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
414 version.h: @GIT_HEAD@
415 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@