2 MAYBE_BERNSTEIN = bernstein
4 SUBDIRS = $(MAYBE_BERNSTEIN) lib . omega doc
8 $(MAKE) $(AM_MAKEFLAGS) -C lib libgnu.la
9 bernstein/libbernstein.la: FORCE
10 $(MAKE) $(AM_MAKEFLAGS) -C bernstein libbernstein.la
12 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib @GINACLIB_CPPFLAGS@
15 lib_LTLIBRARIES = libbarvinok.la
16 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
17 barvinok_ehrhart polytope_scan
18 noinst_PROGRAMS = test testlib randomtest \
19 remove_redundant_equalities \
20 barvinok_union polytope_volume test_approx \
22 @bv_extra_programs@ @bv_barvinok_maximize@
23 EXTRA_PROGRAMS = piptest verify_lexsmaller polyhedron_sample 4coins lexmin \
25 pkginclude_HEADERS = \
34 barvinok/basis_reduction.h \
36 nodist_pkginclude_HEADERS = \
42 BERNSTEIN_CC = bernstein.cc
45 BR_CDD = basis_reduction_cdd.cc initcdd.cc
46 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
49 BR_GLPK = basis_reduction_glpk.c
50 POLYSIGN_GLPK = polysign_glpk.c
52 libbarvinok_la_SOURCES = \
75 genfun_constructor.cc \
76 genfun_constructor.h \
106 EXTRA_libbarvinok_la_SOURCES = \
107 basis_reduction_cdd.cc \
108 basis_reduction_glpk.c \
117 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
119 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(BERNSTEIN_LA) lib/libgnu.la
120 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
121 LDADD = libbarvinok.la
123 test_SOURCES = test.c
128 barvinok_count_SOURCES = barvinok_count.c
129 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
130 barvinok_union_SOURCES = barvinok_union.cc
132 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
137 FDSTREAM = fdstream.cc fdstream.h
139 barvinok_enumerate_SOURCES = \
140 barvinok_enumerate.cc \
148 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
149 barvinok_enumerate_e_SOURCES = \
150 barvinok_enumerate_e.cc \
159 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
160 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
161 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
162 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la
163 barvinok_maximize_SOURCES = \
172 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
173 barvinok_summate_SOURCES = \
182 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
183 4coins_SOURCES = 4coins.cc
195 test_approx_SOURCES = \
200 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
207 basis_reduction_templ.c \
208 polysign_cdd_template.cc \
209 barvinok/NTL.h.broken \
210 barvinok/NTL.h.normal \
211 barvinok/set.h.broken \
212 barvinok/set.h.normal \
214 doc/applications.tex \
224 polymake/Makefile.in \
226 polymake/autogen.sh \
227 polymake/configure.in \
228 polymake/lattice_points.cc
230 ACLOCAL_AMFLAGS = -I m4
233 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
234 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
237 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
240 (cd $(distdir)/polymake; \
241 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
242 (cd doc; make barvinok.pdf)
243 cp doc/barvinok.pdf $(distdir)/doc/
244 if test -f $(top_srcdir)/.git/HEAD; then \
245 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
247 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
251 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
253 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf
256 check: check-testlib check-enumerate check-enumerate_e check-test \
257 check-lexmin check-approx check-evalue
258 check-testlib: testlib$(EXEEXT)
260 check-approx: test_approx$(EXEEXT)
261 @for i in $(top_srcdir)/tests/ehrhart/*; do \
262 if test -f $$i; then \
263 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
266 check-evalue: @bv_barvinok_maximize@ barvinok_summate$(EXEEXT)
267 @for i in $(top_srcdir)/tests/evalue/*; do \
268 if test -f $$i; then \
269 if test -n "@bv_barvinok_maximize@"; then \
270 ./barvinok_maximize$(EXEEXT) -T < $$i || exit; \
272 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
275 check-enumerate: barvinok_enumerate$(EXEEXT)
276 @for i in $(top_srcdir)/tests/ehrhart/*; do \
277 if test -f $$i; then \
279 for options in '' '--series' '--series --primal'; do \
280 for spec in 'random' 'bf' 'df'; do \
281 opt="--specialization=$$spec $$options"; \
283 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
288 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
289 @for dir in $(BEE_TESTDIRS); do \
290 for i in $(top_srcdir)/tests/$$dir/*; do \
291 if test -f $$i; then \
292 for options in '' '--pip' '--pip --omega'; do \
293 for spec in 'random' 'bf' 'df'; do \
294 opt="--specialization=$$spec $$options"; \
296 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
302 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
303 if test -f $$i; then \
304 for spec in 'random' 'bf' 'df'; do \
305 opt="--specialization=$$spec --scarf"; \
307 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
311 check-test: test$(EXEEXT)
312 @for i in $(top_srcdir)/tests/*; do \
313 if test -f $$i; then \
314 for options in '--index=10' '--primal --index=10'; do \
315 for spec in 'random' 'bf' 'df' 'todd'; do \
316 opt="--specialization=$$spec $$options"; \
318 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
325 check-lexmin: lexmin$(EXEEXT)
326 @for i in $(top_srcdir)/tests/lexmin/*; do \
327 if test -f $$i; then \
328 for spec in 'random' 'bf' 'df'; do \
329 opt="--specialization=$$spec"; \
331 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
339 version.h: @GIT_HEAD@
340 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@