doc: add reference to bernstein techreport
[barvinok.git] / Makefile.am
blobb067500ec0955ac9b4761ddab79291c1f2d8293f
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/bernstein.h
25 LINK = $(CXXLINK)
27 if HAVE_GINAC
28     BERNSTEIN_CC = bernstein.cc
29 endif
30 libbarvinok_la_SOURCES = \
31     barvinok/evalue.h \
32     barvinok/genfun.h \
33     barvinok/util.h \
34     barvinok/barvinok.h \
35     NTL_QQ.cc \
36     evalue.c \
37     genfun.cc \
38     util.c \
39     bfcounter.cc \
40     bfcounter.h \
41     conversion.cc \
42     conversion.h \
43     decomposer.cc \
44     decomposer.h \
45     dpoly.cc \
46     dpoly.h \
47     genfun_constructor.cc \
48     genfun_constructor.h \
49     lattice_point.cc \
50     lattice_point.h \
51     options.c \
52     reduce_domain.c \
53     reduce_domain.h \
54     reducer.cc \
55     reducer.h \
56     mat_util.cc \
57     mat_util.h \
58     barvinok.cc \
59     $(BERNSTEIN_CC)
60 EXTRA_libbarvinok_la_SOURCES = \
61     bernstein.cc \
62     piputil.h
63 if HAVE_GINAC
64     BERNSTEIN_LA = $(top_builddir)/bernstein/libbernstein.la
65 endif
66 libbarvinok_la_LIBADD = @LTLIBOBJS@ $(BERNSTEIN_LA)
67 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
68 LDADD = libbarvinok.la
70 test_SOURCES = test.c
71 barvinok_count_SOURCES = barvinok_count.c
72 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
73 barvinok_series_SOURCES = barvinok_series.cc
74 barvinok_union_SOURCES = barvinok_union.cc
75 if HAVE_OMEGA
76 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
77 else
78 BEEO_SOURCES = 
79 endif
80 barvinok_enumerate_e_SOURCES = \
81         barvinok_enumerate_e.cc \
82         scarf.cc \
83         $(BEEO_SOURCES)
84 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ @CPPFLAGS@
85 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
86 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la
87 verif_ehrhart_SOURCES = verif_ehrhart.c verify_main.cc verif_ehrhart.h
88 4coins_SOURCES = 4coins.cc scarf.cc
89 lexmin_SOURCES = \
90         lexmin.cc \
91         combine.c \
92         combine.h \
93         edomain.cc \
94         edomain.h \
95         evalue_util.cc \
96         evalue_util.h \
97         fdstream.cc \
98         fdstream.h
100 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
102 EXTRA_DIST = \
103     README.Solaris \
104     ChangeLog \
105     $(TESTFILES) \
106     latte2polylib.pl \
107     NTL_5_3_2.patch \
108     doc/Internal.tex \
109     doc/Usage.tex \
110     doc/barvinok.bib \
111     doc/barvinok.gdf \
112     doc/barvinok.tex \
113     doc/chicago.bst \
114     doc/chicago.sty \
115     doc/mydefs.sty \
116     polymake/Makefile.in \
117     polymake/README \
118     polymake/autogen.sh \
119     polymake/configure.in \
120     polymake/lattice_points.cc
122 ACLOCAL_AMFLAGS = -I m4
124 install-data-local:
125         @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
126         $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
128 uninstall-local:
129         rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
131 dist-hook:
132         (cd $(distdir)/polymake; \
133             ./autogen.sh; rm -rf autogen.sh autom4te.cache)
134         (cd doc; make barvinok.pdf)
135         cp doc/barvinok.pdf $(distdir)/doc/
136         if test -f $(top_srcdir)/.git/HEAD; then \
137             echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
138         else \
139             echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
140         fi
142 if HAVE_PIPLIB
143 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf ehrhart_e/piplib
144 else
145 BEE_TESTDIRS = ehrhart_e ehrhart_e/scarf
146 endif
148 check-series:
149         @for i in $(top_srcdir)/tests/ehrhart/*; do \
150             if test -f $$i; then \
151                 echo $$i; \
152                 ./verif_ehrhart --series < $$i; \
153             fi \
154         done
155 check:
156         @for i in $(top_srcdir)/tests/ehrhart/*; do \
157             if test -f $$i; then \
158                 echo $$i; \
159                 ./verif_ehrhart < $$i; \
160             fi \
161         done
162         @for dir in $(BEE_TESTDIRS); do \
163             for options in '' '--pip' '--pip --omega'; do \
164                 for i in $(top_srcdir)/tests/$$dir/*; do \
165                     if test -f $$i; then \
166                         echo $$i $$options; \
167                         ./barvinok_enumerate_e --verify $$options < $$i; \
168                     fi \
169                 done \
170             done \
171         done
172         @for i in $(top_srcdir)/tests/ehrhart_e/scarf/*; do \
173             if test -f $$i; then \
174                 echo $$i --scarf; \
175                 ./barvinok_enumerate_e --verify --scarf < $$i; \
176             fi \
177         done
178         @for i in $(top_srcdir)/tests/*; do \
179             if test -f $$i; then \
180                 echo -n $$i; \
181                 ./test < $$i || echo -n " NOT"; \
182                 echo " ok"; \
183             fi \
184         done
185 if HAVE_GLPK
186         @for i in $(top_srcdir)/tests/lexmin/*; do \
187             if test -f $$i; then \
188                 echo $$i; \
189                 ./lexmin --verify < $$i; \
190             fi \
191         done
192 endif
194 version.h: @GIT_HEAD@
195         echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@