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@ \
37 EXTRA_PROGRAMS = barvinok_maximize
38 pkginclude_HEADERS = \
47 barvinok/basis_reduction.h \
49 nodist_pkginclude_HEADERS = \
55 BERNSTEIN_CC = bernstein.cc
58 BR_CDD = basis_reduction_cdd.cc initcdd.cc
59 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
62 BR_GLPK = basis_reduction_glpk.c
63 POLYSIGN_GLPK = polysign_glpk.c
66 TOPCOM = topcom.c topcom.h
68 libbarvinok_la_SOURCES = \
75 basis_reduction_pip.c \
76 basis_reduction_pip_dual.c \
95 genfun_constructor.cc \
96 genfun_constructor.h \
115 remove_equalities.h \
116 remove_equalities.c \
134 EXTRA_libbarvinok_la_SOURCES = \
135 basis_reduction_cdd.cc \
136 basis_reduction_glpk.c \
146 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
149 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
152 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
154 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
155 $(PIPLIB_LA) @PIPLIB_LIBS@ $(BERNSTEIN_LA) \
156 zsolve/libzsolve.la lib/libgnu.la
157 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
158 LDADD = libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
160 test_SOURCES = test.c
165 barvinok_count_SOURCES = barvinok_count.c
166 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
167 barvinok_union_SOURCES = barvinok_union.cc
169 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
174 FDSTREAM = fdstream.cc fdstream.h
176 barvinok_enumerate_SOURCES = \
177 barvinok_enumerate.cc \
189 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
190 barvinok_enumerate_e_SOURCES = \
191 barvinok_enumerate_e.cc \
204 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
205 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
206 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
207 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
208 barvinok_maximize_SOURCES = \
217 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
218 barvinok_summate_SOURCES = \
227 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
228 4coins_SOURCES = 4coins.cc
240 test_approx_SOURCES = \
245 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
252 basis_reduction_templ.c \
253 polysign_cdd_template.cc \
254 barvinok/NTL.h.broken \
255 barvinok/NTL.h.normal \
256 barvinok/set.h.broken \
257 barvinok/set.h.normal \
259 doc/applications.tex \
269 polymake/Makefile.in \
271 polymake/autogen.sh \
272 polymake/configure.in \
273 polymake/convert.cc \
275 polymake/h_star_vector.cc \
276 polymake/lattice_points.cc
278 ACLOCAL_AMFLAGS = -I m4
281 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
282 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
285 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
288 (cd $(distdir)/polymake; \
289 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
290 (cd doc; make barvinok.pdf)
291 cp doc/barvinok.pdf $(distdir)/doc/
292 if test -f $(top_srcdir)/.git/HEAD; then \
293 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
295 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
299 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
301 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
303 check: check-testlib check-enumerate check-enumerate_e check-test \
304 check-lexmin check-approx check-evalue check-euler
305 check-testlib: testlib$(EXEEXT)
307 check-approx: test_approx$(EXEEXT)
308 @for i in $(top_srcdir)/tests/ehrhart/*; do \
309 if test -f $$i; then \
310 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
313 check-evalue: @bv_barvinok_maximize@ barvinok_summate$(EXEEXT)
314 @for i in $(top_srcdir)/tests/evalue/*; do \
315 if test -f $$i; then \
317 if test -n "@bv_barvinok_maximize@"; then \
318 ./barvinok_maximize$(EXEEXT) -T < $$i || exit; \
320 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
323 check-euler: barvinok_summate$(EXEEXT)
324 @for i in $(top_srcdir)/tests/euler/*; do \
325 if test -f $$i; then \
327 ./barvinok_summate$(EXEEXT) -T --summation=euler < $$i || exit; \
331 TOPCOM_CD = '--chamber-decomposition=topcom'
333 check-enumerate: barvinok_enumerate$(EXEEXT)
334 @for i in $(top_srcdir)/tests/ehrhart/*; do \
335 if test -f $$i; then \
337 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
338 for spec in 'random' 'bf' 'df'; do \
339 opt="--specialization=$$spec $$options"; \
341 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
346 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
347 @for dir in $(BEE_TESTDIRS); do \
348 for i in $(top_srcdir)/tests/$$dir/*; do \
349 if test -f $$i; then \
350 for options in '' '--pip' '--pip --omega'; do \
351 for spec in 'random' 'bf' 'df'; do \
352 opt="--specialization=$$spec $$options"; \
354 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
360 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
361 if test -f $$i; then \
362 for spec in 'random' 'bf' 'df'; do \
363 opt="--specialization=$$spec --scarf"; \
365 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
369 check-test: test$(EXEEXT)
370 @for i in $(top_srcdir)/tests/*; do \
371 if test -f $$i; then \
372 for options in '--index=10' '--primal --index=10'; do \
373 for spec in 'random' 'bf' 'df' 'todd'; do \
374 opt="--specialization=$$spec $$options"; \
376 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
383 check-lexmin: lexmin$(EXEEXT)
384 @for i in $(top_srcdir)/tests/lexmin/*; do \
385 if test -f $$i; then \
386 for spec in 'random' 'bf' 'df'; do \
387 opt="--specialization=$$spec"; \
389 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
397 version.h: @GIT_HEAD@
398 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@