2 MAYBE_BERNSTEIN = bernstein
4 SUBDIRS = $(MAYBE_BERNSTEIN) lib . omega doc
7 $(MAKE) $(AM_MAKEFLAGS) -C lib libgnu.la
8 bernstein/libbernstein.la:
9 $(MAKE) $(AM_MAKEFLAGS) -C bernstein libbernstein.la
11 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib @GINACLIB_CPPFLAGS@
14 lib_LTLIBRARIES = libbarvinok.la
15 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
17 noinst_PROGRAMS = test randomtest \
18 remove_redundant_equalities \
19 barvinok_union polytope_volume test_approx \
21 EXTRA_PROGRAMS = piptest verify_lexsmaller polyhedron_sample 4coins lexmin \
22 polytope_scan barvinok_maximize
23 pkginclude_HEADERS = \
32 barvinok/basis_reduction.h \
34 nodist_pkginclude_HEADERS = \
40 BERNSTEIN_CC = bernstein.cc
43 BR_CDD = basis_reduction_cdd.cc initcdd.cc
46 BR_GLPK = basis_reduction_glpk.c
48 libbarvinok_la_SOURCES = \
67 genfun_constructor.cc \
68 genfun_constructor.h \
88 EXTRA_libbarvinok_la_SOURCES = \
89 basis_reduction_cdd.cc \
90 basis_reduction_glpk.c \
96 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
98 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(BERNSTEIN_LA) lib/libgnu.la
99 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
100 LDADD = libbarvinok.la
102 test_SOURCES = test.c
103 barvinok_count_SOURCES = barvinok_count.c
104 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
105 barvinok_union_SOURCES = barvinok_union.cc
107 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
112 FDSTREAM = fdstream.cc fdstream.h
114 barvinok_enumerate_SOURCES = \
115 barvinok_enumerate.cc \
123 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
124 barvinok_enumerate_e_SOURCES = \
125 barvinok_enumerate_e.cc \
134 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
135 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
136 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
137 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la
138 barvinok_maximize_SOURCES = \
145 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
146 4coins_SOURCES = 4coins.cc
148 POLYSIGN = polysign_cddf.cc polysign_cdd.cc
165 EXTRA_lexmin_SOURCES = polysign_cddf.cc polysign_cdd.cc polysign.c
166 test_approx_SOURCES = \
171 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
178 basis_reduction_templ.c \
179 polysign_cdd_template.cc \
180 barvinok/NTL.h.broken \
181 barvinok/NTL.h.normal \
182 barvinok/set.h.broken \
183 barvinok/set.h.normal \
185 doc/applications.tex \
195 polymake/Makefile.in \
197 polymake/autogen.sh \
198 polymake/configure.in \
199 polymake/lattice_points.cc
201 ACLOCAL_AMFLAGS = -I m4
204 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
205 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
208 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
211 (cd $(distdir)/polymake; \
212 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
213 (cd doc; make barvinok.pdf)
214 cp doc/barvinok.pdf $(distdir)/doc/
215 if test -f $(top_srcdir)/.git/HEAD; then \
216 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
218 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
222 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
224 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf
227 check: check-enumerate check-enumerate_e check-test check-lexmin check-approx
228 check-approx: test_approx
229 @for i in $(top_srcdir)/tests/ehrhart/*; do \
230 if test -f $$i; then \
231 echo $$i | ./test_approx -q -r 10 ; \
234 check-enumerate: barvinok_enumerate
235 @for i in $(top_srcdir)/tests/ehrhart/*; do \
236 if test -f $$i; then \
238 for options in '' '--series' '--series --primal'; do \
239 for spec in 'random' 'bf' 'df'; do \
240 opt="--specialization=$$spec $$options"; \
242 ./barvinok_enumerate --verify $$opt < $$i; \
247 check-enumerate_e: barvinok_enumerate_e
248 @for dir in $(BEE_TESTDIRS); do \
249 for i in $(top_srcdir)/tests/$$dir/*; do \
250 if test -f $$i; then \
251 for options in '' '--pip' '--pip --omega'; do \
252 for spec in 'random' 'bf' 'df'; do \
253 opt="--specialization=$$spec $$options"; \
255 ./barvinok_enumerate_e --verify $$opt < $$i; \
261 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
262 if test -f $$i; then \
263 for spec in 'random' 'bf' 'df'; do \
264 opt="--specialization=$$spec --scarf"; \
266 ./barvinok_enumerate_e --verify $$opt < $$i; \
271 @for i in $(top_srcdir)/tests/*; do \
272 if test -f $$i; then \
273 for options in '--index=10' '--primal --index=10'; do \
274 for spec in 'random' 'bf' 'df'; do \
275 opt="--specialization=$$spec $$options"; \
277 ./test $$opt < $$i || echo -n " NOT"; \
285 @for i in $(top_srcdir)/tests/lexmin/*; do \
286 if test -f $$i; then \
287 for spec in 'random' 'bf' 'df'; do \
288 opt="--specialization=$$spec"; \
290 ./lexmin --verify $$opt < $$i; \
298 version.h: @GIT_HEAD@
299 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@