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