doc: more documents refering to the library
[barvinok.git] / Makefile.am
blob7b5df3b65e5bafb248f15cb37cbc92972d9cc145
1 if HAVE_GINAC
2     MAYBE_BERNSTEIN = bernstein
3 endif
4 SUBDIRS = $(MAYBE_BERNSTEIN) lib . omega doc
6 lib/libgnu.la:
7         $(MAKE) $(AM_MAKEFLAGS) -C lib libgnu.la
8 bernstein/libbernstein.la:
9         $(MAKE) $(AM_MAKEFLAGS) -C bernstein libbernstein.la
11 AM_CPPFLAGS = -I$(srcdir)/bernstein/include -I$(srcdir)/lib @GINACLIB_CPPFLAGS@
12 AM_LDFLAGS = -Llib
14 lib_LTLIBRARIES = libbarvinok.la
15 bin_PROGRAMS = barvinok_count barvinok_enumerate barvinok_enumerate_e \
16                   barvinok_ehrhart
17 noinst_PROGRAMS = test randomtest \
18                   remove_redundant_equalities \
19                   barvinok_union polytope_volume test_approx \
20                   @bv_extra_programs@
21 EXTRA_PROGRAMS = piptest verify_lexsmaller polyhedron_sample 4coins lexmin \
22                  polytope_scan barvinok_maximize
23 pkginclude_HEADERS = \
24     barvinok/NTL_QQ.h \
25     barvinok/barvinok.h \
26     barvinok/util.h \
27     barvinok/evalue.h \
28     barvinok/genfun.h \
29     barvinok/options.h \
30     barvinok/polylib.h \
31     barvinok/sample.h \
32     barvinok/basis_reduction.h \
33     barvinok/bernstein.h
34 nodist_pkginclude_HEADERS = \
35     barvinok/NTL.h \
36     barvinok/set.h
37 LINK = $(CXXLINK)
39 if HAVE_GINAC
40     BERNSTEIN_CC = bernstein.cc
41 endif
42 if HAVE_CDDLIB
43     BR_CDD = basis_reduction_cdd.cc initcdd.cc
44 endif
45 if HAVE_GLPK
46     BR_GLPK = basis_reduction_glpk.c
47 endif
48 libbarvinok_la_SOURCES = \
49     barvinok/evalue.h \
50     barvinok/genfun.h \
51     barvinok/util.h \
52     barvinok/barvinok.h \
53     NTL_QQ.cc \
54     basis_reduction.c \
55     evalue.c \
56     genfun.cc \
57     util.c \
58     version.c \
59     bfcounter.cc \
60     bfcounter.h \
61     conversion.cc \
62     conversion.h \
63     decomposer.cc \
64     decomposer.h \
65     dpoly.cc \
66     dpoly.h \
67     genfun_constructor.cc \
68     genfun_constructor.h \
69     lattice_point.cc \
70     lattice_point.h \
71     options.c \
72     reduce_domain.c \
73     reduce_domain.h \
74     reducer.cc \
75     reducer.h \
76     remove_equalities.h \
77     scale.c \
78     scale.h \
79     scarf.cc \
80     volume.c \
81     volume.h \
82     mat_util.cc \
83     mat_util.h \
84     barvinok.cc \
85     $(BERNSTEIN_CC) \
86     $(BR_CDD) \
87     $(BR_GLPK)
88 EXTRA_libbarvinok_la_SOURCES = \
89     basis_reduction_cdd.cc \
90     basis_reduction_glpk.c \
91     bernstein.cc \
92     piputil.h \
93     initcdd.cc \
94     initcdd.h
95 if HAVE_GINAC
96     BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
97 endif
98 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(BERNSTEIN_LA) lib/libgnu.la
99 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
100 LDADD = libbarvinok.la
102 test_SOURCES = test.c
103 barvinok_count_SOURCES = barvinok_count.c
104 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
105 barvinok_union_SOURCES = barvinok_union.cc
106 if HAVE_OMEGA
107 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
108 else
109 BEEO_SOURCES = 
110 endif
111 if USE_FDSTREAM
112 FDSTREAM = fdstream.cc fdstream.h
113 endif
114 barvinok_enumerate_SOURCES = \
115         barvinok_enumerate.cc \
116         evalue_convert.cc \
117         evalue_convert.h \
118         $(FDSTREAM) \
119         verify.h \
120         verify.c \
121         verif_ehrhart.h \
122         verif_ehrhart.c
123 EXTRA_barvinok_enumerate_SOURCES = fdstream.cc fdstream.h
124 barvinok_enumerate_e_SOURCES = \
125         barvinok_enumerate_e.cc \
126         evalue_convert.cc \
127         evalue_convert.h \
128         $(FDSTREAM) \
129         verify.h \
130         verify.c \
131         verif_ehrhart.h \
132         verif_ehrhart.c \
133         $(BEEO_SOURCES)
134 EXTRA_barvinok_enumerate_e_SOURCES = fdstream.cc fdstream.h
135 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
136 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
137 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la
138 barvinok_maximize_SOURCES = \
139         evalue_convert.cc \
140         evalue_convert.h \
141         $(FDSTREAM) \
142         maximize.cc \
143         verify.h \
144         verify.c
145 EXTRA_barvinok_maximize_SOURCES = fdstream.cc fdstream.h
146 4coins_SOURCES = 4coins.cc
147 if HAVE_CDDLIB
148 POLYSIGN = polysign_cddf.cc polysign_cdd.cc
149 endif
150 lexmin_SOURCES = \
151         lexmin.h \
152         lexmin.cc \
153         combine.c \
154         combine.h \
155         edomain.cc \
156         edomain.h \
157         evalue_util.cc \
158         evalue_util.h \
159         $(POLYSIGN) \
160         polysign.c \
161         polysign_polylib.c \
162         polysign.h \
163         verify.h \
164         verify.c
165 EXTRA_lexmin_SOURCES = polysign_cddf.cc polysign_cdd.cc polysign.c
166 test_approx_SOURCES = \
167         test_approx.c \
168         verify.h \
169         verify.c
171 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
173 EXTRA_DIST = \
174     ChangeLog \
175     $(TESTFILES) \
176     latte2polylib.pl \
177     NTL_5_3_2.patch \
178     basis_reduction_templ.c \
179     polysign_cdd_template.cc \
180     barvinok/NTL.h.broken \
181     barvinok/NTL.h.normal \
182     barvinok/set.h.broken \
183     barvinok/set.h.normal \
184     doc/Internal.tex \
185     doc/applications.tex \
186     doc/barvinok.tex \
187     doc/omega.tex \
188     doc/polymake.tex \
189     doc/reports.tex \
190     doc/barvinok.bib \
191     doc/barvinok.gdf \
192     doc/chicago.bst \
193     doc/chicago.sty \
194     doc/mydefs.sty \
195     polymake/Makefile.in \
196     polymake/README \
197     polymake/autogen.sh \
198     polymake/configure.in \
199     polymake/lattice_points.cc
201 ACLOCAL_AMFLAGS = -I m4
203 install-data-local:
204         @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
205         $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
207 uninstall-local:
208         rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
210 dist-hook:
211         (cd $(distdir)/polymake; \
212             ./autogen.sh; rm -rf autogen.sh autom4te.cache)
213         (cd doc; make barvinok.pdf)
214         cp doc/barvinok.pdf $(distdir)/doc/
215         if test -f $(top_srcdir)/.git/HEAD; then \
216             echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
217         else \
218             echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
219         fi
221 if HAVE_PIPLIB
222 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
223 else
224 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf
225 endif
227 check: check-enumerate check-enumerate_e check-test check-lexmin check-approx
228 check-approx: test_approx
229         @for i in $(top_srcdir)/tests/ehrhart/*; do \
230             if test -f $$i; then \
231                 echo $$i | ./test_approx -q -r 10 ; \
232             fi \
233         done
234 check-enumerate: barvinok_enumerate
235         @for i in $(top_srcdir)/tests/ehrhart/*; do \
236             if test -f $$i; then \
237                 echo $$i; \
238                 for options in '' '--series' '--series --primal'; do \
239                     for spec in 'random' 'bf' 'df'; do \
240                         opt="--specialization=$$spec $$options"; \
241                         echo "        $$opt"; \
242                         ./barvinok_enumerate --verify $$opt < $$i; \
243                     done \
244                 done \
245             fi \
246         done
247 check-enumerate_e: barvinok_enumerate_e
248         @for dir in $(BEE_TESTDIRS); do \
249             for i in $(top_srcdir)/tests/$$dir/*; do \
250                 if test -f $$i; then \
251                     for options in '' '--pip' '--pip --omega'; do \
252                         for spec in 'random' 'bf' 'df'; do \
253                             opt="--specialization=$$spec $$options"; \
254                             echo $$i $$opt; \
255                             ./barvinok_enumerate_e --verify $$opt < $$i; \
256                         done \
257                     done \
258                 fi \
259             done \
260         done
261         @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
262             if test -f $$i; then \
263                 for spec in 'random' 'bf' 'df'; do \
264                     opt="--specialization=$$spec --scarf"; \
265                     echo $$i $$opt; \
266                     ./barvinok_enumerate_e --verify $$opt < $$i; \
267                 done \
268             fi \
269         done
270 check-test: test
271         @for i in $(top_srcdir)/tests/*; do \
272             if test -f $$i; then \
273                 for options in '--index=10' '--primal --index=10'; do \
274                     for spec in 'random' 'bf' 'df'; do \
275                         opt="--specialization=$$spec $$options"; \
276                         echo -n $$i $$opt; \
277                         ./test $$opt < $$i || echo -n " NOT"; \
278                         echo " ok"; \
279                     done \
280                 done \
281             fi \
282         done
283 if HAVE_GLPK
284 check-lexmin: lexmin
285         @for i in $(top_srcdir)/tests/lexmin/*; do \
286             if test -f $$i; then \
287                 for spec in 'random' 'bf' 'df'; do \
288                     opt="--specialization=$$spec"; \
289                     echo $$i $$opt; \
290                     ./lexmin --verify $$opt < $$i; \
291                 done \
292             fi \
293         done
294 else
295 check-lexmin:
296 endif
298 version.h: @GIT_HEAD@
299         echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@