barvinok_enumerate_e.cc: remove another duplicate definition of MAXRAYS
[barvinok.git] / Makefile.am
blob37db2c4ad9c60eecf1b80c0e432eb621a1b80e54
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 noinst_PROGRAMS = test barvinok_count randomtest barvinok_enumerate \
11                   barvinok_ehrhart \
12                   verif_ehrhart barvinok_enumerate_e \
13                   barvinok_series 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_series_SOURCES = barvinok_series.cc
92 barvinok_union_SOURCES = barvinok_union.cc
93 if HAVE_OMEGA
94 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
95 else
96 BEEO_SOURCES = 
97 endif
98 barvinok_enumerate_e_SOURCES = \
99         barvinok_enumerate_e.cc \
100         $(BEEO_SOURCES)
101 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ $(AM_CPPFLAGS)
102 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
103 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la
104 verif_ehrhart_SOURCES = verif_ehrhart.c verify_main.cc verif_ehrhart.h
105 4coins_SOURCES = 4coins.cc
106 if HAVE_CDDLIB
107 POLYSIGN = polysign_cddf.cc polysign_cdd.cc
108 endif
109 lexmin_SOURCES = \
110         lexmin.cc \
111         combine.c \
112         combine.h \
113         edomain.cc \
114         edomain.h \
115         evalue_util.cc \
116         evalue_util.h \
117         fdstream.cc \
118         fdstream.h \
119         $(POLYSIGN) \
120         polysign.c \
121         polysign_polylib.c \
122         polysign.h
123 EXTRA_lexmin_SOURCE = polysign_cddf.cc polysign_cdd.cc polysign.c
125 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
127 EXTRA_DIST = \
128     ChangeLog \
129     $(TESTFILES) \
130     latte2polylib.pl \
131     NTL_5_3_2.patch \
132     doc/Internal.tex \
133     doc/applications.tex \
134     doc/barvinok.tex \
135     doc/omega.tex \
136     doc/polymake.tex \
137     doc/reports.tex \
138     doc/barvinok.bib \
139     doc/barvinok.gdf \
140     doc/chicago.bst \
141     doc/chicago.sty \
142     doc/mydefs.sty \
143     polymake/Makefile.in \
144     polymake/README \
145     polymake/autogen.sh \
146     polymake/configure.in \
147     polymake/lattice_points.cc
149 ACLOCAL_AMFLAGS = -I m4
151 install-data-local:
152         @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
153         $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
155 uninstall-local:
156         rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
158 dist-hook:
159         (cd $(distdir)/polymake; \
160             ./autogen.sh; rm -rf autogen.sh autom4te.cache)
161         (cd doc; make barvinok.pdf)
162         cp doc/barvinok.pdf $(distdir)/doc/
163         if test -f $(top_srcdir)/.git/HEAD; then \
164             echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
165         else \
166             echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
167         fi
169 if HAVE_PIPLIB
170 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
171 else
172 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf
173 endif
175 check-series:
176         @for i in $(top_srcdir)/tests/ehrhart/*; do \
177             if test -f $$i; then \
178                 echo $$i; \
179                 ./verif_ehrhart --series < $$i; \
180             fi \
181         done
182 check:
183         @for i in $(top_srcdir)/tests/ehrhart/*; do \
184             if test -f $$i; then \
185                 echo $$i; \
186                 ./verif_ehrhart < $$i; \
187             fi \
188         done
189         @for dir in $(BEE_TESTDIRS); do \
190             for options in '' '--pip' '--pip --omega'; do \
191                 for i in $(top_srcdir)/tests/$$dir/*; do \
192                     if test -f $$i; then \
193                         echo $$i $$options; \
194                         ./barvinok_enumerate_e --verify $$options < $$i; \
195                     fi \
196                 done \
197             done \
198         done
199         @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
200             if test -f $$i; then \
201                 echo $$i --scarf; \
202                 ./barvinok_enumerate_e --verify --scarf < $$i; \
203             fi \
204         done
205         @for i in $(top_srcdir)/tests/*; do \
206             if test -f $$i; then \
207                 echo -n $$i; \
208                 ./test < $$i || echo -n " NOT"; \
209                 echo " ok"; \
210             fi \
211         done
212 if HAVE_GLPK
213         @for i in $(top_srcdir)/tests/lexmin/*; do \
214             if test -f $$i; then \
215                 echo $$i; \
216                 ./lexmin --verify < $$i; \
217             fi \
218         done
219 endif
221 version.h: @GIT_HEAD@
222         echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@