make sure destination for GDB module exists before installing
[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_div.c \
54         isl_equalities.c \
55         isl_equalities.h \
56         isl_factorization.c \
57         isl_factorization.h \
58         isl_flow.c \
59         isl_fold.c \
60         isl_gmp.c \
61         isl_hash.c \
62         isl_ilp.c \
63         isl_input.c \
64         isl_list.c \
65         isl_lp.c \
66         isl_lp_piplib.h \
67         isl_map.c \
68         isl_map_simplify.c \
69         isl_map_subtract.c \
70         isl_map_private.h \
71         isl_map_piplib.h \
72         isl_mat.c \
73         isl_mat_private.h \
74         isl_morph.c \
75         isl_morph.h \
76         isl_name.c \
77         isl_name.h \
78         isl_obj.c \
79         isl_options.c \
80         isl_output.c \
81         isl_piplib.h \
82         isl_point_private.h \
83         isl_point.c \
84         isl_polynomial_private.h \
85         isl_polynomial.c \
86         isl_printer_private.h \
87         isl_printer.c \
88         isl_range.c \
89         isl_range.h \
90         isl_reordering.c \
91         isl_reordering.h \
92         isl_sample.h \
93         isl_sample.c \
94         isl_scan.c \
95         isl_scan.h \
96         isl_stream.c \
97         isl_seq.c \
98         isl_tab.c \
99         isl_tab.h \
100         isl_tab_pip.c \
101         isl_transitive_closure.c \
102         isl_union_map.c \
103         isl_union_map_private.h \
104         isl_vec.c \
105         isl_version.c \
106         isl_vertices_private.h \
107         isl_vertices.c
108 EXTRA_libisl_la_SOURCES = \
109         isl_lp_piplib.c \
110         isl_lp_no_piplib.c \
111         isl_map_piplib.c \
112         isl_map_no_piplib.c \
113         isl_sample_no_piplib.c \
114         isl_sample_piplib.c \
115         isl_sample_piplib.h \
116         isl_piplib.c
117 libisl_la_LIBADD = @PIPLIB_LIBS@ -lgmp
118 libisl_la_LDFLAGS = -version-info @versioninfo@ \
119         @PIPLIB_LDFLAGS@ @GMP_LDFLAGS@
120 libisl_la_CPPFLAGS = $(INCLUDES) @PIPLIB_CPPFLAGS@ @GMP_CPPFLAGS@
121
122 isl_test_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
123 isl_test_LDADD = libisl.la
124
125 isl_polyhedron_sample_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
126 isl_polyhedron_sample_LDADD = libisl.la
127 isl_polyhedron_sample_SOURCES = \
128         polyhedron_sample.c
129
130 isl_pip_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
131 isl_pip_LDADD = libisl.la
132 isl_pip_SOURCES = \
133         pip.c
134
135 isl_bound_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
136 isl_bound_LDADD = libisl.la
137 isl_bound_SOURCES = \
138         bound.c
139
140 isl_polyhedron_minimize_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
141 isl_polyhedron_minimize_LDADD = libisl.la
142 isl_polyhedron_minimize_SOURCES = \
143         polyhedron_minimize.c
144
145 isl_polytope_scan_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
146 isl_polytope_scan_LDADD = libisl.la
147 isl_polytope_scan_SOURCES = \
148         polytope_scan.c
149
150 isl_polyhedron_detect_equalities_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
151 isl_polyhedron_detect_equalities_LDADD = libisl.la
152 isl_polyhedron_detect_equalities_SOURCES = \
153         polyhedron_detect_equalities.c
154
155 isl_cat_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
156 isl_cat_LDADD = libisl.la
157 isl_cat_SOURCES = \
158         cat.c
159
160 isl_closure_CPPFLAGS = $(INCLUDES) @GMP_CPPFLAGS@
161 isl_closure_LDADD = libisl.la
162 isl_closure_SOURCES = \
163         closure.c
164
165 nodist_pkginclude_HEADERS = \
166         include/isl/config.h \
167         include/isl/stdint.h
168 pkginclude_HEADERS = \
169         include/isl/arg.h \
170         include/isl/blk.h \
171         include/isl/constraint.h \
172         include/isl/ctx.h \
173         include/isl/dim.h \
174         include/isl/div.h \
175         include/isl/flow.h \
176         include/isl/ilp.h \
177         include/isl/int.h \
178         include/isl/hash.h \
179         include/isl/list.h \
180         include/isl/lp.h \
181         include/isl/mat.h \
182         include/isl/map.h \
183         include/isl/obj.h \
184         include/isl/options.h \
185         include/isl/point.h \
186         include/isl/polynomial.h \
187         include/isl/printer.h \
188         include/isl/seq.h \
189         include/isl/set.h \
190         include/isl/stream.h \
191         include/isl/union_map.h \
192         include/isl/union_set.h \
193         include/isl/vec.h \
194         include/isl/version.h \
195         include/isl/vertices.h
196
197 EXTRA_DIST = \
198         basis_reduction_templ.c \
199         isl_pw_templ.c \
200         isl_union_templ.c \
201         isl.py \
202         doc/chicago.bst \
203         doc/chicago.sty \
204         doc/implementation.tex \
205         doc/isl.bib \
206         doc/mypod2latex \
207         doc/manual.tex \
208         doc/user.pod \
209         bound_test.sh \
210         pip_test.sh \
211         test_inputs
212
213 dist-hook:
214         echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID
215         (cd doc; make manual.pdf)
216         cp doc/manual.pdf $(distdir)/doc/
217
218 pkgconfigdir=$(pkgconfig_libdir)
219 pkgconfig_DATA = $(pkgconfig_libfile)
220
221 gitversion.h: @GIT_HEAD@
222         echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@
223
224 install-data-local: $(srcdir)/isl.py
225         @libisl=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p}" \
226                  $(builddir)/libisl.la`; \
227         case $$libisl in \
228         '') echo Cannot find isl library name. GDB bindings not installed.;; \
229         *) echo $(INSTALL_DATA) $(srcdir)/isl.py \
230                 $(DESTDIR)$(libdir)/$$libisl-gdb.py; \
231         test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"; \
232         $(INSTALL_DATA) $(srcdir)/isl.py $(DESTDIR)$(libdir)/$$libisl-gdb.py; esac