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 testlib randomtest \
18 remove_redundant_equalities \
19 barvinok_union polytope_volume test_approx \
22 EXTRA_PROGRAMS = piptest verify_lexsmaller polyhedron_sample 4coins lexmin \
23 polytope_scan barvinok_maximize
24 pkginclude_HEADERS = \
33 barvinok/basis_reduction.h \
35 nodist_pkginclude_HEADERS = \
41 BERNSTEIN_CC = bernstein.cc
44 BR_CDD = basis_reduction_cdd.cc initcdd.cc
47 BR_GLPK = basis_reduction_glpk.c
49 libbarvinok_la_SOURCES = \
72 genfun_constructor.cc \
73 genfun_constructor.h \
97 EXTRA_libbarvinok_la_SOURCES = \
98 basis_reduction_cdd.cc \
99 basis_reduction_glpk.c \
105 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
107 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(BERNSTEIN_LA) lib/libgnu.la
108 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
109 LDADD = libbarvinok.la
111 test_SOURCES = test.c
116 barvinok_count_SOURCES = barvinok_count.c
117 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
118 barvinok_union_SOURCES = barvinok_union.cc
120 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
125 FDSTREAM = fdstream.cc fdstream.h
127 barvinok_enumerate_SOURCES = \
128 barvinok_enumerate.cc \
136 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
137 barvinok_enumerate_e_SOURCES = \
138 barvinok_enumerate_e.cc \
147 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
148 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
149 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
150 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la
151 barvinok_maximize_SOURCES = \
160 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
161 barvinok_summate_SOURCES = \
170 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
171 4coins_SOURCES = 4coins.cc
173 POLYSIGN = polysign_cddf.cc polysign_cdd.cc
190 EXTRA_lexmin_SOURCES = polysign_cddf.cc polysign_cdd.cc polysign.c
191 test_approx_SOURCES = \
196 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
203 basis_reduction_templ.c \
204 polysign_cdd_template.cc \
205 barvinok/NTL.h.broken \
206 barvinok/NTL.h.normal \
207 barvinok/set.h.broken \
208 barvinok/set.h.normal \
210 doc/applications.tex \
220 polymake/Makefile.in \
222 polymake/autogen.sh \
223 polymake/configure.in \
224 polymake/lattice_points.cc
226 ACLOCAL_AMFLAGS = -I m4
229 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
230 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
233 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
236 (cd $(distdir)/polymake; \
237 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
238 (cd doc; make barvinok.pdf)
239 cp doc/barvinok.pdf $(distdir)/doc/
240 if test -f $(top_srcdir)/.git/HEAD; then \
241 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
243 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
247 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
249 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf
252 check: check-testlib check-enumerate check-enumerate_e check-test \
253 check-lexmin check-approx check-evalue
254 check-testlib: testlib
256 check-approx: test_approx
257 @for i in $(top_srcdir)/tests/ehrhart/*; do \
258 if test -f $$i; then \
259 echo $$i | ./test_approx -q -r 10 ; \
262 check-evalue: barvinok_maximize barvinok_summate
263 @for i in $(top_srcdir)/tests/evalue/*; do \
264 if test -f $$i; then \
265 ./barvinok_maximize -T < $$i; \
266 ./barvinok_summate -T < $$i; \
269 check-enumerate: barvinok_enumerate
270 @for i in $(top_srcdir)/tests/ehrhart/*; do \
271 if test -f $$i; then \
273 for options in '' '--series' '--series --primal'; do \
274 for spec in 'random' 'bf' 'df'; do \
275 opt="--specialization=$$spec $$options"; \
277 ./barvinok_enumerate --verify $$opt < $$i; \
282 check-enumerate_e: barvinok_enumerate_e
283 @for dir in $(BEE_TESTDIRS); do \
284 for i in $(top_srcdir)/tests/$$dir/*; do \
285 if test -f $$i; then \
286 for options in '' '--pip' '--pip --omega'; do \
287 for spec in 'random' 'bf' 'df'; do \
288 opt="--specialization=$$spec $$options"; \
290 ./barvinok_enumerate_e --verify $$opt < $$i; \
296 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
297 if test -f $$i; then \
298 for spec in 'random' 'bf' 'df'; do \
299 opt="--specialization=$$spec --scarf"; \
301 ./barvinok_enumerate_e --verify $$opt < $$i; \
306 @for i in $(top_srcdir)/tests/*; do \
307 if test -f $$i; then \
308 for options in '--index=10' '--primal --index=10'; do \
309 for spec in 'random' 'bf' 'df' 'todd'; do \
310 opt="--specialization=$$spec $$options"; \
312 ./test $$opt < $$i || echo -n " NOT"; \
320 @for i in $(top_srcdir)/tests/lexmin/*; do \
321 if test -f $$i; then \
322 for spec in 'random' 'bf' 'df'; do \
323 opt="--specialization=$$spec"; \
325 ./lexmin --verify $$opt < $$i; \
333 version.h: @GIT_HEAD@
334 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@