e1f26b395f66f083854c2a67628c288607ea2828
[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
15 TESTS = isl_test 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_band.c \
46         isl_band_private.h \
47         isl_basis_reduction.h \
48         basis_reduction_tab.c \
49         isl_bernstein.c \
50         isl_bernstein.h \
51         isl_blk.c \
52         isl_bound.c \
53         isl_bound.h \
54         isl_coalesce.c \
55         isl_constraint.c \
56         isl_constraint_private.h \
57         isl_convex_hull.c \
58         isl_ctx.c \
59         isl_ctx_private.h \
60         isl_dim.c \
61         isl_dim_map.h \
62         isl_dim_map.c \
63         isl_equalities.c \
64         isl_equalities.h \
65         isl_factorization.c \
66         isl_factorization.h \
67         isl_farkas.c \
68         isl_flow.c \
69         isl_fold.c \
70         isl_gmp.c \
71         isl_hash.c \
72         isl_hmap_map_basic_set.c \
73         isl_hmap_map_basic_set.h \
74         isl_ilp.c \
75         isl_input.c \
76         isl_list.c \
77         isl_list_private.h \
78         isl_local_space_private.h \
79         isl_local_space.c \
80         isl_lp.c \
81         isl_lp_piplib.h \
82         isl_map.c \
83         isl_map_simplify.c \
84         isl_map_subtract.c \
85         isl_map_private.h \
86         isl_map_piplib.h \
87         isl_mat.c \
88         isl_mat_private.h \
89         isl_morph.c \
90         isl_morph.h \
91         isl_id.c \
92         isl_id_private.h \
93         isl_obj.c \
94         isl_options.c \
95         isl_options_private.h \
96         isl_output.c \
97         isl_piplib.h \
98         isl_point_private.h \
99         isl_point.c \
100         isl_polynomial_private.h \
101         isl_polynomial.c \
102         isl_printer_private.h \
103         isl_printer.c \
104         print.c \
105         isl_range.c \
106         isl_range.h \
107         isl_reordering.c \
108         isl_reordering.h \
109         isl_sample.h \
110         isl_sample.c \
111         isl_scan.c \
112         isl_scan.h \
113         isl_schedule.c \
114         isl_schedule_private.h \
115         isl_sort.c \
116         isl_sort.h \
117         isl_space.c \
118         isl_space_private.h \
119         isl_stream.c \
120         isl_stream_private.h \
121         isl_seq.c \
122         isl_tab.c \
123         isl_tab.h \
124         isl_tab_pip.c \
125         isl_transitive_closure.c \
126         isl_union_map.c \
127         isl_union_map_private.h \
128         isl_vec.c \
129         isl_version.c \
130         isl_vertices_private.h \
131         isl_vertices.c
132 EXTRA_libisl_la_SOURCES = \
133         isl_lp_piplib.c \
134         isl_lp_no_piplib.c \
135         isl_map_piplib.c \
136         isl_map_no_piplib.c \
137         isl_sample_no_piplib.c \
138         isl_sample_piplib.c \
139         isl_sample_piplib.h \
140         isl_piplib.c
141 libisl_la_LIBADD = @PIPLIB_LIBS@ @GMP_LIBS@
142 libisl_la_LDFLAGS = -version-info @versioninfo@ \
143         @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@
144 libisl_la_CPPFLAGS = $(INCLUDES) @PIPLIB_CPPFLAGS@ @GMP_CPPFLAGS@
145
146 isl_test_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
147 isl_test_LDFLAGS = @GMP_LDFLAGS@
148 isl_test_LDADD = libisl.la @GMP_LIBS@
149
150 isl_polyhedron_sample_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
151 isl_polyhedron_sample_LDADD = libisl.la
152 isl_polyhedron_sample_SOURCES = \
153         polyhedron_sample.c
154
155 isl_pip_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
156 isl_pip_LDFLAGS = @GMP_LDFLAGS@
157 isl_pip_LDADD = libisl.la @GMP_LIBS@
158 isl_pip_SOURCES = \
159         pip.c
160
161 isl_bound_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
162 isl_bound_LDFLAGS = @GMP_LDFLAGS@
163 isl_bound_LDADD = libisl.la @GMP_LIBS@
164 isl_bound_SOURCES = \
165         bound.c
166
167 isl_polyhedron_minimize_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
168 isl_polyhedron_minimize_LDFLAGS = @GMP_LDFLAGS@
169 isl_polyhedron_minimize_LDADD = libisl.la @GMP_LIBS@
170 isl_polyhedron_minimize_SOURCES = \
171         polyhedron_minimize.c
172
173 isl_polytope_scan_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
174 isl_polytope_scan_LDADD = libisl.la
175 isl_polytope_scan_SOURCES = \
176         polytope_scan.c
177
178 isl_polyhedron_detect_equalities_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
179 isl_polyhedron_detect_equalities_LDADD = libisl.la
180 isl_polyhedron_detect_equalities_SOURCES = \
181         polyhedron_detect_equalities.c
182
183 isl_cat_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
184 isl_cat_LDADD = libisl.la
185 isl_cat_SOURCES = \
186         cat.c
187
188 isl_closure_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
189 isl_closure_LDADD = libisl.la
190 isl_closure_SOURCES = \
191         closure.c
192
193 nodist_pkginclude_HEADERS = \
194         include/isl/config.h \
195         include/isl/stdint.h
196 pkginclude_HEADERS = \
197         include/isl/aff.h \
198         include/isl/aff_type.h \
199         include/isl/arg.h \
200         include/isl/band.h \
201         include/isl/blk.h \
202         include/isl/constraint.h \
203         include/isl/ctx.h \
204         include/isl/dim.h \
205         include/isl/flow.h \
206         include/isl/id.h \
207         include/isl/ilp.h \
208         include/isl/int.h \
209         include/isl/hash.h \
210         include/isl/list.h \
211         include/isl/local_space.h \
212         include/isl/lp.h \
213         include/isl/mat.h \
214         include/isl/map.h \
215         include/isl/map_type.h \
216         include/isl/multi.h \
217         include/isl/obj.h \
218         include/isl/options.h \
219         include/isl/point.h \
220         include/isl/polynomial.h \
221         include/isl/polynomial_type.h \
222         include/isl/printer.h \
223         include/isl/schedule.h \
224         include/isl/seq.h \
225         include/isl/set.h \
226         include/isl/set_type.h \
227         include/isl/space.h \
228         include/isl/stream.h \
229         include/isl/union_map.h \
230         include/isl/union_map_type.h \
231         include/isl/union_set.h \
232         include/isl/union_set_type.h \
233         include/isl/vec.h \
234         include/isl/version.h \
235         include/isl/vertices.h
236
237 EXTRA_DIST = \
238         isl_config_post.h \
239         basis_reduction_templ.c \
240         isl_list_templ.c \
241         isl_list_templ.h \
242         isl_map_lexopt_templ.c \
243         isl_multi_templ.c \
244         isl_multi_templ.h \
245         print_templ.c \
246         isl_power_templ.c \
247         isl_pw_templ.c \
248         isl_union_templ.c \
249         isl.py \
250         doc/SubmittingPatches \
251         doc/chicago.bst \
252         doc/chicago.sty \
253         doc/implementation.tex \
254         doc/isl.bib \
255         doc/mypod2latex \
256         doc/manual.tex \
257         doc/user.pod \
258         test_inputs
259
260 dist-hook:
261         echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID
262         (cd doc; make manual.pdf)
263         cp doc/manual.pdf $(distdir)/doc/
264
265 pkgconfigdir=$(pkgconfig_libdir)
266 pkgconfig_DATA = $(pkgconfig_libfile)
267
268 gitversion.h: @GIT_HEAD@
269         $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@
270
271 install-data-local: $(srcdir)/isl.py
272         @libisl=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p}" \
273                  $(builddir)/libisl.la`; \
274         case $$libisl in \
275         '') echo Cannot find isl library name. GDB bindings not installed.;; \
276         *) echo $(INSTALL_DATA) $(srcdir)/isl.py \
277                 $(DESTDIR)$(libdir)/$$libisl-gdb.py; \
278         test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"; \
279         $(INSTALL_DATA) $(srcdir)/isl.py $(DESTDIR)$(libdir)/$$libisl-gdb.py; esac