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
30 parker/libparker.la: FORCE
31 $(MAKE) $(AM_MAKEFLAGS) -C parker libparker.la
33 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib \
34 @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ @ginac_CFLAGS@
35 AM_LDFLAGS = -Llib @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@
37 lib_LTLIBRARIES = libbarvinok-core.la libbarvinok.la
38 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
39 barvinok_ehrhart polytope_scan
40 noinst_PROGRAMS = test testlib randomtest \
41 remove_redundant_equalities \
42 barvinok_union polytope_volume test_approx \
43 barvinok_summate verify_lexsmaller piptest \
44 polyhedron_sample 4coins lexmin @bv_barvinok_bound@ \
45 @bv_cone_hilbert_basis@ cone_integer_hull \
46 polytope_lattice_width polytope_minimize \
47 polyhedron_integer_hull
48 EXTRA_PROGRAMS = barvinok_bound test_bound cone_hilbert_basis
49 pkginclude_HEADERS = \
58 barvinok/basis_reduction.h \
60 nodist_pkginclude_HEADERS = \
66 BR_CDD = basis_reduction_cdd.cc initcdd.cc
67 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
70 BR_GLPK = basis_reduction_glpk.c
71 POLYSIGN_GLPK = polysign_glpk.c
74 TOPCOM = topcom.c topcom.h
79 libbarvinok_core_la_SOURCES = \
86 basis_reduction_pip.c \
87 basis_reduction_pip_dual.c \
106 genfun_constructor.cc \
107 genfun_constructor.h \
135 remove_equalities.h \
136 remove_equalities.c \
153 EXTRA_libbarvinok_la_SOURCES = \
154 basis_reduction_cdd.cc \
155 basis_reduction_glpk.c \
168 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
171 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
174 ZSOLVE_LA = zsolve/libzsolve.la
176 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
177 $(PIPLIB_LA) @PIPLIB_LIBS@ \
178 $(ZSOLVE_LA) lib/libgnu.la
179 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
181 BERNSTEIN_CC = bernstein.cc range.cc
183 libbarvinok_la_SOURCES = \
186 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
188 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
189 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
190 LDADD = libbarvinok-core.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
200 barvinok_count_SOURCES = barvinok_count.c
201 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
202 barvinok_union_SOURCES = barvinok_union.cc
204 BEEO_SOURCES = omega/Exit.cc omega/convert.cc omega/count.cc
209 FDSTREAM = fdstream.cc fdstream.h
211 barvinok_enumerate_SOURCES = \
212 barvinok_enumerate.cc \
224 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
225 barvinok_enumerate_e_SOURCES = \
226 barvinok_enumerate_e.cc \
239 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
241 MONA_LIBS = -ldfa -lbdd -lmem
242 PARKER_LA = parker/libparker.la
243 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
244 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
246 barvinok_enumerate_e_CPPFLAGS = \
247 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
248 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
249 barvinok_enumerate_e_LDADD = \
250 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ libbarvinok-core.la \
251 @POLYLIB_LIBS@ @PIPLIB_LIBS@
252 barvinok_bound_SOURCES = \
261 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
262 barvinok_bound_LDADD = \
263 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
264 barvinok_summate_SOURCES = \
273 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
274 4coins_SOURCES = 4coins.cc
286 test_approx_SOURCES = \
290 test_bound_SOURCES = \
299 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
301 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
303 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
310 basis_reduction_templ.c \
311 polysign_cdd_template.cc \
312 barvinok/NTL.h.broken \
313 barvinok/NTL.h.normal \
314 barvinok/set.h.broken \
315 barvinok/set.h.normal \
317 doc/applications.tex \
327 polymake/Makefile.in \
329 polymake/autogen.sh \
330 polymake/configure.in \
331 polymake/convert.cc \
333 polymake/h_star_vector.cc \
334 polymake/lattice_points.cc
336 ACLOCAL_AMFLAGS = -I m4
339 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
340 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
343 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
346 (cd $(distdir)/polymake; \
347 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
348 (cd doc; make barvinok.pdf)
349 cp doc/barvinok.pdf $(distdir)/doc/
350 if test -f $(top_srcdir)/.git/HEAD; then \
351 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
353 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
357 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
359 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
361 check: check-testlib check-enumerate check-enumerate_e check-test \
362 check-lexmin check-approx check-evalue check-euler check-lw
363 check-testlib: testlib$(EXEEXT)
365 check-approx: test_approx$(EXEEXT)
366 @for i in $(top_srcdir)/tests/ehrhart/*; do \
367 if test -f $$i; then \
368 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
371 check-evalue: @bv_barvinok_bound@ barvinok_summate$(EXEEXT)
372 @for i in $(top_srcdir)/tests/evalue/*; do \
373 if test -f $$i; then \
375 if test -n "@bv_barvinok_bound@"; then \
376 ./barvinok_bound$(EXEEXT) -T < $$i || exit; \
377 echo $$i | ./test_bound$(EXEEXT) -q || exit; \
379 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
382 check-euler: barvinok_summate$(EXEEXT)
383 @for i in $(top_srcdir)/tests/euler/*; do \
384 if test -f $$i; then \
386 ./barvinok_summate$(EXEEXT) -T --summation=euler < $$i || exit; \
390 TOPCOM_CD = '--chamber-decomposition=topcom'
392 check-enumerate: barvinok_enumerate$(EXEEXT)
393 @for i in $(top_srcdir)/tests/ehrhart/*; do \
394 if test -f $$i; then \
396 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
397 for spec in 'random' 'bf' 'df'; do \
398 opt="--specialization=$$spec $$options"; \
400 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
403 opt="--summation=bernoulli"; \
405 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
408 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
409 @for dir in $(BEE_TESTDIRS); do \
410 for i in $(top_srcdir)/tests/$$dir/*; do \
411 if test -f $$i; then \
412 for options in '' '--pip' '--pip --omega'; do \
413 for spec in 'random' 'bf' 'df'; do \
414 opt="--specialization=$$spec $$options"; \
416 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
422 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
423 if test -f $$i; then \
424 for spec in 'random' 'bf' 'df'; do \
425 opt="--specialization=$$spec --scarf"; \
427 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
430 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
433 check-test: test$(EXEEXT)
434 @for i in $(top_srcdir)/tests/*; do \
435 if test -f $$i; then \
436 for options in '--index=10' '--primal --index=10'; do \
437 for spec in 'random' 'bf' 'df' 'todd'; do \
438 opt="--specialization=$$spec $$options"; \
440 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
446 check-lw: test$(EXEEXT)
447 @for i in $(top_srcdir)/tests/lattice_width/*; do \
448 if test -f $$i; then \
450 ./test$(EXEEXT) < $$i || echo -n " NOT"; \
455 check-lexmin: lexmin$(EXEEXT)
456 @for i in $(top_srcdir)/tests/lexmin/*; do \
457 if test -f $$i; then \
458 for spec in 'random' 'bf' 'df'; do \
459 opt="--specialization=$$spec"; \
461 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
469 version.h: @GIT_HEAD@
470 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@