add exported isl_pw_aff_param_on_domain_id
[isl.git] / Makefile.am
blobd7008ddcb466af02aa3fa2fdefed809f98cafcc6
1 if HAVE_CLANG
2 MAYBE_INTERFACE = interface
3 FORCE:
4 interface/extract_interface: FORCE
5         $(MAKE) $(AM_MAKEFLAGS) -C interface extract_interface
6 endif
7 SUBDIRS = . $(MAYBE_INTERFACE) doc
8 DIST_SUBDIRS = $(MAYBE_INTERFACE) doc
10 ACLOCAL_AMFLAGS = -I m4
11 AUTOMAKE_OPTIONS = nostdinc subdir-objects
13 lib_LTLIBRARIES = libisl.la
14 noinst_PROGRAMS = isl_test isl_polyhedron_sample isl_pip \
15         isl_polyhedron_minimize isl_polytope_scan \
16         isl_polyhedron_detect_equalities isl_cat \
17         isl_closure isl_bound isl_schedule isl_codegen isl_test_int \
18         isl_flow isl_flow_cmp isl_schedule_cmp
19 TESTS = isl_test codegen_test.sh pip_test.sh bound_test.sh isl_test_int \
20         flow_test.sh schedule_test.sh
21 if HAVE_CPP_ISL_H
22   CPP_H = include/isl/cpp.h
23 if HAVE_CXX11
24   noinst_PROGRAMS += isl_test_cpp
25   TESTS += isl_test_cpp
26 endif
27 endif
28 if HAVE_CLANG
29 if HAVE_CXX11
30   noinst_PROGRAMS += isl_test_cpp-checked isl_test_cpp-checked-conversion
31   TESTS += isl_test_cpp-checked isl_test_cpp-checked-conversion
32 endif
33 if HAVE_PYTHON
34   TESTS += isl_test_python.py
35   noinst_PYTHON = interface/isl.py
36   isl_test_python.py: interface/isl.py libisl.la
37 endif
38 endif
39 TEST_EXTENSIONS = .py
40 AM_TESTS_ENVIRONMENT = \
41         export PYTHONPATH=interface; \
42         export ISL_DYLD_LIBRARY_PATH=.libs; \
43         export LD_LIBRARY_PATH=.libs;
44 PY_LOG_COMPILER = $(PYTHON)
46 if IMATH_FOR_MP
48 MP_SRC = \
49         isl_imath.c \
50         isl_imath.h \
51         isl_int_imath.h \
52         imath_wrap/gmp_compat.h \
53         imath_wrap/imath.h \
54         imath_wrap/imrat.h \
55         imath_wrap/wrap.h \
56         imath_wrap/gmp_compat.c \
57         imath_wrap/imath.c \
58         imath_wrap/imrat.c
60 noinst_PROGRAMS += isl_test_imath
61 TESTS += isl_test_imath
63 if SMALL_INT_OPT
64 MP_SRC += isl_int_sioimath.h \
65         isl_int_sioimath.c \
66         isl_val_sioimath.c
67 else
68 MP_SRC += isl_val_imath.c
69 endif
71 MP_INCLUDE_H =
72 endif
74 if GMP_FOR_MP
75 if NEED_GET_MEMORY_FUNCTIONS
76 GET_MEMORY_FUNCTIONS=mp_get_memory_functions.c
77 endif
79 MP_SRC = \
80         $(GET_MEMORY_FUNCTIONS) \
81         isl_int_gmp.h \
82         isl_gmp.c \
83         isl_val_gmp.c
85 MP_INCLUDE_H = include/isl/val_gmp.h
86 endif
88 includes = -I. -I$(srcdir) -I$(srcdir)/include -Iinclude/
89 AM_CPPFLAGS = $(includes) @MP_CPPFLAGS@
90 AM_CFLAGS = @WARNING_FLAGS@ @MP_CFLAGS@
92 libisl_la_SOURCES = \
93         $(MP_SRC) \
94         isl_aff.c \
95         isl_aff_map.c \
96         isl_aff_private.h \
97         isl_affine_hull.c \
98         isl_arg.c \
99         isl_ast.c \
100         isl_ast_private.h \
101         isl_ast_build.c \
102         isl_ast_build_private.h \
103         isl_ast_build_expr.c \
104         isl_ast_build_expr.h \
105         isl_ast_codegen.c \
106         isl_ast_graft.c \
107         isl_ast_graft_private.h \
108         isl_basis_reduction.h \
109         basis_reduction_tab.c \
110         isl_bernstein.c \
111         isl_bernstein.h \
112         isl_blk.c \
113         isl_blk.h \
114         isl_bound.c \
115         isl_bound.h \
116         isl_box.c \
117         isl_coalesce.c \
118         isl_constraint.c \
119         isl_constraint_private.h \
120         isl_convex_hull.c \
121         isl_ctx.c \
122         isl_ctx_private.h \
123         isl_deprecated.c \
124         isl_dim_map.h \
125         isl_dim_map.c \
126         isl_equalities.c \
127         isl_equalities.h \
128         isl_factorization.c \
129         isl_factorization.h \
130         isl_farkas.c \
131         isl_ffs.c \
132         isl_flow.c \
133         isl_fold.c \
134         isl_hash.c \
135         isl_hash_private.h \
136         isl_id_to_ast_expr.c \
137         isl_id_to_id.c \
138         isl_id_to_pw_aff.c \
139         isl_ilp.c \
140         isl_ilp_private.h \
141         isl_input.c \
142         isl_int.h \
143         isl_local_private.h \
144         isl_local.h \
145         isl_local.c \
146         isl_local_space_private.h \
147         isl_local_space.c \
148         isl_lp.c \
149         isl_lp_private.h \
150         isl_map.c \
151         isl_map_list.c \
152         isl_map_simplify.c \
153         isl_map_subtract.c \
154         isl_map_private.h \
155         isl_map_to_basic_set.c \
156         isl_mat.c \
157         isl_mat_private.h \
158         isl_morph.c \
159         isl_morph.h \
160         isl_id.c \
161         isl_id_private.h \
162         isl_obj.c \
163         isl_options.c \
164         isl_options_private.h \
165         isl_output.c \
166         isl_output_private.h \
167         isl_point_private.h \
168         isl_point.c \
169         isl_polynomial_private.h \
170         isl_polynomial.c \
171         isl_printer_private.h \
172         isl_printer.c \
173         print.c \
174         isl_range.c \
175         isl_range.h \
176         isl_reordering.c \
177         isl_reordering.h \
178         isl_sample.h \
179         isl_sample.c \
180         isl_scan.c \
181         isl_scan.h \
182         isl_schedule.c \
183         isl_schedule_band.c \
184         isl_schedule_band.h \
185         isl_schedule_node.c \
186         isl_schedule_node_private.h \
187         isl_schedule_read.c \
188         isl_schedule_tree.c \
189         isl_schedule_tree.h \
190         isl_schedule_private.h \
191         isl_schedule_constraints.c \
192         isl_schedule_constraints.h \
193         isl_scheduler.c \
194         isl_set_list.c \
195         isl_sort.c \
196         isl_sort.h \
197         isl_space.c \
198         isl_space_private.h \
199         isl_stream.c \
200         isl_stream_private.h \
201         isl_seq.c \
202         isl_seq.h \
203         isl_stride.c \
204         isl_tab.c \
205         isl_tab.h \
206         isl_tab_pip.c \
207         isl_tarjan.c \
208         isl_tarjan.h \
209         isl_transitive_closure.c \
210         isl_union_map.c \
211         isl_union_map_private.h \
212         isl_union_set_private.h \
213         isl_val.c \
214         isl_val_private.h \
215         isl_vec_private.h \
216         isl_vec.c \
217         isl_version.c \
218         isl_vertices_private.h \
219         isl_vertices.c \
220         isl_yaml.h
221 libisl_la_LIBADD = @MP_LIBS@
222 libisl_la_LDFLAGS = -version-info @versioninfo@ \
223         @MP_LDFLAGS@
225 isl_test_LDFLAGS = @MP_LDFLAGS@
226 isl_test_LDADD = libisl.la @MP_LIBS@
228 isl_test_int_LDFLAGS = @MP_LDFLAGS@
229 isl_test_int_LDADD = libisl.la @MP_LIBS@
231 if IMATH_FOR_MP
232 isl_test_imath_LDFLAGS = @MP_LDFLAGS@
233 isl_test_imath_LDADD = libisl.la @MP_LIBS@
234 endif
236 isl_polyhedron_sample_LDADD = libisl.la
237 isl_polyhedron_sample_SOURCES = \
238         polyhedron_sample.c
240 isl_pip_LDFLAGS = @MP_LDFLAGS@
241 isl_pip_LDADD = libisl.la @MP_LIBS@
242 isl_pip_SOURCES = \
243         pip.c
245 isl_schedule_LDFLAGS = @MP_LDFLAGS@
246 isl_schedule_LDADD = libisl.la @MP_LIBS@
247 isl_schedule_SOURCES = \
248         schedule.c
250 isl_schedule_cmp_LDFLAGS = @MP_LDFLAGS@
251 isl_schedule_cmp_LDADD = libisl.la @MP_LIBS@
252 isl_schedule_cmp_SOURCES = \
253         schedule_cmp.c
255 isl_flow_LDFLAGS = @MP_LDFLAGS@
256 isl_flow_LDADD = libisl.la @MP_LIBS@
257 isl_flow_SOURCES = \
258         flow.c
260 isl_flow_cmp_LDFLAGS = @MP_LDFLAGS@
261 isl_flow_cmp_LDADD = libisl.la @MP_LIBS@
262 isl_flow_cmp_SOURCES = \
263         flow_cmp.c
265 isl_codegen_LDFLAGS = @MP_LDFLAGS@
266 isl_codegen_LDADD = libisl.la @MP_LIBS@
267 isl_codegen_SOURCES = \
268         codegen.c
270 isl_bound_LDFLAGS = @MP_LDFLAGS@
271 isl_bound_LDADD = libisl.la @MP_LIBS@
272 isl_bound_SOURCES = \
273         bound.c
275 isl_polyhedron_minimize_LDFLAGS = @MP_LDFLAGS@
276 isl_polyhedron_minimize_LDADD = libisl.la @MP_LIBS@
277 isl_polyhedron_minimize_SOURCES = \
278         polyhedron_minimize.c
280 isl_polytope_scan_LDADD = libisl.la
281 isl_polytope_scan_SOURCES = \
282         polytope_scan.c
284 isl_polyhedron_detect_equalities_LDADD = libisl.la
285 isl_polyhedron_detect_equalities_SOURCES = \
286         polyhedron_detect_equalities.c
288 isl_cat_LDADD = libisl.la
289 isl_cat_SOURCES = \
290         cat.c
292 isl_closure_LDADD = libisl.la
293 isl_closure_SOURCES = \
294         closure.c
296 isl_test_cpp_CXXFLAGS = @CXX11FLAGS@
297 isl_test_cpp_SOURCES = \
298         isl_test_cpp.cc \
299         include/isl/cpp.h
300 isl_test_cpp_LDFLAGS = @MP_LDFLAGS@
301 isl_test_cpp_LDADD = libisl.la @MP_LIBS@
303 isl_test_cpp_checked_CXXFLAGS = @CXX11FLAGS@
304 isl_test_cpp_checked_SOURCES = \
305         isl_test_cpp-checked.cc \
306         include/isl/cpp-checked.h
307 isl_test_cpp_checked_LDFLAGS = @MP_LDFLAGS@
308 isl_test_cpp_checked_LDADD = libisl.la @MP_LIBS@
310 isl_test_cpp_checked_conversion_CXXFLAGS = @CXX11FLAGS@
311 isl_test_cpp_checked_conversion_SOURCES = \
312         isl_test_cpp-checked-conversion.cc \
313         include/isl/cpp-checked-conversion.h
314 isl_test_cpp_checked_conversion_LDFLAGS = @MP_LDFLAGS@
315 isl_test_cpp_checked_conversion_LDADD = libisl.la @MP_LIBS@
317 # dummy library that captures the dependencies on all headers
318 # that are relevant for the bindings
319 noinst_LIBRARIES = libdep.a
320 libdep_a_SOURCES = dep.c
322 if HAVE_CLANG
323 interface/isldlname.py: libisl.la
324         $(AM_V_GEN) $(GREP) dlname $< | $(SED) -e 's/dlname/isl_dlname/' > $@
325 interface/isl.py: interface/extract_interface libdep.a python/isl.py.top \
326                 interface/isldlname.py
327         (cat interface/isldlname.py $(srcdir)/python/isl.py.top && \
328                 interface/extract_interface$(EXEEXT) --language=python \
329                         $(includes) $(srcdir)/all.h) \
330                         > $@ || (rm $@ && false)
332 include/isl/cpp.h: interface/extract_interface libdep.a \
333                 cpp/cpp.h.top cpp/cpp.h.pre cpp/cpp.h.bot
334         $(MKDIR_P) "include/isl/cpp" && \
335         (cat $(srcdir)/cpp/cpp.h.top $(srcdir)/all.h \
336             $(srcdir)/cpp/cpp.h.pre && \
337                 interface/extract_interface$(EXEEXT) --language=cpp \
338                         $(includes) $(srcdir)/all.h && \
339                 cat $(srcdir)/cpp/cpp.h.bot) \
340                         > $@ || (rm $@ && false)
342 include/isl/cpp-checked.h: interface/extract_interface libdep.a \
343                 cpp/cpp-checked.h.top \
344                 cpp/cpp-checked.h.pre cpp/cpp-checked.h.bot
345         (cat $(srcdir)/cpp/cpp-checked.h.top $(srcdir)/all.h \
346             $(srcdir)/cpp/cpp-checked.h.pre && \
347                 interface/extract_interface$(EXEEXT) \
348                         --language=cpp-checked \
349                         $(includes) $(srcdir)/all.h && \
350                 cat $(srcdir)/cpp/cpp-checked.h.bot) \
351                         > $@ || (rm $@ && false)
353 include/isl/cpp-checked-conversion.h: interface/extract_interface libdep.a \
354                 cpp/cpp-checked-conversion.h.top \
355                 cpp/cpp-checked-conversion.h.bot
356         (cat $(srcdir)/cpp/cpp-checked-conversion.h.top && \
357                 interface/extract_interface$(EXEEXT) \
358                         --language=cpp-checked-conversion \
359                         $(includes) $(srcdir)/all.h && \
360                 cat $(srcdir)/cpp/cpp-checked-conversion.h.bot) \
361                         > $@ || (rm $@ && false)
362 endif
364 nodist_pkginclude_HEADERS = \
365         include/isl/stdint.h
366 pkginclude_HEADERS = \
367         $(CPP_H) \
368         $(MP_INCLUDE_H) \
369         include/isl/aff.h \
370         include/isl/aff_type.h \
371         include/isl/arg.h \
372         include/isl/ast.h \
373         include/isl/ast_type.h \
374         include/isl/ast_build.h \
375         include/isl/constraint.h \
376         include/isl/ctx.h \
377         include/isl/fixed_box.h \
378         include/isl/flow.h \
379         include/isl/id.h \
380         include/isl/id_type.h \
381         include/isl/id_to_ast_expr.h \
382         include/isl/id_to_id.h \
383         include/isl/id_to_pw_aff.h \
384         include/isl/ilp.h \
385         include/isl/hash.h \
386         include/isl/hmap.h \
387         include/isl/hmap_templ.c \
388         include/isl/list.h \
389         include/isl/local_space.h \
390         include/isl/lp.h \
391         include/isl/mat.h \
392         include/isl/map.h \
393         include/isl/map_to_basic_set.h \
394         include/isl/map_type.h \
395         include/isl/maybe.h \
396         include/isl/maybe_ast_expr.h \
397         include/isl/maybe_basic_set.h \
398         include/isl/maybe_id.h \
399         include/isl/maybe_pw_aff.h \
400         include/isl/maybe_templ.h \
401         include/isl/multi.h \
402         include/isl/obj.h \
403         include/isl/options.h \
404         include/isl/point.h \
405         include/isl/polynomial.h \
406         include/isl/polynomial_type.h \
407         include/isl/printer.h \
408         include/isl/printer_type.h \
409         include/isl/schedule.h \
410         include/isl/schedule_node.h \
411         include/isl/schedule_type.h \
412         include/isl/set.h \
413         include/isl/set_type.h \
414         include/isl/space.h \
415         include/isl/space_type.h \
416         include/isl/stream.h \
417         include/isl/stride_info.h \
418         include/isl/union_map.h \
419         include/isl/union_map_type.h \
420         include/isl/union_set.h \
421         include/isl/union_set_type.h \
422         include/isl/val.h \
423         include/isl/val_type.h \
424         include/isl/vec.h \
425         include/isl/version.h \
426         include/isl/vertices.h
428 if HAVE_CLANG
429     CPP_INTERFACES = \
430         include/isl/cpp.h \
431         include/isl/cpp-checked.h \
432         include/isl/cpp-checked-conversion.h
433 endif
434 BUILT_SOURCES = gitversion.h $(CPP_INTERFACES)
435 CLEANFILES = \
436         gitversion.h \
437         interface/isldlname.py \
438         interface/isl.py \
439         interface/isl.pyc \
440         $(CPP_INTERFACES)
442 DISTCLEANFILES = \
443         isl-uninstalled.sh \
444         isl-uninstalled.pc \
445         isl.pc \
446         isl.pc.in \
447         include/isl/stdint.h
449 EXTRA_DIST = \
450         LICENSE \
451         isl_config_post.h \
452         basis_reduction_templ.c \
453         isl_bind_domain_templ.c \
454         bset_to_bmap.c \
455         bset_from_bmap.c \
456         check_reparse_templ.c \
457         check_type_range_templ.c \
458         isl_domain_factor_templ.c \
459         extract_key.c \
460         has_single_reference_templ.c \
461         isl_list_macro.h \
462         isl_list_templ.c \
463         isl_list_templ.h \
464         isl_map_lexopt_templ.c \
465         isl_maybe_map.h \
466         isl_multi_macro.h \
467         isl_multi_bind_templ.c \
468         isl_multi_explicit_domain.c \
469         isl_multi_pw_aff_explicit_domain.c \
470         isl_multi_union_pw_aff_explicit_domain.c \
471         isl_multi_no_explicit_domain.c \
472         isl_multi_no_domain_templ.c \
473         isl_multi_templ.c \
474         isl_multi_templ.h \
475         isl_multi_align_templ.c \
476         isl_multi_align_set.c \
477         isl_multi_align_union_set.c \
478         isl_multi_apply_templ.c \
479         isl_multi_apply_set.c \
480         isl_multi_apply_union_set.c \
481         isl_multi_arith_templ.c \
482         isl_multi_bind_domain_templ.c \
483         isl_multi_cmp.c \
484         isl_multi_coalesce.c \
485         isl_multi_dim_id_templ.c \
486         isl_multi_dims.c \
487         isl_multi_domain_templ.c \
488         isl_multi_floor.c \
489         isl_multi_from_base_templ.c \
490         isl_multi_gist.c \
491         isl_multi_hash.c \
492         isl_multi_intersect.c \
493         isl_multi_identity_templ.c \
494         isl_multi_locals_templ.c \
495         isl_multi_move_dims_templ.c \
496         isl_multi_nan_templ.c \
497         isl_multi_param_templ.c \
498         isl_multi_product_templ.c \
499         isl_multi_read_no_explicit_domain_templ.c \
500         isl_multi_splice_templ.c \
501         isl_multi_tuple_id_templ.c \
502         isl_multi_zero_templ.c \
503         print_templ.c \
504         print_templ_yaml.c \
505         print_yaml_field_templ.c \
506         isl_power_templ.c \
507         isl_pw_macro.h \
508         isl_pw_templ.c \
509         isl_pw_templ.h \
510         isl_pw_bind_domain_templ.c \
511         isl_pw_eval.c \
512         isl_pw_hash.c \
513         isl_pw_union_opt.c \
514         read_in_string_templ.c \
515         set_to_map.c \
516         set_from_map.c \
517         set_list_from_map_list_inl.c \
518         isl_tab_lexopt_templ.c \
519         isl_test_list_templ.c \
520         uset_to_umap.c \
521         uset_from_umap.c \
522         isl_union_macro.h \
523         isl_union_templ.c \
524         isl_union_single.c \
525         isl_union_multi.c \
526         isl_union_eval.c \
527         isl_union_neg.c \
528         libisl-gdb.py \
529         doc/CodingStyle \
530         doc/SubmittingPatches \
531         doc/implementation.tex \
532         doc/isl.bib \
533         doc/mypod2latex \
534         doc/manual.tex \
535         doc/reading.tex \
536         doc/user.pod \
537         imath/gmp_compat.c \
538         imath/gmp_compat.h \
539         imath/imath.c \
540         imath/imath.h \
541         imath/imrat.c \
542         imath/imrat.h \
543         all.h \
544         cpp \
545         python \
546         isl_test_cpp-generic.cc \
547         isl_test_python.py \
548         test_inputs
550 dist-hook:
551         echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID
552         (cd doc; make manual.pdf)
553         cp doc/manual.pdf $(distdir)/doc/
555 pkgconfigdir=$(pkgconfig_libdir)
556 pkgconfig_DATA = $(pkgconfig_libfile)
558 gitversion.h: @GIT_HEAD@
559         $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@
561 install-data-local: $(srcdir)/libisl-gdb.py
562         @libisl=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
563                  $(builddir)/libisl.la`; \
564         case $$libisl in \
565         '') echo Cannot find isl library name. GDB bindings not installed.;; \
566         *) echo $(INSTALL_DATA) $(srcdir)/libisl-gdb.py \
567                 $(DESTDIR)$(libdir)/$$libisl-gdb.py; \
568         test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"; \
569         $(INSTALL_DATA) $(srcdir)/libisl-gdb.py \
570             $(DESTDIR)$(libdir)/$$libisl-gdb.py; \
571         esac
573 uninstall-local:
574         @libisl=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
575                  $(builddir)/libisl.la`; \
576         if test -n "$${libisl}"; then \
577                 rm -f $(DESTDIR)$(libdir)/$$libisl-gdb.py; \
578         fi