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