Merge branch 'maint'
[platform/upstream/isl.git] / Makefile.am
1 if HAVE_CLANG
2     MAYBE_INTERFACE = interface
3 endif
4 SUBDIRS = . $(MAYBE_INTERFACE) doc
5 DIST_SUBDIRS = $(MAYBE_INTERFACE) doc
6
7 ACLOCAL_AMFLAGS = -I m4
8 AUTOMAKE_OPTIONS = nostdinc
9
10 lib_LTLIBRARIES = libisl.la
11 noinst_PROGRAMS = isl_test isl_polyhedron_sample isl_pip \
12         isl_polyhedron_minimize isl_polytope_scan \
13         isl_polyhedron_detect_equalities isl_cat \
14         isl_closure isl_bound isl_codegen
15 TESTS = isl_test codegen_test.sh pip_test.sh bound_test.sh
16
17 if HAVE_PIPLIB
18 ISL_PIPLIB = \
19         isl_lp_piplib.c \
20         isl_map_piplib.c \
21         isl_sample_piplib.c \
22         isl_sample_piplib.h \
23         isl_piplib.c
24 else
25 ISL_PIPLIB = \
26         isl_lp_no_piplib.c \
27         isl_map_no_piplib.c \
28         isl_sample_no_piplib.c
29 endif
30
31 if NEED_GET_MEMORY_FUNCTIONS
32 GET_MEMORY_FUNCTIONS=mp_get_memory_functions.c
33 endif
34
35 INCLUDES = -I. -I$(srcdir) -I$(srcdir)/include -Iinclude/ 
36 AM_CFLAGS = @WARNING_FLAGS@
37
38 libisl_la_SOURCES = \
39         $(ISL_PIPLIB) \
40         $(GET_MEMORY_FUNCTIONS) \
41         isl_aff.c \
42         isl_aff_private.h \
43         isl_affine_hull.c \
44         isl_arg.c \
45         isl_ast.c \
46         isl_ast_private.h \
47         isl_ast_build.c \
48         isl_ast_build_private.h \
49         isl_ast_build_expr.c \
50         isl_ast_build_expr.h \
51         isl_ast_codegen.c \
52         isl_ast_graft.c \
53         isl_ast_graft_private.h \
54         isl_band.c \
55         isl_band_private.h \
56         isl_basis_reduction.h \
57         basis_reduction_tab.c \
58         isl_bernstein.c \
59         isl_bernstein.h \
60         isl_blk.c \
61         isl_bound.c \
62         isl_bound.h \
63         isl_coalesce.c \
64         isl_constraint.c \
65         isl_constraint_private.h \
66         isl_convex_hull.c \
67         isl_ctx.c \
68         isl_ctx_private.h \
69         isl_deprecated.c \
70         isl_dim.c \
71         isl_dim_map.h \
72         isl_dim_map.c \
73         isl_equalities.c \
74         isl_equalities.h \
75         isl_factorization.c \
76         isl_factorization.h \
77         isl_farkas.c \
78         isl_flow.c \
79         isl_fold.c \
80         isl_gmp.c \
81         isl_hash.c \
82         isl_hmap_map_basic_set.c \
83         isl_hmap_map_basic_set.h \
84         isl_ilp.c \
85         isl_input.c \
86         isl_local_space_private.h \
87         isl_local_space.c \
88         isl_lp.c \
89         isl_lp_piplib.h \
90         isl_map.c \
91         isl_map_simplify.c \
92         isl_map_subtract.c \
93         isl_map_private.h \
94         isl_map_piplib.h \
95         isl_mat.c \
96         isl_mat_private.h \
97         isl_morph.c \
98         isl_morph.h \
99         isl_id.c \
100         isl_id_private.h \
101         isl_obj.c \
102         isl_options.c \
103         isl_options_private.h \
104         isl_output.c \
105         isl_piplib.h \
106         isl_point_private.h \
107         isl_point.c \
108         isl_polynomial_private.h \
109         isl_polynomial.c \
110         isl_printer_private.h \
111         isl_printer.c \
112         print.c \
113         isl_range.c \
114         isl_range.h \
115         isl_reordering.c \
116         isl_reordering.h \
117         isl_sample.h \
118         isl_sample.c \
119         isl_scan.c \
120         isl_scan.h \
121         isl_schedule.c \
122         isl_schedule_private.h \
123         isl_set_list.c \
124         isl_sort.c \
125         isl_sort.h \
126         isl_space.c \
127         isl_space_private.h \
128         isl_stream.c \
129         isl_stream_private.h \
130         isl_seq.c \
131         isl_tab.c \
132         isl_tab.h \
133         isl_tab_pip.c \
134         isl_tarjan.c \
135         isl_tarjan.h \
136         isl_transitive_closure.c \
137         isl_union_map.c \
138         isl_union_map_private.h \
139         isl_vec.c \
140         isl_version.c \
141         isl_vertices_private.h \
142         isl_vertices.c
143 EXTRA_libisl_la_SOURCES = \
144         isl_lp_piplib.c \
145         isl_lp_no_piplib.c \
146         isl_map_piplib.c \
147         isl_map_no_piplib.c \
148         isl_sample_no_piplib.c \
149         isl_sample_piplib.c \
150         isl_sample_piplib.h \
151         isl_piplib.c
152 libisl_la_LIBADD = @PIPLIB_LIBS@ @GMP_LIBS@
153 libisl_la_LDFLAGS = -version-info @versioninfo@ \
154         @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@
155 libisl_la_CPPFLAGS = $(INCLUDES) @PIPLIB_CPPFLAGS@ @GMP_CPPFLAGS@
156
157 isl_test_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
158 isl_test_LDFLAGS = @GMP_LDFLAGS@
159 isl_test_LDADD = libisl.la @GMP_LIBS@
160
161 isl_polyhedron_sample_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
162 isl_polyhedron_sample_LDADD = libisl.la
163 isl_polyhedron_sample_SOURCES = \
164         polyhedron_sample.c
165
166 isl_pip_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
167 isl_pip_LDFLAGS = @GMP_LDFLAGS@
168 isl_pip_LDADD = libisl.la @GMP_LIBS@
169 isl_pip_SOURCES = \
170         pip.c
171
172 isl_codegen_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
173 isl_codegen_LDFLAGS = @GMP_LDFLAGS@
174 isl_codegen_LDADD = libisl.la @GMP_LIBS@
175 isl_codegen_SOURCES = \
176         codegen.c
177
178 isl_bound_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
179 isl_bound_LDFLAGS = @GMP_LDFLAGS@
180 isl_bound_LDADD = libisl.la @GMP_LIBS@
181 isl_bound_SOURCES = \
182         bound.c
183
184 isl_polyhedron_minimize_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
185 isl_polyhedron_minimize_LDFLAGS = @GMP_LDFLAGS@
186 isl_polyhedron_minimize_LDADD = libisl.la @GMP_LIBS@
187 isl_polyhedron_minimize_SOURCES = \
188         polyhedron_minimize.c
189
190 isl_polytope_scan_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
191 isl_polytope_scan_LDADD = libisl.la
192 isl_polytope_scan_SOURCES = \
193         polytope_scan.c
194
195 isl_polyhedron_detect_equalities_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
196 isl_polyhedron_detect_equalities_LDADD = libisl.la
197 isl_polyhedron_detect_equalities_SOURCES = \
198         polyhedron_detect_equalities.c
199
200 isl_cat_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
201 isl_cat_LDADD = libisl.la
202 isl_cat_SOURCES = \
203         cat.c
204
205 isl_closure_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
206 isl_closure_LDADD = libisl.la
207 isl_closure_SOURCES = \
208         closure.c
209
210 nodist_pkginclude_HEADERS = \
211         include/isl/config.h \
212         include/isl/stdint.h
213 pkginclude_HEADERS = \
214         include/isl/aff.h \
215         include/isl/aff_type.h \
216         include/isl/arg.h \
217         include/isl/ast.h \
218         include/isl/ast_build.h \
219         include/isl/band.h \
220         include/isl/blk.h \
221         include/isl/constraint.h \
222         include/isl/ctx.h \
223         include/isl/dim.h \
224         include/isl/flow.h \
225         include/isl/id.h \
226         include/isl/ilp.h \
227         include/isl/int.h \
228         include/isl/hash.h \
229         include/isl/list.h \
230         include/isl/local_space.h \
231         include/isl/lp.h \
232         include/isl/mat.h \
233         include/isl/map.h \
234         include/isl/map_type.h \
235         include/isl/multi.h \
236         include/isl/obj.h \
237         include/isl/options.h \
238         include/isl/point.h \
239         include/isl/polynomial.h \
240         include/isl/polynomial_type.h \
241         include/isl/printer.h \
242         include/isl/schedule.h \
243         include/isl/seq.h \
244         include/isl/set.h \
245         include/isl/set_type.h \
246         include/isl/space.h \
247         include/isl/stream.h \
248         include/isl/union_map.h \
249         include/isl/union_map_type.h \
250         include/isl/union_set.h \
251         include/isl/union_set_type.h \
252         include/isl/vec.h \
253         include/isl/version.h \
254         include/isl/vertices.h
255
256 EXTRA_DIST = \
257         LICENSE \
258         isl_config_post.h \
259         basis_reduction_templ.c \
260         isl_list_templ.c \
261         isl_list_templ.h \
262         isl_map_lexopt_templ.c \
263         isl_multi_templ.c \
264         isl_multi_templ.h \
265         print_templ.c \
266         isl_power_templ.c \
267         isl_pw_templ.c \
268         isl_union_templ.c \
269         isl.py \
270         doc/SubmittingPatches \
271         doc/chicago.bst \
272         doc/chicago.sty \
273         doc/implementation.tex \
274         doc/isl.bib \
275         doc/mypod2latex \
276         doc/manual.tex \
277         doc/user.pod \
278         interface/all.h \
279         interface/isl.py.top \
280         test_inputs
281
282 dist-hook:
283         echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID
284         (cd doc; make manual.pdf)
285         cp doc/manual.pdf $(distdir)/doc/
286
287 pkgconfigdir=$(pkgconfig_libdir)
288 pkgconfig_DATA = $(pkgconfig_libfile)
289
290 gitversion.h: @GIT_HEAD@
291         $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@
292
293 install-data-local: $(srcdir)/isl.py
294         @libisl=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
295                  $(builddir)/libisl.la`; \
296         case $$libisl in \
297         '') echo Cannot find isl library name. GDB bindings not installed.;; \
298         *) echo $(INSTALL_DATA) $(srcdir)/isl.py \
299                 $(DESTDIR)$(libdir)/$$libisl-gdb.py; \
300         test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"; \
301         $(INSTALL_DATA) $(srcdir)/isl.py $(DESTDIR)$(libdir)/$$libisl-gdb.py; esac