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 \
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 \
120 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
121 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
122 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la
123 barvinok_maximize_SOURCES = \
129 4coins_SOURCES = 4coins.cc
131 POLYSIGN = polysign_cddf.cc polysign_cdd.cc
150 EXTRA_lexmin_SOURCE = polysign_cddf.cc polysign_cdd.cc polysign.c
152 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
160 doc/applications.tex \
170 polymake/Makefile.in \
172 polymake/autogen.sh \
173 polymake/configure.in \
174 polymake/lattice_points.cc
176 ACLOCAL_AMFLAGS = -I m4
179 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
180 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
183 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
186 (cd $(distdir)/polymake; \
187 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
188 (cd doc; make barvinok.pdf)
189 cp doc/barvinok.pdf $(distdir)/doc/
190 if test -f $(top_srcdir)/.git/HEAD; then \
191 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
193 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
197 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
199 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf
202 check: check-enumerate check-enumerate_e check-test check-lexmin
203 check-enumerate: barvinok_enumerate
204 @for i in $(top_srcdir)/tests/ehrhart/*; do \
205 if test -f $$i; then \
207 for options in '' '--series' '--series --primal'; do \
208 for spec in 'random' 'bf' 'df'; do \
209 opt="--specialization=$$spec $$options"; \
211 ./barvinok_enumerate --verify $$opt < $$i; \
216 check-enumerate_e: barvinok_enumerate_e
217 @for dir in $(BEE_TESTDIRS); do \
218 for i in $(top_srcdir)/tests/$$dir/*; do \
219 if test -f $$i; then \
220 for options in '' '--pip' '--pip --omega'; do \
221 for spec in 'random' 'bf' 'df'; do \
222 opt="--specialization=$$spec $$options"; \
224 ./barvinok_enumerate_e --verify $$opt < $$i; \
230 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
231 if test -f $$i; then \
232 for spec in 'random' 'bf' 'df'; do \
233 opt="--specialization=$$spec --scarf"; \
235 ./barvinok_enumerate_e --verify $$opt < $$i; \
240 @for i in $(top_srcdir)/tests/*; do \
241 if test -f $$i; then \
242 for options in '--index=10' '--primal --index=10'; do \
243 for spec in 'random' 'bf' 'df'; do \
244 opt="--specialization=$$spec $$options"; \
246 ./test $$opt < $$i || echo -n " NOT"; \
254 @for i in $(top_srcdir)/tests/lexmin/*; do \
255 if test -f $$i; then \
256 for spec in 'random' 'bf' 'df'; do \
257 opt="--specialization=$$spec"; \
259 ./lexmin --verify $$opt < $$i; \
267 version.h: @GIT_HEAD@
268 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@