Merge branch 'maint'
[platform/upstream/isl.git] / Makefile.am
1 SUBDIRS = . doc
2 DIST_SUBDIRS = doc
3
4 ACLOCAL_AMFLAGS = -I m4
5 AUTOMAKE_OPTIONS = nostdinc
6
7 lib_LTLIBRARIES = libisl.la
8 noinst_PROGRAMS = isl_test isl_polyhedron_sample isl_pip \
9         isl_polyhedron_minimize isl_polytope_scan \
10         isl_polyhedron_detect_equalities isl_cat \
11         isl_closure isl_bound
12 TESTS = isl_test pip_test.sh bound_test.sh
13
14 if HAVE_PIPLIB
15 ISL_PIPLIB = \
16         isl_lp_piplib.c \
17         isl_map_piplib.c \
18         isl_sample_piplib.c \
19         isl_sample_piplib.h \
20         isl_piplib.c
21 else
22 ISL_PIPLIB = \
23         isl_lp_no_piplib.c \
24         isl_map_no_piplib.c \
25         isl_sample_no_piplib.c
26 endif
27
28 if NEED_GET_MEMORY_FUNCTIONS
29 GET_MEMORY_FUNCTIONS=mp_get_memory_functions.c
30 endif
31
32 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/include -Iinclude/ 
33
34 libisl_la_SOURCES = \
35         $(ISL_PIPLIB) \
36         $(GET_MEMORY_FUNCTIONS) \
37         isl_affine_hull.c \
38         isl_arg.c \
39         isl_basis_reduction.h \
40         basis_reduction_tab.c \
41         isl_bernstein.c \
42         isl_bernstein.h \
43         isl_blk.c \
44         isl_bound.c \
45         isl_bound.h \
46         isl_coalesce.c \
47         isl_constraint.c \
48         isl_convex_hull.c \
49         isl_ctx.c \
50         isl_ctx_private.h \
51         isl_dim.c \
52         isl_dim_private.h \
53         isl_dim_map.h \
54         isl_dim_map.c \
55         isl_div.c \
56         isl_equalities.c \
57         isl_equalities.h \
58         isl_factorization.c \
59         isl_factorization.h \
60         isl_farkas.c \
61         isl_flow.c \
62         isl_fold.c \
63         isl_gmp.c \
64         isl_hash.c \
65         isl_hmap_map_basic_set.c \
66         isl_hmap_map_basic_set.h \
67         isl_ilp.c \
68         isl_input.c \
69         isl_list.c \
70         isl_lp.c \
71         isl_lp_piplib.h \
72         isl_map.c \
73         isl_map_simplify.c \
74         isl_map_subtract.c \
75         isl_map_private.h \
76         isl_map_piplib.h \
77         isl_mat.c \
78         isl_mat_private.h \
79         isl_morph.c \
80         isl_morph.h \
81         isl_name.c \
82         isl_name.h \
83         isl_obj.c \
84         isl_options.c \
85         isl_output.c \
86         isl_qsort.c \
87         isl_qsort.h \
88         isl_piplib.h \
89         isl_point_private.h \
90         isl_point.c \
91         isl_polynomial_private.h \
92         isl_polynomial.c \
93         isl_printer_private.h \
94         isl_printer.c \
95         isl_range.c \
96         isl_range.h \
97         isl_reordering.c \
98         isl_reordering.h \
99         isl_sample.h \
100         isl_sample.c \
101         isl_scan.c \
102         isl_scan.h \
103         isl_schedule.c \
104         isl_stream.c \
105         isl_seq.c \
106         isl_tab.c \
107         isl_tab.h \
108         isl_tab_pip.c \
109         isl_transitive_closure.c \
110         isl_union_map.c \
111         isl_union_map_private.h \
112         isl_vec.c \
113         isl_version.c \
114         isl_vertices_private.h \
115         isl_vertices.c
116 EXTRA_libisl_la_SOURCES = \
117         isl_lp_piplib.c \
118         isl_lp_no_piplib.c \
119         isl_map_piplib.c \
120         isl_map_no_piplib.c \
121         isl_sample_no_piplib.c \
122         isl_sample_piplib.c \
123         isl_sample_piplib.h \
124         isl_piplib.c
125 libisl_la_LIBADD = @PIPLIB_LIBS@ -lgmp
126 libisl_la_LDFLAGS = -version-info @versioninfo@ \
127         @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@
128 libisl_la_CPPFLAGS = $(INCLUDES) @PIPLIB_CPPFLAGS@ @GMP_CPPFLAGS@
129
130 isl_test_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
131 isl_test_LDADD = libisl.la
132
133 isl_polyhedron_sample_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
134 isl_polyhedron_sample_LDADD = libisl.la
135 isl_polyhedron_sample_SOURCES = \
136         polyhedron_sample.c
137
138 isl_pip_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
139 isl_pip_LDADD = libisl.la
140 isl_pip_SOURCES = \
141         pip.c
142
143 isl_bound_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
144 isl_bound_LDADD = libisl.la
145 isl_bound_SOURCES = \
146         bound.c
147
148 isl_polyhedron_minimize_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
149 isl_polyhedron_minimize_LDADD = libisl.la
150 isl_polyhedron_minimize_SOURCES = \
151         polyhedron_minimize.c
152
153 isl_polytope_scan_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
154 isl_polytope_scan_LDADD = libisl.la
155 isl_polytope_scan_SOURCES = \
156         polytope_scan.c
157
158 isl_polyhedron_detect_equalities_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
159 isl_polyhedron_detect_equalities_LDADD = libisl.la
160 isl_polyhedron_detect_equalities_SOURCES = \
161         polyhedron_detect_equalities.c
162
163 isl_cat_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
164 isl_cat_LDADD = libisl.la
165 isl_cat_SOURCES = \
166         cat.c
167
168 isl_closure_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
169 isl_closure_LDADD = libisl.la
170 isl_closure_SOURCES = \
171         closure.c
172
173 nodist_pkginclude_HEADERS = \
174         include/isl/config.h \
175         include/isl/stdint.h
176 pkginclude_HEADERS = \
177         include/isl/arg.h \
178         include/isl/blk.h \
179         include/isl/constraint.h \
180         include/isl/ctx.h \
181         include/isl/dim.h \
182         include/isl/div.h \
183         include/isl/flow.h \
184         include/isl/ilp.h \
185         include/isl/int.h \
186         include/isl/hash.h \
187         include/isl/list.h \
188         include/isl/lp.h \
189         include/isl/mat.h \
190         include/isl/map.h \
191         include/isl/obj.h \
192         include/isl/options.h \
193         include/isl/point.h \
194         include/isl/polynomial.h \
195         include/isl/printer.h \
196         include/isl/schedule.h \
197         include/isl/seq.h \
198         include/isl/set.h \
199         include/isl/stream.h \
200         include/isl/union_map.h \
201         include/isl/union_set.h \
202         include/isl/vec.h \
203         include/isl/version.h \
204         include/isl/vertices.h
205
206 EXTRA_DIST = \
207         basis_reduction_templ.c \
208         isl_pw_templ.c \
209         isl_union_templ.c \
210         isl.py \
211         doc/chicago.bst \
212         doc/chicago.sty \
213         doc/implementation.tex \
214         doc/isl.bib \
215         doc/mypod2latex \
216         doc/manual.tex \
217         doc/user.pod \
218         bound_test.sh \
219         pip_test.sh \
220         test_inputs
221
222 dist-hook:
223         echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID
224         (cd doc; make manual.pdf)
225         cp doc/manual.pdf $(distdir)/doc/
226
227 pkgconfigdir=$(pkgconfig_libdir)
228 pkgconfig_DATA = $(pkgconfig_libfile)
229
230 gitversion.h: @GIT_HEAD@
231         $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@
232
233 install-data-local: $(srcdir)/isl.py
234         @libisl=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p}" \
235                  $(builddir)/libisl.la`; \
236         case $$libisl in \
237         '') echo Cannot find isl library name. GDB bindings not installed.;; \
238         *) echo $(INSTALL_DATA) $(srcdir)/isl.py \
239                 $(DESTDIR)$(libdir)/$$libisl-gdb.py; \
240         test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"; \
241         $(INSTALL_DATA) $(srcdir)/isl.py $(DESTDIR)$(libdir)/$$libisl-gdb.py; esac