lexmin.cc: extract out some code to evalue_util and edomain
[barvinok.git] / Makefile.am
blob4b5b25d81736e6aa9ae1cd6c87e65b273ec34ed3
1 SUBDIRS = . omega doc
3 lib_LTLIBRARIES = libbarvinok.la
4 noinst_PROGRAMS = test barvinok_count randomtest barvinok_enumerate \
5                   barvinok_ehrhart \
6                   verif_ehrhart barvinok_enumerate_e \
7                   barvinok_series remove_redundant_equalities \
8                   barvinok_union \
9                   @bv_extra_programs@
10 EXTRA_PROGRAMS = piptest verify_lexsmaller polyhedron_sample 4coins lexmin \
11                  polytope_scan
12 pkginclude_HEADERS = \
13     barvinok/NTL_QQ.h \
14     barvinok/barvinok.h \
15     barvinok/util.h \
16     barvinok/evalue.h \
17     barvinok/genfun.h \
18     barvinok/options.h
19 LINK = $(CXXLINK)
21 libbarvinok_la_SOURCES = \
22     barvinok/evalue.h \
23     barvinok/genfun.h \
24     barvinok/util.h \
25     barvinok/barvinok.h \
26     NTL_QQ.cc \
27     evalue.c \
28     genfun.cc \
29     util.c \
30     bfcounter.cc \
31     bfcounter.h \
32     conversion.cc \
33     conversion.h \
34     decomposer.cc \
35     decomposer.h \
36     dpoly.cc \
37     dpoly.h \
38     genfun_constructor.cc \
39     genfun_constructor.h \
40     lattice_point.cc \
41     lattice_point.h \
42     options.c \
43     reduce_domain.c \
44     reduce_domain.h \
45     reducer.cc \
46     reducer.h \
47     mat_util.cc \
48     mat_util.h \
49     barvinok.cc
50 EXTRA_libbarvinok_la_SOURCES = \
51     piputil.h
52 libbarvinok_la_LIBADD = @LTLIBOBJS@
53 libbarvinok_la_LDFLAGS = @BV_LDFLAGS@ -version-info @versioninfo@
54 LDADD = libbarvinok.la
56 test_SOURCES = test.c
57 barvinok_count_SOURCES = barvinok_count.c
58 barvinok_ehrhart_SOURCES = barvinok_ehrhart.cc
59 barvinok_series_SOURCES = barvinok_series.cc
60 barvinok_union_SOURCES = barvinok_union.cc
61 if HAVE_OMEGA
62 BEEO_SOURCES = omega/Exit.cc omega/convert.cc
63 else
64 BEEO_SOURCES = 
65 endif
66 barvinok_enumerate_e_SOURCES = \
67         barvinok_enumerate_e.cc \
68         scarf.cc \
69         $(BEEO_SOURCES)
70 barvinok_enumerate_e_CPPFLAGS = @OMEGA_CPPFLAGS@ @CPPFLAGS@
71 barvinok_enumerate_e_LDFLAGS = @OMEGA_LDFLAGS@ @LDFLAGS@
72 barvinok_enumerate_e_LDADD = @OMEGA_LIBS@ libbarvinok.la
73 verif_ehrhart_SOURCES = verif_ehrhart.c verify_main.cc verif_ehrhart.h
74 4coins_SOURCES = 4coins.cc scarf.cc
75 lexmin_SOURCES = \
76         lexmin.cc \
77         combine.c \
78         combine.h \
79         edomain.cc \
80         edomain.h \
81         evalue_util.cc \
82         evalue_util.h \
83         fdstream.cc \
84         fdstream.h
86 TESTFILES = $(shell find $(top_srcdir)/tests -type f ! -path '*CVS*')
88 EXTRA_DIST = \
89     README.Solaris \
90     ChangeLog \
91     $(TESTFILES) \
92     latte2polylib.pl \
93     NTL_5_3_2.patch \
94     doc/Internal.tex \
95     doc/Usage.tex \
96     doc/barvinok.bib \
97     doc/barvinok.gdf \
98     doc/barvinok.tex \
99     doc/chicago.bst \
100     doc/chicago.sty \
101     doc/mydefs.sty \
102     polymake/Makefile.in \
103     polymake/README \
104     polymake/autogen.sh \
105     polymake/configure.in \
106     polymake/lattice_points.cc
108 ACLOCAL_AMFLAGS = -I m4
110 install-data-local:
111         @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
112         $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
114 uninstall-local:
115         rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
117 dist-hook:
118         (cd $(distdir)/polymake; \
119             ./autogen.sh; rm -rf autogen.sh autom4te.cache)
120         (cd doc; make barvinok.pdf)
121         cp doc/barvinok.pdf $(distdir)/doc/
122         if test -f $(top_srcdir)/.git/HEAD; then \
123             echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID; \
124         else \
125             echo $(GIT_HEAD_ID) > $(distdir)/GIT_HEAD_ID; \
126         fi
128 if HAVE_PIPLIB
129 BEE_TESTDIRS = ehrhart_e ehrhart_e/piplib
130 else
131 BEE_TESTDIRS = ehrhart_e
132 endif
134 check-series:
135         @for i in $(top_srcdir)/tests/ehrhart/*; do \
136             if test -f $$i; then \
137                 echo $$i; \
138                 ./verif_ehrhart --series < $$i; \
139             fi \
140         done
141 check:
142         @for i in $(top_srcdir)/tests/ehrhart/*; do \
143             if test -f $$i; then \
144                 echo $$i; \
145                 ./verif_ehrhart < $$i; \
146             fi \
147         done
148         @for dir in $(BEE_TESTDIRS); do \
149             for options in '' '--pip' '--pip --omega'; do \
150                 for i in $(top_srcdir)/tests/$$dir/*; do \
151                     if test -f $$i; then \
152                         echo $$i $$options; \
153                         ./barvinok_enumerate_e --verify $$options < $$i; \
154                     fi \
155                 done \
156             done \
157         done
158         @for i in $(top_srcdir)/tests/*; do \
159             if test -f $$i; then \
160                 echo -n $$i; \
161                 ./test < $$i || echo -n " NOT"; \
162                 echo " ok"; \
163             fi \
164         done
165 if HAVE_GLPK
166         @for i in $(top_srcdir)/tests/lexmin/*; do \
167             if test -f $$i; then \
168                 echo $$i; \
169                 ./lexmin --verify < $$i; \
170             fi \
171         done
172 endif
174 version.h: @GIT_HEAD@
175         echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@