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