2 MAYBE_POLYLIB = polylib
3 POLYLIB_LA = $(top_builddir)/polylib/libpolylibgmp.la
7 ISL_LA = $(top_builddir)/isl/libisl.la
8 LOCAL_ISL_LA = isl/libisl.la
11 ISL_LA = $(ISL_BUILDDIR)/libisl.la
15 PET_LA = $(top_builddir)/pet/libpet.la
18 PET_LA = $(PET_BUILDDIR)/libpet.la
26 SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_PET) \
27 $(MAYBE_ZSOLVE) $(MAYBE_PARKER) . doc
28 DIST_SUBDIRS = $(MAYBE_POLYLIB) $(MAYBE_ISL) $(MAYBE_PET) \
32 polylib/libpolylibgmp.la: FORCE
33 cd polylib; $(MAKE) $(AM_MAKEFLAGS) libpolylibgmp.la
35 cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
36 pet/libpet.la: $(LOCAL_ISL_LA) FORCE
37 cd pet; $(MAKE) $(AM_MAKEFLAGS) libpet.la
38 zsolve/libzsolve.la: FORCE
39 cd zsolve; $(MAKE) $(AM_MAKEFLAGS) libzsolve.la
40 parker/libparker.la: FORCE
41 cd parker; $(MAKE) $(AM_MAKEFLAGS) libparker.la
43 AM_CPPFLAGS = @POLYLIB_CPPFLAGS@ \
44 @ISL_CFLAGS@ @NTL_CPPFLAGS@
45 AM_LDFLAGS = @BV_LDFLAGS@ @POLYLIB_LDFLAGS@ @NTL_LDFLAGS@
47 LIB_ISL = $(ISL_LA) @ISL_LIBS@
48 LIB_PET = $(PET_LA) @PET_LIBS@
49 LIB_POLYLIB = $(POLYLIB_LA) @POLYLIB_LIBS@
51 lib_LTLIBRARIES = libbarvinok.la
52 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
53 barvinok_ehrhart polytope_scan iscc
54 noinst_PROGRAMS = test testlib randomtest \
55 remove_redundant_equalities \
56 barvinok_union polytope_volume test_approx \
57 barvinok_summate verify_lexsmaller \
58 polyhedron_sample 4coins lexmin \
59 @bv_cone_hilbert_basis@ cone_integer_hull \
60 polytope_lattice_width \
61 polyhedron_integer_hull vector_partition_chambers \
63 barvinok_bound test_bound
64 EXTRA_PROGRAMS = cone_hilbert_basis
65 pkginclude_HEADERS = \
75 barvinok/basis_reduction.h
76 nodist_pkginclude_HEADERS = \
82 BR_CDD = basis_reduction_cdd.cc initcdd.cc
83 POLYSIGN_CDD = polysign_cddf.cc polysign_cdd.cc
86 BR_GLPK = basis_reduction_glpk.c
87 POLYSIGN_GLPK = polysign_glpk.c
90 TOPCOM = topcom.c topcom.h
95 libbarvinok_la_SOURCES = \
123 genfun_constructor.cc \
124 genfun_constructor.h \
149 param_polynomial.cc \
164 remove_equalities.h \
165 remove_equalities.c \
187 EXTRA_libbarvinok_la_SOURCES = \
188 basis_reduction_cdd.cc \
189 basis_reduction_glpk.c \
199 ZSOLVE_LA = zsolve/libzsolve.la
201 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(LIB_ISL) \
202 $(LIB_POLYLIB) $(ZSOLVE_LA)
203 libbarvinok_la_LDFLAGS = @BV_LIB_LDFLAGS@ -version-info @versioninfo@ \
205 LDADD = libbarvinok.la $(LIB_ISL) $(LIB_POLYLIB)
213 barvinok_count_SOURCES = barvinok_count.c
214 barvinok_ehrhart_SOURCES = \
215 barvinok_ehrhart_options.c \
216 barvinok_ehrhart_options.h \
217 barvinok_ehrhart.cc \
218 evalue_convert_options.c \
222 barvinok_union_SOURCES = \
223 barvinok_union_options.c \
224 barvinok_union_options.h \
228 omega_interface/Exit.cc \
229 omega_interface/convert.h \
230 omega_interface/convert.cc \
231 omega_interface/count.h \
232 omega_interface/count.cc
237 FDSTREAM = fdstream.cc fdstream.h
239 barvinok_enumerate_SOURCES = \
240 barvinok_enumerate_options.c \
241 barvinok_enumerate_options.h \
242 barvinok_enumerate.cc \
243 evalue_convert_options.c \
253 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
254 barvinok_enumerate_e_SOURCES = \
255 barvinok_enumerate_e_options.c \
256 barvinok_enumerate_e_options.h \
257 barvinok_enumerate_e.cc \
258 evalue_convert_options.c \
271 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
273 MONA_LIBS = -ldfa -lbdd -lmem
274 PARKER_LA = parker/libparker.la
275 PARKERLDFLAGS = -L$(MONAPATH)/DFA -L$(MONAPATH)/BDD -L$(MONAPATH)/Mem
276 PARKERCPPFLAGS = -I$(MONAPATH)/Mem -I$(MONAPATH)/DFA -I$(MONAPATH)/BDD
278 barvinok_enumerate_e_CPPFLAGS = \
279 $(PARKERCPPFLAGS) @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
280 barvinok_enumerate_e_LDFLAGS = $(PARKERLDFLAGS) @OMEGA_LDFLAGS@ @LDFLAGS@
281 barvinok_enumerate_e_LDADD = \
282 $(PARKER_LA) $(MONA_LIBS) @OMEGA_LIBS@ libbarvinok.la \
283 $(LIB_ISL) $(LIB_POLYLIB)
284 barvinok_bound_SOURCES = \
288 barvinok_summate_SOURCES = \
292 4coins_SOURCES = 4coins.cc
293 semigroup_holes_SOURCES = semigroup_holes.cc
304 test_approx_SOURCES = \
308 test_bound_SOURCES = \
318 iscc_CPPFLAGS = @PET_CFLAGS@ $(AM_CPPFLAGS)
320 libbarvinok.la $(LIB_PET) $(LIB_ISL) \
324 # dummy library that captures the dependencies on all headers
325 # that are relevant for the bindings
326 noinst_LIBRARIES = libdep.a
327 libdep_a_CPPFLAGS = $(DEFAULT_INCLUDES) @ISL_CFLAGS@ -I"@ISL_SRCDIR@"
328 libdep_a_SOURCES = interface/all_barvinok.c
330 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT):
331 $(MAKE) -C @ISL_BUILDDIR@ interface/extract_interface$(EXEEXT)
333 isl.py: libdep.a interface/isl.py.top \
334 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT)
335 (cat interface/isl.py.top && \
336 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT) \
338 $(DEFAULT_INCLUDES) @ISL_CFLAGS@ -I"@ISL_SRCDIR@" \
339 $(srcdir)/interface/all_barvinok.h) \
340 > $@ || (rm $@ && false)
343 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
351 barvinok-uninstalled.sh \
352 barvinok-uninstalled.pc \
365 basis_reduction_templ.c \
367 polysign_cdd_template.cc \
368 barvinok/NTL.h.broken \
369 barvinok/NTL.h.normal \
370 barvinok/set.h.broken \
371 barvinok/set.h.normal \
375 doc/applications.tex \
385 interface/all_barvinok.h \
386 interface/isl.py.top.no_pet \
387 interface/isl.py.top.pet \
388 polymake/Makefile.in \
390 polymake/autogen.sh \
391 polymake/configure.in \
392 polymake/convert.cc \
394 polymake/h_star_vector.cc \
395 polymake/lattice_points.cc
397 ACLOCAL_AMFLAGS = -I m4
400 @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
401 $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
404 rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
407 cp isl.py $(distdir)/
408 (cd $(distdir)/polymake; \
409 ./autogen.sh; rm -rf autom4te.cache)
410 (cd doc; make barvinok.pdf)
411 cp doc/barvinok.pdf $(distdir)/doc/
412 if test -f $(top_srcdir)/.git/HEAD; then \
413 echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
415 echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
419 mv $(distdir).tar.gz @GIT_HEAD_VERSION@.tar.gz
421 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
423 check: check-testlib check-enumerate check-enumerate_e check-test \
424 check-lexmin check-approx check-pwqp check-euler check-iscc \
426 check-testlib: testlib$(EXEEXT)
428 check-approx: test_approx$(EXEEXT)
429 @for i in $(top_srcdir)/tests/ehrhart/*; do \
430 if test -f $$i; then \
431 echo $$i | ./test_approx$(EXEEXT) -q -r 10 || exit; \
434 check-pwqp: barvinok_bound$(EXEEXT) test_bound$(EXEEXT) barvinok_summate$(EXEEXT)
435 @for i in $(top_srcdir)/tests/pwqp/*; do \
436 if test -f $$i; then \
438 ./barvinok_bound$(EXEEXT) -T -r30 < $$i || exit; \
439 echo $$i | ./test_bound$(EXEEXT) -q -r30 || exit; \
440 ./barvinok_summate$(EXEEXT) -T -r30 < $$i || exit; \
443 @echo $(top_srcdir)/tests/pwqp/hong1.pwqp --iterate
444 @./barvinok_bound$(EXEEXT) --iterate -T -r30 < \
445 $(top_srcdir)/tests/pwqp/hong1.pwqp || exit
446 check-euler: barvinok_summate$(EXEEXT)
447 @for i in $(top_srcdir)/tests/euler/*; do \
448 if test -f $$i; then \
449 for method in 'euler' 'laurent_old' 'laurent'; do \
450 opt="--summation=$$method"; \
452 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
456 @for t in dull EML_p EML-product EML line square square_p square \
457 square_p3 triangle triangle2 triangle_p quasi; do \
458 i=$(top_srcdir)/tests/euler/$$t.pwqp; \
459 if test -f $$i; then \
460 opt="--summation=box"; \
462 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
465 @for t in dull dull_p EML line square square_p square \
466 square_p3 triangle triangle2 triangle_p; do \
467 i=$(top_srcdir)/tests/euler/$$t.pwqp; \
468 if test -f $$i; then \
469 opt="--summation=bernoulli"; \
471 ./barvinok_summate$(EXEEXT) -T $$opt < $$i || exit; \
475 TOPCOM_CD = '--chamber-decomposition=topcom'
477 ISL_CD = '--chamber-decomposition=isl'
478 check-enumerate: barvinok_enumerate$(EXEEXT)
479 @for i in $(top_srcdir)/tests/ehrhart/*; do \
480 if test -f $$i; then \
482 for options in '' '--series' '--series --primal' $(TOPCOM_CD) $(ISL_CD); do \
483 for spec in 'random' 'bf' 'df'; do \
484 opt="--specialization=$$spec $$options"; \
486 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
491 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
492 opt="--summation=bernoulli"; \
494 ./barvinok_enumerate$(EXEEXT) --verify $$opt < $$i || exit; \
498 SPEC_OMEGA = '--isl --omega'
500 check-enumerate_e: barvinok_enumerate_e$(EXEEXT)
501 @for dir in $(BEE_TESTDIRS); do \
502 for i in $(top_srcdir)/tests/$$dir/*; do \
503 if test -f $$i; then \
504 for options in '' $(SPEC_OMEGA) '--isl'; do \
505 for spec in 'random' 'bf' 'df'; do \
506 opt="--specialization=$$spec $$options"; \
508 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
514 @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
515 if test -f $$i; then \
516 for spec in 'random' 'bf' 'df'; do \
517 opt="--specialization=$$spec --scarf"; \
519 ./barvinok_enumerate_e$(EXEEXT) --verify $$opt < $$i || exit; \
522 ./barvinok_enumerate_e$(EXEEXT) --verify --series < $$i || exit; \
525 check-test: iscc$(EXEEXT)
527 for i in $(top_srcdir)/tests/iscc/count/*; do \
528 if test -f $$i; then \
529 for options in '--index=10' '--primal --index=10'; do \
530 for spec in 'random' 'bf' 'df' 'todd'; do \
531 opt="--specialization=$$spec $$options"; \
533 ./iscc$(EXEEXT) $$opt < $$i; \
534 if test "$$?" -ne "0"; then \
535 failed=`expr $$failed + 1`; \
544 if test $$failed != 0; then \
545 echo "$$failed tests failed"; \
548 check-lexmin: lexmin$(EXEEXT)
549 @for i in $(top_srcdir)/tests/lexmin/*; do \
550 if test -f $$i; then \
551 for spec in 'random' 'bf' 'df'; do \
552 opt="--specialization=$$spec"; \
554 ./lexmin$(EXEEXT) --verify $$opt < $$i || exit; \
558 check-iscc: iscc$(EXEEXT)
559 @for i in $(top_srcdir)/tests/iscc/*; do \
560 if test -f $$i; then \
562 ./iscc$(EXEEXT) < $$i || exit; \
565 check-union: barvinok_union$(EXEEXT)
566 @for i in $(top_srcdir)/tests/ehrhart_union/*; do \
567 if test -f $$i; then \
568 for spec in 'random' 'bf' 'df'; do \
569 opt="--specialization=$$spec $$options"; \
571 ./barvinok_union$(EXEEXT) -c $$opt < $$i || exit; \
576 version.h: @GIT_HEAD@
577 echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@