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@ @GINACLIB_CPPFLAGS@
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
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 \
119 remove_equalities.h \
120 remove_equalities.c \
138 EXTRA_libbarvinok_la_SOURCES = \
139 basis_reduction_cdd.cc \
140 basis_reduction_glpk.c \
150 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
153 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
156 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
158 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
159 $(PIPLIB_LA) @PIPLIB_LIBS@ $(BERNSTEIN_LA) \
160 zsolve/libzsolve.la lib/libgnu.la
161 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
162 LDADD = libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
172 barvinok_count_SOURCES = barvinok_count.c
173 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
174 barvinok_union_SOURCES = barvinok_union.cc
176 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
181 FDSTREAM = fdstream.cc fdstream.h
183 barvinok_enumerate_SOURCES = \
184 barvinok_enumerate.cc \
196 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
197 barvinok_enumerate_e_SOURCES = \
198 barvinok_enumerate_e.cc \
211 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
212 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
213 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
214 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
215 barvinok_maximize_SOURCES = \
224 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
225 barvinok_summate_SOURCES = \
234 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
235 4coins_SOURCES = 4coins.cc
247 test_approx_SOURCES = \
252 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
259 basis_reduction_templ.c \
260 polysign_cdd_template.cc \
261 barvinok/NTL.h.broken \
262 barvinok/NTL.h.normal \
263 barvinok/set.h.broken \
264 barvinok/set.h.normal \
266 doc/applications.tex \
276 polymake/Makefile.in \
278 polymake/autogen.sh \
279 polymake/configure.in \
280 polymake/convert.cc \
282 polymake/h_star_vector.cc \
283 polymake/lattice_points.cc
285 ACLOCAL_AMFLAGS = -I m4
288 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
289 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
292 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
295 (cd $(distdir)/polymake; \
296 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
297 (cd doc; make barvinok.pdf)
298 cp doc/barvinok.pdf $(distdir)/doc/
299 if test -f $(top_srcdir)/.git/HEAD; then \
300 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
302 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
306 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
308 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
310 check: check-testlib check-enumerate check-enumerate_e check-test \
311 check-lexmin check-approx check-evalue check-euler check-lw
312 check-testlib: testlib$(EXEEXT)
314 check-approx: test_approx$(EXEEXT)
315 @for i in $(top_srcdir)/tests/ehrhart/*; do \
316 if test -f $$i; then \
317 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
320 check-evalue: @bv_barvinok_maximize@ barvinok_summate$(EXEEXT)
321 @for i in $(top_srcdir)/tests/evalue/*; do \
322 if test -f $$i; then \
324 if test -n "@bv_barvinok_maximize@"; then \
325 ./barvinok_maximize$(EXEEXT) -T < $$i || exit; \
327 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
330 check-euler: barvinok_summate$(EXEEXT)
331 @for i in $(top_srcdir)/tests/euler/*; do \
332 if test -f $$i; then \
334 ./barvinok_summate$(EXEEXT) -T --summation=euler < $$i || exit; \
338 TOPCOM_CD = '--chamber-decomposition=topcom'
340 check-enumerate: barvinok_enumerate$(EXEEXT)
341 @for i in $(top_srcdir)/tests/ehrhart/*; do \
342 if test -f $$i; then \
344 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
345 for spec in 'random' 'bf' 'df'; do \
346 opt="--specialization=$$spec $$options"; \
348 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
353 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
354 @for dir in $(BEE_TESTDIRS); do \
355 for i in $(top_srcdir)/tests/$$dir/*; do \
356 if test -f $$i; then \
357 for options in '' '--pip' '--pip --omega'; do \
358 for spec in 'random' 'bf' 'df'; do \
359 opt="--specialization=$$spec $$options"; \
361 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
367 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
368 if test -f $$i; then \
369 for spec in 'random' 'bf' 'df'; do \
370 opt="--specialization=$$spec --scarf"; \
372 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
376 check-test: test$(EXEEXT)
377 @for i in $(top_srcdir)/tests/*; do \
378 if test -f $$i; then \
379 for options in '--index=10' '--primal --index=10'; do \
380 for spec in 'random' 'bf' 'df' 'todd'; do \
381 opt="--specialization=$$spec $$options"; \
383 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
389 check-lw: test$(EXEEXT)
390 @for i in $(top_srcdir)/tests/lattice_width/*; do \
391 if test -f $$i; then \
393 ./test$(EXEEXT) < $$i || echo -n " NOT"; \
398 check-lexmin: lexmin$(EXEEXT)
399 @for i in $(top_srcdir)/tests/lexmin/*; do \
400 if test -f $$i; then \
401 for spec in 'random' 'bf' 'df'; do \
402 opt="--specialization=$$spec"; \
404 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
412 version.h: @GIT_HEAD@
413 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@