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
16 PET_LA = $(top_builddir)/pet/libpet.la
19 PET_LA = $(PET_BUILDDIR)/libpet.la
27 SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_PET) \
28 $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . doc
29 DIST_SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_PET) \
33 polylib/libpolylibgmp.la: FORCE
34 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
36 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
38 cd pet; $(MAKE) $(AM_MAKEFLAGS) libpet.la
39 zsolve/libzsolve.la: FORCE
40 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
41 parker/libparker.la: FORCE
42 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
44 AM_CPPFLAGS = @POLYLIB_CPPFLAGS@ \
45 @ISL_CFLAGS@ @NTL_CPPFLAGS@
46 AM_LDFLAGS = @POLYLIB_LDFLAGS@ @NTL_LDFLAGS@
48 LIB_ISL = $(ISL_LA) @ISL_LIBS@
49 LIB_PET = $(PET_LA) @PET_LIBS@
50 LIB_POLYLIB = $(POLYLIB_LA) @POLYLIB_LIBS@
52 lib_LTLIBRARIES = libbarvinok.la
53 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
54 barvinok_ehrhart polytope_scan iscc
55 noinst_PROGRAMS = test testlib randomtest \
56 remove_redundant_equalities \
57 barvinok_union polytope_volume test_approx \
58 barvinok_summate verify_lexsmaller \
59 polyhedron_sample 4coins lexmin \
60 @bv_cone_hilbert_basis@ cone_integer_hull \
61 polytope_lattice_width \
62 polyhedron_integer_hull vector_partition_chambers \
64 barvinok_bound test_bound
65 EXTRA_PROGRAMS = cone_hilbert_basis
66 pkginclude_HEADERS = \
76 barvinok/basis_reduction.h
77 nodist_pkginclude_HEADERS = \
83 BR_CDD = basis_reduction_cdd.cc initcdd.cc
84 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
87 BR_GLPK = basis_reduction_glpk.c
88 POLYSIGN_GLPK = polysign_glpk.c
91 TOPCOM = topcom.c topcom.h
96 libbarvinok_la_SOURCES = \
100 barvinok/barvinok.h \
124 genfun_constructor.cc \
125 genfun_constructor.h \
151 param_polynomial.cc \
166 remove_equalities.h \
167 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) \
204 $(LIB_POLYLIB) $(ZSOLVE_LA)
205 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@ \
207 LDADD = libbarvinok.la $(LIB_ISL) $(LIB_POLYLIB)
215 barvinok_count_SOURCES = barvinok_count.c
216 barvinok_ehrhart_SOURCES = \
217 barvinok_ehrhart_options.c \
218 barvinok_ehrhart_options.h \
219 barvinok_ehrhart.cc \
220 evalue_convert_options.c \
224 barvinok_union_SOURCES = \
225 barvinok_union_options.c \
226 barvinok_union_options.h \
230 omega_interface/Exit.cc \
231 omega_interface/convert.h \
232 omega_interface/convert.cc \
233 omega_interface/count.h \
234 omega_interface/count.cc
239 FDSTREAM = fdstream.cc fdstream.h
241 barvinok_enumerate_SOURCES = \
242 barvinok_enumerate_options.c \
243 barvinok_enumerate_options.h \
244 barvinok_enumerate.cc \
245 evalue_convert_options.c \
255 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
256 barvinok_enumerate_e_SOURCES = \
257 barvinok_enumerate_e_options.c \
258 barvinok_enumerate_e_options.h \
259 barvinok_enumerate_e.cc \
260 evalue_convert_options.c \
273 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
275 MONA_LIBS = -ldfa -lbdd -lmem
276 PARKER_LA = parker/libparker.la
277 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
278 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
280 barvinok_enumerate_e_CPPFLAGS = \
281 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
282 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
283 barvinok_enumerate_e_LDADD = \
284 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ libbarvinok.la \
285 $(LIB_ISL) $(LIB_POLYLIB)
286 barvinok_bound_SOURCES = \
290 EXTRA_barvinok_bound_SOURCES = fdstream.cc fdstream.h
291 barvinok_summate_SOURCES = \
295 EXTRA_barvinok_summate_SOURCES = fdstream.cc fdstream.h
296 4coins_SOURCES = 4coins.cc
297 semigroup_holes_SOURCES = semigroup_holes.cc
308 test_approx_SOURCES = \
312 test_bound_SOURCES = \
316 EXTRA_test_bound_SOURCES = fdstream.cc fdstream.h
323 iscc_CPPFLAGS = @PET_CFLAGS@ $(AM_CPPFLAGS)
325 libbarvinok.la $(LIB_PET) $(LIB_ISL) \
328 isl.py: interface/isl.py.top
329 (cat interface/isl.py.top; \
330 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT) \
331 $(DEFAULT_INCLUDES) @ISL_CFLAGS@ -I"@ISL_SRCDIR@" \
332 $(srcdir)/interface/all_barvinok.h) \
335 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
342 basis_reduction_templ.c \
344 polysign_cdd_template.cc \
345 barvinok/NTL.h.broken \
346 barvinok/NTL.h.normal \
347 barvinok/set.h.broken \
348 barvinok/set.h.normal \
351 doc/applications.tex \
360 interface/all_barvinok.h \
361 interface/isl.py.top \
362 polymake/Makefile.in \
364 polymake/autogen.sh \
365 polymake/configure.in \
366 polymake/convert.cc \
368 polymake/h_star_vector.cc \
369 polymake/lattice_points.cc
371 ACLOCAL_AMFLAGS = -I m4
374 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
375 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
378 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
381 cp isl.py $(distdir)/
382 (cd $(distdir)/polymake; \
383 ./autogen.sh; rm -rf autogen.sh autom4te.cache)
384 (cd doc; make barvinok.pdf)
385 cp doc/barvinok.pdf $(distdir)/doc/
386 if test -f $(top_srcdir)/.git/HEAD; then \
387 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
389 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
393 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
395 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
397 check: check-testlib check-enumerate check-enumerate_e check-test \
398 check-lexmin check-approx check-pwqp check-euler check-iscc \
400 check-testlib: testlib$(EXEEXT)
402 check-approx: test_approx$(EXEEXT)
403 @for i in $(top_srcdir)/tests/ehrhart/*; do \
404 if test -f $$i; then \
405 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
408 check-pwqp: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
409 @for i in $(top_srcdir)/tests/pwqp/*; do \
410 if test -f $$i; then \
412 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
413 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
414 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
417 check-euler: barvinok_summate$(EXEEXT)
418 @for i in $(top_srcdir)/tests/euler/*; do \
419 if test -f $$i; then \
420 for method in 'euler' 'laurent_old' 'laurent'; do \
421 opt="--summation=$$method"; \
423 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
427 @for t in dull EML_p EML-product EML line square square_p square \
428 square_p3 triangle triangle2 triangle_p quasi; do \
429 i=$(top_srcdir)/tests/euler/$$t.pwqp; \
430 if test -f $$i; then \
431 opt="--summation=box"; \
433 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
436 @for t in dull dull_p EML line square square_p square \
437 square_p3 triangle triangle2 triangle_p; do \
438 i=$(top_srcdir)/tests/euler/$$t.pwqp; \
439 if test -f $$i; then \
440 opt="--summation=bernoulli"; \
442 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
446 TOPCOM_CD = '--chamber-decomposition=topcom'
448 ISL_CD = '--chamber-decomposition=isl'
449 check-enumerate: barvinok_enumerate$(EXEEXT)
450 @for i in $(top_srcdir)/tests/ehrhart/*; do \
451 if test -f $$i; then \
453 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
454 for spec in 'random' 'bf' 'df'; do \
455 opt="--specialization=$$spec $$options"; \
457 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
462 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
463 opt="--summation=bernoulli"; \
465 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
469 SPEC_OMEGA = '--isl --omega'
471 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
472 @for dir in $(BEE_TESTDIRS); do \
473 for i in $(top_srcdir)/tests/$$dir/*; do \
474 if test -f $$i; then \
475 for options in '' $(SPEC_OMEGA) '--isl'; do \
476 for spec in 'random' 'bf' 'df'; do \
477 opt="--specialization=$$spec $$options"; \
479 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
485 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
486 if test -f $$i; then \
487 for spec in 'random' 'bf' 'df'; do \
488 opt="--specialization=$$spec --scarf"; \
490 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
493 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
496 check-test: test$(EXEEXT)
498 for i in $(top_srcdir)/tests/*; do \
499 if test -f $$i; then \
500 for options in '--index=10' '--primal --index=10'; do \
501 for spec in 'random' 'bf' 'df' 'todd'; do \
502 opt="--specialization=$$spec $$options"; \
504 ./test$(EXEEXT) $$opt < $$i; \
505 if test "$$?" -ne "0"; then \
506 failed=`expr $$failed + 1`; \
515 for i in $(top_srcdir)/tests/sample/*; do \
517 ./test$(EXEEXT) < $$i; \
518 if test "$$?" -ne "0"; then \
519 failed=`expr $$failed + 1`; \
525 if test $$failed != 0; then \
526 echo "$$failed tests failed"; \
529 check-lexmin: lexmin$(EXEEXT)
530 @for i in $(top_srcdir)/tests/lexmin/*; do \
531 if test -f $$i; then \
532 for spec in 'random' 'bf' 'df'; do \
533 opt="--specialization=$$spec"; \
535 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
539 check-iscc: iscc$(EXEEXT)
540 @for i in $(top_srcdir)/tests/iscc/*; do \
541 if test -f $$i; then \
543 ./iscc$(EXEEXT) < $$i || exit; \
546 check-union: barvinok_union$(EXEEXT)
547 @for i in $(top_srcdir)/tests/ehrhart_union/*; do \
548 if test -f $$i; then \
549 for spec in 'random' 'bf' 'df'; do \
550 opt="--specialization=$$spec $$options"; \
552 ./barvinok_union$(EXEEXT) -c $$opt < $$i || exit; \
557 version.h: @GIT_HEAD@
558 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@