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 CLOOG_LA = $(top_builddir)/cloog/libcloog-isl.la
24 OMEGA_LA = $(top_builddir)/omega/omega_lib/libomega.la
32 SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_ISL_POLYLIB) \
33 $(MAYBE_CLOOG) $(MAYBE_OMEGA) \
34 $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . doc
35 DIST_SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) \
36 $(MAYBE_ISL_POLYLIB) $(MAYBE_CLOOG) $(MAYBE_OMEGA) \
40 polylib/libpolylibgmp.la: FORCE
41 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
43 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
44 isl-polylib/libisl-polylib.la: $(LOCAL_ISL_LA) $(LOCAL_POLYLIB_LA) FORCE
45 cd isl-polylib; $(MAKE) $(AM_MAKEFLAGS) libisl-polylib.la
46 cloog/libcloog-isl.la: $(LOCAL_ISL_LA) FORCE
47 cd cloog; $(MAKE) $(AM_MAKEFLAGS) libcloog-isl.la
48 omega/omega_lib/libomega.la: FORCE
49 cd omega/omega_lib; $(MAKE) $(AM_MAKEFLAGS) libomega.la
50 zsolve/libzsolve.la: FORCE
51 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
52 parker/libparker.la: FORCE
53 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
55 AM_CPPFLAGS = @POLYLIB_CPPFLAGS@ \
56 @ISL_CFLAGS@ @ISL_POLYLIB_CFLAGS@ @NTL_CPPFLAGS@
57 AM_LDFLAGS = @POLYLIB_LDFLAGS@ @NTL_LDFLAGS@
59 LIB_ISL = $(ISL_LA) @ISL_LIBS@
60 LIB_ISL_POLYLIB = $(ISL_POLYLIB_LA) @ISL_POLYLIB_LIBS@
61 LIB_CLOOG = $(CLOOG_LA) @CLOOG_LIBS@
63 lib_LTLIBRARIES = libbarvinok.la
64 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
65 barvinok_ehrhart polytope_scan iscc
66 noinst_PROGRAMS = test testlib randomtest \
67 remove_redundant_equalities \
68 barvinok_union polytope_volume test_approx \
69 barvinok_summate verify_lexsmaller \
70 polyhedron_sample 4coins lexmin \
71 @bv_cone_hilbert_basis@ cone_integer_hull \
72 polytope_lattice_width \
73 polyhedron_integer_hull vector_partition_chambers \
74 semigroup_holes evalue_convert \
75 barvinok_bound test_bound
76 EXTRA_PROGRAMS = cone_hilbert_basis
77 pkginclude_HEADERS = \
87 barvinok/basis_reduction.h
88 nodist_pkginclude_HEADERS = \
94 BR_CDD = basis_reduction_cdd.cc initcdd.cc
95 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
98 BR_GLPK = basis_reduction_glpk.c
99 POLYSIGN_GLPK = polysign_glpk.c
102 TOPCOM = topcom.c topcom.h
105 HILBERT_C = hilbert.c
107 libbarvinok_la_SOURCES = \
111 barvinok/barvinok.h \
135 genfun_constructor.cc \
136 genfun_constructor.h \
156 param_polynomial.cc \
172 remove_equalities.h \
173 remove_equalities.c \
196 EXTRA_libbarvinok_la_SOURCES = \
197 basis_reduction_cdd.cc \
198 basis_reduction_glpk.c \
208 ZSOLVE_LA = zsolve/libzsolve.la
210 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL_POLYLIB) $(LIB_ISL) \
211 $(POLYLIB_LA) @POLYLIB_LIBS@ \
213 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
215 LDADD = libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
226 barvinok_count_SOURCES = barvinok_count.c
227 barvinok_ehrhart_SOURCES = \
228 barvinok_ehrhart_options.c \
229 barvinok_ehrhart_options.h \
230 barvinok_ehrhart.cc \
231 evalue_convert_options.c \
235 barvinok_union_SOURCES = \
236 barvinok_union_options.c \
237 barvinok_union_options.h \
241 omega_interface/Exit.cc \
242 omega_interface/convert.h \
243 omega_interface/convert.cc \
244 omega_interface/count.h \
245 omega_interface/count.cc
250 FDSTREAM = fdstream.cc fdstream.h
252 barvinok_enumerate_SOURCES = \
253 barvinok_enumerate_options.c \
254 barvinok_enumerate_options.h \
255 barvinok_enumerate.cc \
256 evalue_convert_options.c \
268 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
269 barvinok_enumerate_e_SOURCES = \
270 barvinok_enumerate_e_options.c \
271 barvinok_enumerate_e_options.h \
272 barvinok_enumerate_e.cc \
273 evalue_convert_options.c \
286 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
288 MONA_LIBS = -ldfa -lbdd -lmem
289 PARKER_LA = parker/libparker.la
290 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
291 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
293 barvinok_enumerate_e_CPPFLAGS = \
294 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
295 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
296 barvinok_enumerate_e_LDADD = \
297 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ $(OMEGA_LA) libbarvinok.la \
298 @ISL_POLYLIB_LIBS@ @ISL_LIBS@ @POLYLIB_LIBS@
299 barvinok_bound_SOURCES = \
303 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
304 barvinok_bound_LDADD = \
305 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
307 barvinok_summate_SOURCES = \
311 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
312 4coins_SOURCES = 4coins.cc
313 semigroup_holes_SOURCES = semigroup_holes.cc
324 test_approx_SOURCES = \
328 test_bound_SOURCES = \
332 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
334 libbarvinok.la @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
336 evalue_convert_SOURCES = \
337 evalue_convert_main.c \
338 evalue_convert_options.c \
350 iscc_CPPFLAGS = @CLOOG_CFLAGS@ $(AM_CPPFLAGS)
352 libbarvinok.la $(LIB_CLOOG) @ISL_POLYLIB_LIBS@ @ISL_LIBS@ \
355 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
362 basis_reduction_templ.c \
364 polysign_cdd_template.cc \
365 barvinok/NTL.h.broken \
366 barvinok/NTL.h.normal \
367 barvinok/set.h.broken \
368 barvinok/set.h.normal \
371 doc/applications.tex \
380 polymake/Makefile.in \
382 polymake/autogen.sh \
383 polymake/configure.in \
384 polymake/convert.cc \
386 polymake/h_star_vector.cc \
387 polymake/lattice_points.cc
389 ACLOCAL_AMFLAGS = -I m4
392 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
393 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
396 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
399 (cd $(distdir)/polymake; \
400 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
401 (cd doc; make barvinok.pdf)
402 cp doc/barvinok.pdf $(distdir)/doc/
403 if test -f $(top_srcdir)/.git/HEAD; then \
404 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
406 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
410 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
412 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
414 check: check-testlib check-enumerate check-enumerate_e check-test \
415 check-lexmin check-approx check-pwqp check-euler check-lw
416 check-testlib: testlib$(EXEEXT)
418 check-approx: test_approx$(EXEEXT)
419 @for i in $(top_srcdir)/tests/ehrhart/*; do \
420 if test -f $$i; then \
421 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
424 check-pwqp: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
425 @for i in $(top_srcdir)/tests/pwqp/*; do \
426 if test -f $$i; then \
428 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
429 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
430 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
433 check-euler: barvinok_summate$(EXEEXT)
434 @for i in $(top_srcdir)/tests/euler/*; do \
435 if test -f $$i; then \
436 for method in 'euler' 'laurent_old' 'laurent'; do \
437 opt="--summation=$$method"; \
439 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
444 TOPCOM_CD = '--chamber-decomposition=topcom'
446 ISL_CD = '--chamber-decomposition=isl'
447 check-enumerate: barvinok_enumerate$(EXEEXT)
448 @for i in $(top_srcdir)/tests/ehrhart/*; do \
449 if test -f $$i; then \
451 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
452 for spec in 'random' 'bf' 'df'; do \
453 opt="--specialization=$$spec $$options"; \
455 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
458 opt="--summation=bernoulli"; \
460 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
464 SPEC_OMEGA = '--isl --omega'
466 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
467 @for dir in $(BEE_TESTDIRS); do \
468 for i in $(top_srcdir)/tests/$$dir/*; do \
469 if test -f $$i; then \
470 for options in '' $(SPEC_OMEGA) '--isl'; do \
471 for spec in 'random' 'bf' 'df'; do \
472 opt="--specialization=$$spec $$options"; \
474 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
480 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
481 if test -f $$i; then \
482 for spec in 'random' 'bf' 'df'; do \
483 opt="--specialization=$$spec --scarf"; \
485 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
488 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
491 check-test: test$(EXEEXT)
493 for i in $(top_srcdir)/tests/*; do \
494 if test -f $$i; then \
495 for options in '--index=10' '--primal --index=10'; do \
496 for spec in 'random' 'bf' 'df' 'todd'; do \
497 opt="--specialization=$$spec $$options"; \
499 ./test$(EXEEXT) $$opt < $$i; \
500 if test "$$?" -ne "0"; then \
501 failed=`expr $$failed + 1`; \
510 for i in $(top_srcdir)/tests/sample/*; do \
512 ./test$(EXEEXT) < $$i; \
513 if test "$$?" -ne "0"; then \
514 failed=`expr $$failed + 1`; \
520 if test $$failed != 0; then \
521 echo "$$failed tests failed"; \
524 check-lw: test$(EXEEXT)
526 for i in $(top_srcdir)/tests/lattice_width/*; do \
527 if test -f $$i; then \
529 ./test$(EXEEXT) < $$i; \
530 if test "$$?" -ne "0"; then \
531 failed=`expr $$failed + 1`; \
538 if test $$failed != 0; then \
539 echo "$$failed tests failed"; \
542 check-lexmin: lexmin$(EXEEXT)
543 @for i in $(top_srcdir)/tests/lexmin/*; do \
544 if test -f $$i; then \
545 for spec in 'random' 'bf' 'df'; do \
546 opt="--specialization=$$spec"; \
548 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
553 version.h: @GIT_HEAD@
554 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@