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