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