polyhedron_sample.c: remove redundant MAXRAYS define
[barvinok.git] / Makefile.am
bloba2fa810a6cef9060a917e7a136dc9c7386e445fb
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 @GINACLIB_CPPFLAGS@
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 barvinok_maximize \
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     scale.c \
70     scale.h \
71     scarf.cc \
72     mat_util.cc \
73     mat_util.h \
74     barvinok.cc \
75     $(BERNSTEIN_CC) \
76     $(BR_CDD) \
77     $(BR_GLPK)
78 EXTRA_libbarvinok_la_SOURCES = \
79     bernstein.cc \
80     piputil.h \
81     initcdd.cc \
82     initcdd.h
83 if HAVE_GINAC
84     BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
85 endif
86 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(BERNSTEIN_LA) lib/libgnu.la
87 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
88 LDADD = libbarvinok.la
90 test_SOURCES = test.c
91 barvinok_count_SOURCES = barvinok_count.c
92 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
93 barvinok_union_SOURCES = barvinok_union.cc
94 if HAVE_OMEGA
95 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
96 else
97 BEEO_SOURCES = 
98 endif
99 barvinok_enumerate_SOURCES = \
100         barvinok_enumerate.cc \
101         evalue_convert.cc \
102         evalue_convert.h \
103         fdstream.cc \
104         fdstream.h \
105         verify.h \
106         verify.c \
107         verif_ehrhart.h \
108         verif_ehrhart.c
109 barvinok_enumerate_e_SOURCES = \
110         barvinok_enumerate_e.cc \
111         evalue_convert.cc \
112         evalue_convert.h \
113         verify.h \
114         verify.c \
115         verif_ehrhart.h \
116         verif_ehrhart.c \
117         $(BEEO_SOURCES)
118 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
119 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
120 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la
121 barvinok_maximize_SOURCES = \
122         evalue_convert.cc \
123         evalue_convert.h \
124         maximize.cc \
125         verify.h \
126         verify.c
127 4coins_SOURCES = 4coins.cc
128 if HAVE_CDDLIB
129 POLYSIGN = polysign_cddf.cc polysign_cdd.cc
130 endif
131 lexmin_SOURCES = \
132         lexmin.h \
133         lexmin.cc \
134         combine.c \
135         combine.h \
136         edomain.cc \
137         edomain.h \
138         evalue_util.cc \
139         evalue_util.h \
140         fdstream.cc \
141         fdstream.h \
142         $(POLYSIGN) \
143         polysign.c \
144         polysign_polylib.c \
145         polysign.h \
146         verify.h \
147         verify.c
148 EXTRA_lexmin_SOURCE = polysign_cddf.cc polysign_cdd.cc polysign.c
150 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
152 EXTRA_DIST = \
153     ChangeLog \
154     $(TESTFILES) \
155     latte2polylib.pl \
156     NTL_5_3_2.patch \
157     doc/Internal.tex \
158     doc/applications.tex \
159     doc/barvinok.tex \
160     doc/omega.tex \
161     doc/polymake.tex \
162     doc/reports.tex \
163     doc/barvinok.bib \
164     doc/barvinok.gdf \
165     doc/chicago.bst \
166     doc/chicago.sty \
167     doc/mydefs.sty \
168     polymake/Makefile.in \
169     polymake/README \
170     polymake/autogen.sh \
171     polymake/configure.in \
172     polymake/lattice_points.cc
174 ACLOCAL_AMFLAGS = -I m4
176 install-data-local:
177         @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
178         $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
180 uninstall-local:
181         rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
183 dist-hook:
184         (cd $(distdir)/polymake; \
185             ./autogen.sh; rm -rf autogen.sh autom4te.cache)
186         (cd doc; make barvinok.pdf)
187         cp doc/barvinok.pdf $(distdir)/doc/
188         if test -f $(top_srcdir)/.git/HEAD; then \
189             echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
190         else \
191             echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
192         fi
194 if HAVE_PIPLIB
195 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
196 else
197 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf
198 endif
200 check: check-enumerate check-enumerate_e check-test check-lexmin
201 check-enumerate: barvinok_enumerate
202         @for i in $(top_srcdir)/tests/ehrhart/*; do \
203             if test -f $$i; then \
204                 echo $$i; \
205                 for options in '' '--series' '--series --primal'; do \
206                     for spec in 'random' 'bf' 'df'; do \
207                         opt="--specialization=$$spec $$options"; \
208                         echo "        $$opt"; \
209                         ./barvinok_enumerate --verify $$opt < $$i; \
210                     done \
211                 done \
212             fi \
213         done
214 check-enumerate_e: barvinok_enumerate_e
215         @for dir in $(BEE_TESTDIRS); do \
216             for i in $(top_srcdir)/tests/$$dir/*; do \
217                 if test -f $$i; then \
218                     for options in '' '--pip' '--pip --omega'; do \
219                         for spec in 'random' 'bf' 'df'; do \
220                             opt="--specialization=$$spec $$options"; \
221                             echo $$i $$opt; \
222                             ./barvinok_enumerate_e --verify $$opt < $$i; \
223                         done \
224                     done \
225                 fi \
226             done \
227         done
228         @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
229             if test -f $$i; then \
230                 for spec in 'random' 'bf' 'df'; do \
231                     opt="--specialization=$$spec --scarf"; \
232                     echo $$i $$opt; \
233                     ./barvinok_enumerate_e --verify $$opt < $$i; \
234                 done \
235             fi \
236         done
237 check-test: test
238         @for i in $(top_srcdir)/tests/*; do \
239             if test -f $$i; then \
240                 for options in '--index=10' '--primal --index=10'; do \
241                     for spec in 'random' 'bf' 'df'; do \
242                         opt="--specialization=$$spec $$options"; \
243                         echo -n $$i $$opt; \
244                         ./test $$opt < $$i || echo -n " NOT"; \
245                         echo " ok"; \
246                     done \
247                 done \
248             fi \
249         done
250 if HAVE_GLPK
251 check-lexmin: lexmin
252         @for i in $(top_srcdir)/tests/lexmin/*; do \
253             if test -f $$i; then \
254                 for spec in 'random' 'bf' 'df'; do \
255                     opt="--specialization=$$spec"; \
256                     echo $$i $$opt; \
257                     ./lexmin --verify $$opt < $$i; \
258                 done \
259             fi \
260         done
261 else
262 check-lexmin:
263 endif
265 version.h: @GIT_HEAD@
266         echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@