2 MAYBE_POLYLIB = polylib
3 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
4 LOCAL_POLYLIB_LA = polylib/libpolylibgmp.la
8 ISL_LA = $(top_builddir)/isl/libisl.la
9 LOCAL_ISL_LA = isl/libisl.la
12 ISL_LA = $(ISL_BUILDDIR)/libisl.la
14 if BUNDLED_ISL_POLYLIB
15 MAYBE_ISL_POLYLIB = isl-polylib
16 ISL_POLYLIB_LA = $(top_builddir)/isl-polylib/libisl-polylib.la
20 OMEGA_LA = $(top_builddir)/omega/omega_lib/libomega.la
28 SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_ISL_POLYLIB) \
30 $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . doc
31 DIST_SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) \
32 $(MAYBE_ISL_POLYLIB) $(MAYBE_OMEGA) \
36 polylib/libpolylibgmp.la: FORCE
37 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
39 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
40 isl-polylib/libisl-polylib.la: $(LOCAL_ISL_LA) $(LOCAL_POLYLIB_LA) FORCE
41 cd isl-polylib; $(MAKE) $(AM_MAKEFLAGS) libisl-polylib.la
42 omega/omega_lib/libomega.la: FORCE
43 cd omega/omega_lib; $(MAKE) $(AM_MAKEFLAGS) libomega.la
44 zsolve/libzsolve.la: FORCE
45 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
46 parker/libparker.la: FORCE
47 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
49 AM_CPPFLAGS = @POLYLIB_CPPFLAGS@ \
50 @ISL_CFLAGS@ @ISL_POLYLIB_CFLAGS@ @NTL_CPPFLAGS@
51 AM_LDFLAGS = @POLYLIB_LDFLAGS@ @NTL_LDFLAGS@
53 LIB_ISL = $(ISL_LA) @ISL_LIBS@
54 LIB_ISL_POLYLIB = $(ISL_POLYLIB_LA) @ISL_POLYLIB_LIBS@
56 lib_LTLIBRARIES = libbarvinok.la
57 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
58 barvinok_ehrhart polytope_scan iscc
59 noinst_PROGRAMS = test testlib randomtest \
60 remove_redundant_equalities \
61 barvinok_union polytope_volume test_approx \
62 barvinok_summate verify_lexsmaller \
63 polyhedron_sample 4coins lexmin \
64 @bv_cone_hilbert_basis@ cone_integer_hull \
65 polytope_lattice_width \
66 polyhedron_integer_hull vector_partition_chambers \
67 semigroup_holes evalue_convert \
68 barvinok_bound test_bound
69 EXTRA_PROGRAMS = cone_hilbert_basis
70 pkginclude_HEADERS = \
80 barvinok/basis_reduction.h
81 nodist_pkginclude_HEADERS = \
87 BR_CDD = basis_reduction_cdd.cc initcdd.cc
88 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
91 BR_GLPK = basis_reduction_glpk.c
92 POLYSIGN_GLPK = polysign_glpk.c
95 TOPCOM = topcom.c topcom.h
100 libbarvinok_la_SOURCES = \
104 barvinok/barvinok.h \
128 genfun_constructor.cc \
129 genfun_constructor.h \
149 param_polynomial.cc \
165 remove_equalities.h \
166 remove_equalities.c \
189 EXTRA_libbarvinok_la_SOURCES = \
190 basis_reduction_cdd.cc \
191 basis_reduction_glpk.c \
201 ZSOLVE_LA = zsolve/libzsolve.la
203 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL_POLYLIB) $(LIB_ISL) \
204 $(POLYLIB_LA) @POLYLIB_LIBS@ \
206 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
208 LDADD = libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
219 barvinok_count_SOURCES = barvinok_count.c
220 barvinok_ehrhart_SOURCES = \
221 barvinok_ehrhart_options.c \
222 barvinok_ehrhart_options.h \
223 barvinok_ehrhart.cc \
224 evalue_convert_options.c \
228 barvinok_union_SOURCES = \
229 barvinok_union_options.c \
230 barvinok_union_options.h \
234 omega_interface/Exit.cc \
235 omega_interface/convert.h \
236 omega_interface/convert.cc \
237 omega_interface/count.h \
238 omega_interface/count.cc
243 FDSTREAM = fdstream.cc fdstream.h
245 barvinok_enumerate_SOURCES = \
246 barvinok_enumerate_options.c \
247 barvinok_enumerate_options.h \
248 barvinok_enumerate.cc \
249 evalue_convert_options.c \
261 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
262 barvinok_enumerate_e_SOURCES = \
263 barvinok_enumerate_e_options.c \
264 barvinok_enumerate_e_options.h \
265 barvinok_enumerate_e.cc \
266 evalue_convert_options.c \
279 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
281 MONA_LIBS = -ldfa -lbdd -lmem
282 PARKER_LA = parker/libparker.la
283 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
284 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
286 barvinok_enumerate_e_CPPFLAGS = \
287 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
288 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
289 barvinok_enumerate_e_LDADD = \
290 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok.la \
291 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@
292 barvinok_bound_SOURCES = \
296 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
297 barvinok_bound_LDADD = \
298 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
300 barvinok_summate_SOURCES = \
304 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
305 4coins_SOURCES = 4coins.cc
306 semigroup_holes_SOURCES = semigroup_holes.cc
317 test_approx_SOURCES = \
321 test_bound_SOURCES = \
325 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
327 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
329 evalue_convert_SOURCES = \
330 evalue_convert_main.c \
331 evalue_convert_options.c \
343 iscc_CPPFLAGS = @CLOOG_CFLAGS@ $(AM_CPPFLAGS)
345 libbarvinok.la @CLOOG_LIBS@ @CLOOG_LIBS@ @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
348 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
355 basis_reduction_templ.c \
357 polysign_cdd_template.cc \
358 barvinok/NTL.h.broken \
359 barvinok/NTL.h.normal \
360 barvinok/set.h.broken \
361 barvinok/set.h.normal \
364 doc/applications.tex \
373 polymake/Makefile.in \
375 polymake/autogen.sh \
376 polymake/configure.in \
377 polymake/convert.cc \
379 polymake/h_star_vector.cc \
380 polymake/lattice_points.cc
382 ACLOCAL_AMFLAGS = -I m4
385 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
386 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
389 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
392 (cd $(distdir)/polymake; \
393 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
394 (cd doc; make barvinok.pdf)
395 cp doc/barvinok.pdf $(distdir)/doc/
396 if test -f $(top_srcdir)/.git/HEAD; then \
397 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
399 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
403 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
405 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
407 check: check-testlib check-enumerate check-enumerate_e check-test \
408 check-lexmin check-approx check-pwqp check-euler check-lw
409 check-testlib: testlib$(EXEEXT)
411 check-approx: test_approx$(EXEEXT)
412 @for i in $(top_srcdir)/tests/ehrhart/*; do \
413 if test -f $$i; then \
414 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
417 check-pwqp: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
418 @for i in $(top_srcdir)/tests/pwqp/*; do \
419 if test -f $$i; then \
421 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
422 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
423 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
426 check-euler: barvinok_summate$(EXEEXT)
427 @for i in $(top_srcdir)/tests/euler/*; do \
428 if test -f $$i; then \
429 for method in 'euler' 'laurent_old' 'laurent'; do \
430 opt="--summation=$$method"; \
432 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
437 TOPCOM_CD = '--chamber-decomposition=topcom'
439 ISL_CD = '--chamber-decomposition=isl'
440 check-enumerate: barvinok_enumerate$(EXEEXT)
441 @for i in $(top_srcdir)/tests/ehrhart/*; do \
442 if test -f $$i; then \
444 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
445 for spec in 'random' 'bf' 'df'; do \
446 opt="--specialization=$$spec $$options"; \
448 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
451 opt="--summation=bernoulli"; \
453 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
457 SPEC_OMEGA = '--isl --omega'
459 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
460 @for dir in $(BEE_TESTDIRS); do \
461 for i in $(top_srcdir)/tests/$$dir/*; do \
462 if test -f $$i; then \
463 for options in '' $(SPEC_OMEGA) '--isl'; do \
464 for spec in 'random' 'bf' 'df'; do \
465 opt="--specialization=$$spec $$options"; \
467 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
473 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
474 if test -f $$i; then \
475 for spec in 'random' 'bf' 'df'; do \
476 opt="--specialization=$$spec --scarf"; \
478 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
481 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
484 check-test: test$(EXEEXT)
486 for i in $(top_srcdir)/tests/*; do \
487 if test -f $$i; then \
488 for options in '--index=10' '--primal --index=10'; do \
489 for spec in 'random' 'bf' 'df' 'todd'; do \
490 opt="--specialization=$$spec $$options"; \
492 ./test$(EXEEXT) $$opt < $$i; \
493 if test "$$?" -ne "0"; then \
494 failed=`expr $$failed + 1`; \
503 for i in $(top_srcdir)/tests/sample/*; do \
505 ./test$(EXEEXT) < $$i; \
506 if test "$$?" -ne "0"; then \
507 failed=`expr $$failed + 1`; \
513 if test $$failed != 0; then \
514 echo "$$failed tests failed"; \
517 check-lw: test$(EXEEXT)
519 for i in $(top_srcdir)/tests/lattice_width/*; do \
520 if test -f $$i; then \
522 ./test$(EXEEXT) < $$i; \
523 if test "$$?" -ne "0"; then \
524 failed=`expr $$failed + 1`; \
531 if test $$failed != 0; then \
532 echo "$$failed tests failed"; \
535 check-lexmin: lexmin$(EXEEXT)
536 @for i in $(top_srcdir)/tests/lexmin/*; do \
537 if test -f $$i; then \
538 for spec in 'random' 'bf' 'df'; do \
539 opt="--specialization=$$spec"; \
541 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
546 version.h: @GIT_HEAD@
547 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@