doc: document Polyhedron_Reduced_Basis and Polyhedron_Sample
[barvinok.git] / Makefile.am
blobf2ab3c8713f816ccbf303bebc19336f9d5b371da
1 if HAVE_GINAC
2     MAYBE_BERNSTEIN = bernstein
3 endif
4 SUBDIRS = $(MAYBE_BERNSTEIN) . omega doc
6 AM_CPPFLAGS = -I$(srcdir)/bernstein/include
8 lib_LTLIBRARIES = libbarvinok.la
9 noinst_PROGRAMS = test barvinok_count randomtest barvinok_enumerate \
10                   barvinok_ehrhart \
11                   verif_ehrhart barvinok_enumerate_e \
12                   barvinok_series remove_redundant_equalities \
13                   barvinok_union \
14                   @bv_extra_programs@
15 EXTRA_PROGRAMS = piptest verify_lexsmaller polyhedron_sample 4coins lexmin \
16                  polytope_scan
17 pkginclude_HEADERS = \
18     barvinok/NTL_QQ.h \
19     barvinok/barvinok.h \
20     barvinok/util.h \
21     barvinok/evalue.h \
22     barvinok/genfun.h \
23     barvinok/options.h \
24     barvinok/sample.h \
25     barvinok/basis_reduction.h \
26     barvinok/bernstein.h
27 LINK = $(CXXLINK)
29 if HAVE_GINAC
30     BERNSTEIN_CC = bernstein.cc
31 endif
32 libbarvinok_la_SOURCES = \
33     barvinok/evalue.h \
34     barvinok/genfun.h \
35     barvinok/util.h \
36     barvinok/barvinok.h \
37     NTL_QQ.cc \
38     evalue.c \
39     genfun.cc \
40     util.c \
41     bfcounter.cc \
42     bfcounter.h \
43     conversion.cc \
44     conversion.h \
45     decomposer.cc \
46     decomposer.h \
47     dpoly.cc \
48     dpoly.h \
49     genfun_constructor.cc \
50     genfun_constructor.h \
51     lattice_point.cc \
52     lattice_point.h \
53     options.c \
54     reduce_domain.c \
55     reduce_domain.h \
56     reducer.cc \
57     reducer.h \
58     scarf.cc \
59     mat_util.cc \
60     mat_util.h \
61     barvinok.cc \
62     $(BERNSTEIN_CC)
63 EXTRA_libbarvinok_la_SOURCES = \
64     bernstein.cc \
65     piputil.h
66 if HAVE_GINAC
67     BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
68 endif
69 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(BERNSTEIN_LA)
70 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
71 LDADD = libbarvinok.la
73 test_SOURCES = test.c
74 barvinok_count_SOURCES = barvinok_count.c
75 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
76 barvinok_series_SOURCES = barvinok_series.cc
77 barvinok_union_SOURCES = barvinok_union.cc
78 if HAVE_OMEGA
79 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
80 else
81 BEEO_SOURCES = 
82 endif
83 barvinok_enumerate_e_SOURCES = \
84         barvinok_enumerate_e.cc \
85         $(BEEO_SOURCES)
86 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ @CPPFLAGS@
87 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
88 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la
89 verif_ehrhart_SOURCES = verif_ehrhart.c verify_main.cc verif_ehrhart.h
90 4coins_SOURCES = 4coins.cc
91 lexmin_SOURCES = \
92         lexmin.cc \
93         combine.c \
94         combine.h \
95         edomain.cc \
96         edomain.h \
97         evalue_util.cc \
98         evalue_util.h \
99         fdstream.cc \
100         fdstream.h
102 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
104 EXTRA_DIST = \
105     README.Solaris \
106     ChangeLog \
107     $(TESTFILES) \
108     latte2polylib.pl \
109     NTL_5_3_2.patch \
110     doc/Internal.tex \
111     doc/Usage.tex \
112     doc/barvinok.bib \
113     doc/barvinok.gdf \
114     doc/barvinok.tex \
115     doc/chicago.bst \
116     doc/chicago.sty \
117     doc/mydefs.sty \
118     polymake/Makefile.in \
119     polymake/README \
120     polymake/autogen.sh \
121     polymake/configure.in \
122     polymake/lattice_points.cc
124 ACLOCAL_AMFLAGS = -I m4
126 install-data-local:
127         @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
128         $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
130 uninstall-local:
131         rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
133 dist-hook:
134         (cd $(distdir)/polymake; \
135             ./autogen.sh; rm -rf autogen.sh autom4te.cache)
136         (cd doc; make barvinok.pdf)
137         cp doc/barvinok.pdf $(distdir)/doc/
138         if test -f $(top_srcdir)/.git/HEAD; then \
139             echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
140         else \
141             echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
142         fi
144 if HAVE_PIPLIB
145 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
146 else
147 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf
148 endif
150 check-series:
151         @for i in $(top_srcdir)/tests/ehrhart/*; do \
152             if test -f $$i; then \
153                 echo $$i; \
154                 ./verif_ehrhart --series < $$i; \
155             fi \
156         done
157 check:
158         @for i in $(top_srcdir)/tests/ehrhart/*; do \
159             if test -f $$i; then \
160                 echo $$i; \
161                 ./verif_ehrhart < $$i; \
162             fi \
163         done
164         @for dir in $(BEE_TESTDIRS); do \
165             for options in '' '--pip' '--pip --omega'; do \
166                 for i in $(top_srcdir)/tests/$$dir/*; do \
167                     if test -f $$i; then \
168                         echo $$i $$options; \
169                         ./barvinok_enumerate_e --verify $$options < $$i; \
170                     fi \
171                 done \
172             done \
173         done
174         @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
175             if test -f $$i; then \
176                 echo $$i --scarf; \
177                 ./barvinok_enumerate_e --verify --scarf < $$i; \
178             fi \
179         done
180         @for i in $(top_srcdir)/tests/*; do \
181             if test -f $$i; then \
182                 echo -n $$i; \
183                 ./test < $$i || echo -n " NOT"; \
184                 echo " ok"; \
185             fi \
186         done
187 if HAVE_GLPK
188         @for i in $(top_srcdir)/tests/lexmin/*; do \
189             if test -f $$i; then \
190                 echo $$i; \
191                 ./lexmin --verify < $$i; \
192             fi \
193         done
194 endif
196 version.h: @GIT_HEAD@
197         echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@