2 MAYBE_BERNSTEIN = bernstein
4 SUBDIRS = $(MAYBE_BERNSTEIN) lib . omega doc
6 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib @GINACLIB_CPPFLAGS@
9 lib_LTLIBRARIES = libbarvinok.la
10 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
12 noinst_PROGRAMS = test randomtest \
13 remove_redundant_equalities \
14 barvinok_union barvinok_maximize polytope_volume test_approx \
16 EXTRA_PROGRAMS = piptest verify_lexsmaller polyhedron_sample 4coins lexmin \
18 pkginclude_HEADERS = \
27 barvinok/basis_reduction.h \
32 BERNSTEIN_CC = bernstein.cc
35 BR_CDD = basis_reduction_cdd.cc initcdd.cc
38 BR_GLPK = basis_reduction_glpk.c
40 libbarvinok_la_SOURCES = \
59 genfun_constructor.cc \
60 genfun_constructor.h \
80 EXTRA_libbarvinok_la_SOURCES = \
86 BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
88 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(BERNSTEIN_LA) lib/libgnu.la
89 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
90 LDADD = libbarvinok.la
93 barvinok_count_SOURCES = barvinok_count.c
94 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
95 barvinok_union_SOURCES = barvinok_union.cc
97 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
101 barvinok_enumerate_SOURCES = \
102 barvinok_enumerate.cc \
111 barvinok_enumerate_e_SOURCES = \
112 barvinok_enumerate_e.cc \
122 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
123 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
124 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la
125 barvinok_maximize_SOURCES = \
133 4coins_SOURCES = 4coins.cc
135 POLYSIGN = polysign_cddf.cc polysign_cdd.cc
154 EXTRA_lexmin_SOURCE = polysign_cddf.cc polysign_cdd.cc polysign.c
155 test_approx_SOURCES = \
160 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
168 doc/applications.tex \
178 polymake/Makefile.in \
180 polymake/autogen.sh \
181 polymake/configure.in \
182 polymake/lattice_points.cc
184 ACLOCAL_AMFLAGS = -I m4
187 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
188 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
191 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
194 (cd $(distdir)/polymake; \
195 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
196 (cd doc; make barvinok.pdf)
197 cp doc/barvinok.pdf $(distdir)/doc/
198 if test -f $(top_srcdir)/.git/HEAD; then \
199 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
201 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
205 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
207 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf
210 check: check-enumerate check-enumerate_e check-test check-lexmin check-approx
211 check-approx: test_approx
212 @for i in $(top_srcdir)/tests/ehrhart/*; do \
213 if test -f $$i; then \
214 echo $$i | ./test_approx -q -r 10 ; \
217 check-enumerate: barvinok_enumerate
218 @for i in $(top_srcdir)/tests/ehrhart/*; do \
219 if test -f $$i; then \
221 for options in '' '--series' '--series --primal'; do \
222 for spec in 'random' 'bf' 'df'; do \
223 opt="--specialization=$$spec $$options"; \
225 ./barvinok_enumerate --verify $$opt < $$i; \
230 check-enumerate_e: barvinok_enumerate_e
231 @for dir in $(BEE_TESTDIRS); do \
232 for i in $(top_srcdir)/tests/$$dir/*; do \
233 if test -f $$i; then \
234 for options in '' '--pip' '--pip --omega'; do \
235 for spec in 'random' 'bf' 'df'; do \
236 opt="--specialization=$$spec $$options"; \
238 ./barvinok_enumerate_e --verify $$opt < $$i; \
244 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
245 if test -f $$i; then \
246 for spec in 'random' 'bf' 'df'; do \
247 opt="--specialization=$$spec --scarf"; \
249 ./barvinok_enumerate_e --verify $$opt < $$i; \
254 @for i in $(top_srcdir)/tests/*; do \
255 if test -f $$i; then \
256 for options in '--index=10' '--primal --index=10'; do \
257 for spec in 'random' 'bf' 'df'; do \
258 opt="--specialization=$$spec $$options"; \
260 ./test $$opt < $$i || echo -n " NOT"; \
268 @for i in $(top_srcdir)/tests/lexmin/*; do \
269 if test -f $$i; then \
270 for spec in 'random' 'bf' 'df'; do \
271 opt="--specialization=$$spec"; \
273 ./lexmin --verify $$opt < $$i; \
281 version.h: @GIT_HEAD@
282 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@