2 MAYBE_BERNSTEIN = bernstein
5 MAYBE_POLYLIB = polylib
10 SUBDIRS = $(MAYBE_PIPLIB) $(MAYBE_POLYLIB) $(MAYBE_BERNSTEIN) lib . 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
22 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib \
23 @POLYLIB_CPPFLAGS@ @PIPLIB_CPPFLAGS@ @GINACLIB_CPPFLAGS@
24 AM_LDFLAGS = -Llib @POLYLIB_LDFLAGS@ @PIPLIB_LDFLAGS@
26 lib_LTLIBRARIES = libbarvinok.la
27 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
28 barvinok_ehrhart polytope_scan
29 noinst_PROGRAMS = test testlib randomtest \
30 remove_redundant_equalities \
31 barvinok_union polytope_volume test_approx \
32 barvinok_summate verify_lexsmaller piptest \
33 polyhedron_sample 4coins lexmin @bv_barvinok_maximize@
34 EXTRA_PROGRAMS = barvinok_maximize
35 pkginclude_HEADERS = \
44 barvinok/basis_reduction.h \
46 nodist_pkginclude_HEADERS = \
52 BERNSTEIN_CC = bernstein.cc
55 BR_CDD = basis_reduction_cdd.cc initcdd.cc
56 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
59 BR_GLPK = basis_reduction_glpk.c
60 POLYSIGN_GLPK = polysign_glpk.c
63 TOPCOM = topcom.c topcom.h
65 libbarvinok_la_SOURCES = \
72 basis_reduction_pip.c \
73 basis_reduction_pip_dual.c \
92 genfun_constructor.cc \
93 genfun_constructor.h \
110 remove_equalities.h \
111 remove_equalities.c \
131 EXTRA_libbarvinok_la_SOURCES = \
132 basis_reduction_cdd.cc \
133 basis_reduction_glpk.c \
143 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
146 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
149 PIPLIB_LA = $(top_builddir)/piplib/libpiplibMP.la
151 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(POLYLIB_LA) @POLYLIB_LIBS@ \
152 $(PIPLIB_LA) @PIPLIB_LIBS@ $(BERNSTEIN_LA) \
154 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
155 LDADD = libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
157 test_SOURCES = test.c
162 barvinok_count_SOURCES = barvinok_count.c
163 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
164 barvinok_union_SOURCES = barvinok_union.cc
166 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
171 FDSTREAM = fdstream.cc fdstream.h
173 barvinok_enumerate_SOURCES = \
174 barvinok_enumerate.cc \
182 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
183 barvinok_enumerate_e_SOURCES = \
184 barvinok_enumerate_e.cc \
193 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
194 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
195 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
196 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la @POLYLIB_LIBS@ @PIPLIB_LIBS@
197 barvinok_maximize_SOURCES = \
206 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
207 barvinok_summate_SOURCES = \
216 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
217 4coins_SOURCES = 4coins.cc
229 test_approx_SOURCES = \
234 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
241 basis_reduction_templ.c \
242 polysign_cdd_template.cc \
243 barvinok/NTL.h.broken \
244 barvinok/NTL.h.normal \
245 barvinok/set.h.broken \
246 barvinok/set.h.normal \
248 doc/applications.tex \
258 polymake/Makefile.in \
260 polymake/autogen.sh \
261 polymake/configure.in \
262 polymake/convert.cc \
264 polymake/h_star_vector.cc \
265 polymake/lattice_points.cc
267 ACLOCAL_AMFLAGS = -I m4
270 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
271 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
274 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
277 (cd $(distdir)/polymake; \
278 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
279 (cd doc; make barvinok.pdf)
280 cp doc/barvinok.pdf $(distdir)/doc/
281 if test -f $(top_srcdir)/.git/HEAD; then \
282 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
284 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
288 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
290 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
292 check: check-testlib check-enumerate check-enumerate_e check-test \
293 check-lexmin check-approx check-evalue check-euler
294 check-testlib: testlib$(EXEEXT)
296 check-approx: test_approx$(EXEEXT)
297 @for i in $(top_srcdir)/tests/ehrhart/*; do \
298 if test -f $$i; then \
299 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
302 check-evalue: @bv_barvinok_maximize@ barvinok_summate$(EXEEXT)
303 @for i in $(top_srcdir)/tests/evalue/*; do \
304 if test -f $$i; then \
306 if test -n "@bv_barvinok_maximize@"; then \
307 ./barvinok_maximize$(EXEEXT) -T < $$i || exit; \
309 ./barvinok_summate$(EXEEXT) -T < $$i || exit; \
312 check-euler: barvinok_summate$(EXEEXT)
313 @for i in $(top_srcdir)/tests/euler/*; do \
314 if test -f $$i; then \
316 ./barvinok_summate$(EXEEXT) -T --summation=euler < $$i || exit; \
320 TOPCOM_CD = '--chamber-decomposition=topcom'
322 check-enumerate: barvinok_enumerate$(EXEEXT)
323 @for i in $(top_srcdir)/tests/ehrhart/*; do \
324 if test -f $$i; then \
326 for options in '' '--series' '--series --primal' $(TOPCOM_CD); do \
327 for spec in 'random' 'bf' 'df'; do \
328 opt="--specialization=$$spec $$options"; \
330 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
335 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
336 @for dir in $(BEE_TESTDIRS); do \
337 for i in $(top_srcdir)/tests/$$dir/*; do \
338 if test -f $$i; then \
339 for options in '' '--pip' '--pip --omega'; do \
340 for spec in 'random' 'bf' 'df'; do \
341 opt="--specialization=$$spec $$options"; \
343 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
349 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
350 if test -f $$i; then \
351 for spec in 'random' 'bf' 'df'; do \
352 opt="--specialization=$$spec --scarf"; \
354 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
358 check-test: test$(EXEEXT)
359 @for i in $(top_srcdir)/tests/*; do \
360 if test -f $$i; then \
361 for options in '--index=10' '--primal --index=10'; do \
362 for spec in 'random' 'bf' 'df' 'todd'; do \
363 opt="--specialization=$$spec $$options"; \
365 ./test$(EXEEXT) $$opt < $$i || echo -n " NOT"; \
372 check-lexmin: lexmin$(EXEEXT)
373 @for i in $(top_srcdir)/tests/lexmin/*; do \
374 if test -f $$i; then \
375 for spec in 'random' 'bf' 'df'; do \
376 opt="--specialization=$$spec"; \
378 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
386 version.h: @GIT_HEAD@
387 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@