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-core.la 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 BR_CDD = basis_reduction_cdd.cc initcdd.cc
58 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
61 BR_GLPK = basis_reduction_glpk.c
62 POLYSIGN_GLPK = polysign_glpk.c
65 TOPCOM = topcom.c topcom.h
67 libbarvinok_core_la_SOURCES = \
74 basis_reduction_pip.c \
75 basis_reduction_pip_dual.c \
94 genfun_constructor.cc \
95 genfun_constructor.h \
121 remove_equalities.h \
122 remove_equalities.c \
139 EXTRA_libbarvinok_la_SOURCES = \
140 basis_reduction_cdd.cc \
141 basis_reduction_glpk.c \
151 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
154 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
156 libbarvinok_core_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
157 $(PIPLIB_LA) @PIPLIB_LIBS@ \
158 zsolve/libzsolve.la lib/libgnu.la
159 libbarvinok_core_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
161 BERNSTEIN_CC = bernstein.cc
163 libbarvinok_la_SOURCES = \
166 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
168 libbarvinok_la_LIBADD = libbarvinok-core.la $(BERNSTEIN_LA)
169 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
170 LDADD = libbarvinok-core.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
180 barvinok_count_SOURCES = barvinok_count.c
181 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
182 barvinok_union_SOURCES = barvinok_union.cc
184 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
189 FDSTREAM = fdstream.cc fdstream.h
191 barvinok_enumerate_SOURCES = \
192 barvinok_enumerate.cc \
204 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
205 barvinok_enumerate_e_SOURCES = \
206 barvinok_enumerate_e.cc \
219 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
220 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
221 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
222 barvinok_enumerate_e_LDADD = \
223 @OMEGA_LIBS@ libbarvinok-core.la \
224 @POLYLIB_LIBS@ @PIPLIB_LIBS@
225 barvinok_maximize_SOURCES = \
234 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
235 barvinok_maximize_LDADD = \
236 libbarvinok-core.la libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
237 barvinok_summate_SOURCES = \
246 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
247 4coins_SOURCES = 4coins.cc
259 test_approx_SOURCES = \
264 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
271 basis_reduction_templ.c \
272 polysign_cdd_template.cc \
273 barvinok/NTL.h.broken \
274 barvinok/NTL.h.normal \
275 barvinok/set.h.broken \
276 barvinok/set.h.normal \
278 doc/applications.tex \
288 polymake/Makefile.in \
290 polymake/autogen.sh \
291 polymake/configure.in \
292 polymake/convert.cc \
294 polymake/h_star_vector.cc \
295 polymake/lattice_points.cc
297 ACLOCAL_AMFLAGS = -I m4
300 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
301 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
304 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
307 (cd $(distdir)/polymake; \
308 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
309 (cd doc; make barvinok.pdf)
310 cp doc/barvinok.pdf $(distdir)/doc/
311 if test -f $(top_srcdir)/.git/HEAD; then \
312 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
314 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
318 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
320 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
322 check: check-testlib check-enumerate check-enumerate_e check-test \
323 check-lexmin check-approx check-evalue check-euler check-lw
324 check-testlib: testlib$(EXEEXT)
326 check-approx: test_approx$(EXEEXT)
327 @for i in $(top_srcdir)/tests/ehrhart/*; do \
328 if test -f $$i; then \
329 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
332 check-evalue: @bv_barvinok_maximize@ barvinok_summate$(EXEEXT)
333 @for i in $(top_srcdir)/tests/evalue/*; do \
334 if test -f $$i; then \
336 if test -n "@bv_barvinok_maximize@"; then \
337 ./barvinok_maximize$(EXEEXT) -T < $$i || exit; \
339 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
342 check-euler: barvinok_summate$(EXEEXT)
343 @for i in $(top_srcdir)/tests/euler/*; do \
344 if test -f $$i; then \
346 ./barvinok_summate$(EXEEXT) -T --summation=euler < $$i || exit; \
350 TOPCOM_CD = '--chamber-decomposition=topcom'
352 check-enumerate: barvinok_enumerate$(EXEEXT)
353 @for i in $(top_srcdir)/tests/ehrhart/*; do \
354 if test -f $$i; then \
356 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
357 for spec in 'random' 'bf' 'df'; do \
358 opt="--specialization=$$spec $$options"; \
360 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
365 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
366 @for dir in $(BEE_TESTDIRS); do \
367 for i in $(top_srcdir)/tests/$$dir/*; do \
368 if test -f $$i; then \
369 for options in '' '--pip' '--pip --omega'; do \
370 for spec in 'random' 'bf' 'df'; do \
371 opt="--specialization=$$spec $$options"; \
373 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
379 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
380 if test -f $$i; then \
381 for spec in 'random' 'bf' 'df'; do \
382 opt="--specialization=$$spec --scarf"; \
384 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
388 check-test: test$(EXEEXT)
389 @for i in $(top_srcdir)/tests/*; do \
390 if test -f $$i; then \
391 for options in '--index=10' '--primal --index=10'; do \
392 for spec in 'random' 'bf' 'df' 'todd'; do \
393 opt="--specialization=$$spec $$options"; \
395 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
401 check-lw: test$(EXEEXT)
402 @for i in $(top_srcdir)/tests/lattice_width/*; do \
403 if test -f $$i; then \
405 ./test$(EXEEXT) < $$i || echo -n " NOT"; \
410 check-lexmin: lexmin$(EXEEXT)
411 @for i in $(top_srcdir)/tests/lexmin/*; do \
412 if test -f $$i; then \
413 for spec in 'random' 'bf' 'df'; do \
414 opt="--specialization=$$spec"; \
416 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
424 version.h: @GIT_HEAD@
425 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@