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@
164 test_SOURCES = test.c
169 barvinok_count_SOURCES = barvinok_count.c
170 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
171 barvinok_union_SOURCES = barvinok_union.cc
173 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
178 FDSTREAM = fdstream.cc fdstream.h
180 barvinok_enumerate_SOURCES = \
181 barvinok_enumerate.cc \
193 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
194 barvinok_enumerate_e_SOURCES = \
195 barvinok_enumerate_e.cc \
208 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
209 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
210 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
211 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
212 barvinok_maximize_SOURCES = \
221 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
222 barvinok_summate_SOURCES = \
231 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
232 4coins_SOURCES = 4coins.cc
244 test_approx_SOURCES = \
249 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
256 basis_reduction_templ.c \
257 polysign_cdd_template.cc \
258 barvinok/NTL.h.broken \
259 barvinok/NTL.h.normal \
260 barvinok/set.h.broken \
261 barvinok/set.h.normal \
263 doc/applications.tex \
273 polymake/Makefile.in \
275 polymake/autogen.sh \
276 polymake/configure.in \
277 polymake/convert.cc \
279 polymake/h_star_vector.cc \
280 polymake/lattice_points.cc
282 ACLOCAL_AMFLAGS = -I m4
285 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
286 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
289 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
292 (cd $(distdir)/polymake; \
293 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
294 (cd doc; make barvinok.pdf)
295 cp doc/barvinok.pdf $(distdir)/doc/
296 if test -f $(top_srcdir)/.git/HEAD; then \
297 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
299 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
303 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
305 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
307 check: check-testlib check-enumerate check-enumerate_e check-test \
308 check-lexmin check-approx check-evalue check-euler
309 check-testlib: testlib$(EXEEXT)
311 check-approx: test_approx$(EXEEXT)
312 @for i in $(top_srcdir)/tests/ehrhart/*; do \
313 if test -f $$i; then \
314 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
317 check-evalue: @bv_barvinok_maximize@ barvinok_summate$(EXEEXT)
318 @for i in $(top_srcdir)/tests/evalue/*; do \
319 if test -f $$i; then \
321 if test -n "@bv_barvinok_maximize@"; then \
322 ./barvinok_maximize$(EXEEXT) -T < $$i || exit; \
324 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
327 check-euler: barvinok_summate$(EXEEXT)
328 @for i in $(top_srcdir)/tests/euler/*; do \
329 if test -f $$i; then \
331 ./barvinok_summate$(EXEEXT) -T --summation=euler < $$i || exit; \
335 TOPCOM_CD = '--chamber-decomposition=topcom'
337 check-enumerate: barvinok_enumerate$(EXEEXT)
338 @for i in $(top_srcdir)/tests/ehrhart/*; do \
339 if test -f $$i; then \
341 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
342 for spec in 'random' 'bf' 'df'; do \
343 opt="--specialization=$$spec $$options"; \
345 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
350 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
351 @for dir in $(BEE_TESTDIRS); do \
352 for i in $(top_srcdir)/tests/$$dir/*; do \
353 if test -f $$i; then \
354 for options in '' '--pip' '--pip --omega'; do \
355 for spec in 'random' 'bf' 'df'; do \
356 opt="--specialization=$$spec $$options"; \
358 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
364 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
365 if test -f $$i; then \
366 for spec in 'random' 'bf' 'df'; do \
367 opt="--specialization=$$spec --scarf"; \
369 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
373 check-test: test$(EXEEXT)
374 @for i in $(top_srcdir)/tests/*; do \
375 if test -f $$i; then \
376 for options in '--index=10' '--primal --index=10'; do \
377 for spec in 'random' 'bf' 'df' 'todd'; do \
378 opt="--specialization=$$spec $$options"; \
380 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
387 check-lexmin: lexmin$(EXEEXT)
388 @for i in $(top_srcdir)/tests/lexmin/*; do \
389 if test -f $$i; then \
390 for spec in 'random' 'bf' 'df'; do \
391 opt="--specialization=$$spec"; \
393 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
401 version.h: @GIT_HEAD@
402 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@