pet 0.11.8
[pet.git] / Makefile.am
blob56cb1faa01135d1ba1eaa5c73f6a080d3c689664
1 if BUNDLED_ISL
2     MAYBE_ISL = isl
3     ISL_LA = $(top_builddir)/isl/libisl.la
4 endif
6 SUBDIRS = $(MAYBE_ISL) .
7 DIST_SUBDIRS = $(MAYBE_ISL)
9 FORCE:
10 isl/libisl.la: FORCE
11         cd isl; $(MAKE) $(AM_MAKEFLAGS) libisl.la
13 ACLOCAL_AMFLAGS = -I m4
15 LIB_ISL = $(ISL_LA) @ISL_LIBS@
17 lib_LTLIBRARIES = libpet.la
18 bin_PROGRAMS = @extra_bin_programs@
19 noinst_PROGRAMS = @extra_noinst_programs@ pet_codegen pet_check_code \
20         pet_loopback
21 EXTRA_PROGRAMS = pet pet_scop_cmp
22 TESTS = @extra_tests@
23 EXTRA_TESTS = pet_test.sh codegen_test.sh
24 TEST_EXTENSIONS = .sh
26 include_HEADERS = include/pet.h
28 BUILT_SOURCES = \
29         gitversion.h
31 CLEANFILES = \
32         gitversion.h \
33         isl.py
35 DISTCLEANFILES = \
36         pet-uninstalled.sh \
37         pet-uninstalled.pc \
38         pet.pc \
39         pet.pc.in
41 EXTRA_DIST = \
42         interface/isl.py.top \
43         interface/pet.py \
44         tests
46 PET_INCLUDES = -I$(srcdir) -I$(srcdir)/include
48 AM_CFLAGS = $(PET_INCLUDES) @ISL_CFLAGS@
49 AM_CXXFLAGS = $(PET_INCLUDES) $(CLANG_CXXFLAGS) @ISL_CFLAGS@
50 AM_LDFLAGS = $(CLANG_LDFLAGS)
52 libpet_la_SOURCES = \
53         aff.h \
54         aff.c \
55         array.h \
56         array.c \
57         clang_compatibility.h \
58         clang.h \
59         clang.cc \
60         context.h \
61         context.c \
62         expr.h \
63         expr.c \
64         expr_access_type.h \
65         expr_arg.h \
66         expr_arg.c \
67         expr_plus.h \
68         expr_plus.cc \
69         filter.h \
70         filter.c \
71         id.h \
72         id.cc \
73         inlined_calls.h \
74         inlined_calls.cc \
75         inliner.h \
76         inliner.cc \
77         isl_id_to_pet_expr.h \
78         isl_id_to_pet_expr.c \
79         killed_locals.h \
80         killed_locals.cc \
81         loc.h \
82         loc.c \
83         maybe_pet_expr.h \
84         nest.h \
85         nest.c \
86         options.h \
87         options.c \
88         patch.h \
89         patch.c \
90         pet_expr_to_isl_pw_aff.h \
91         pet_expr_to_isl_pw_aff.c \
92         print.c \
93         print.h \
94         tree.h \
95         tree.c \
96         tree2scop.h \
97         tree2scop.c \
98         scan.h \
99         scan.cc \
100         scop.h \
101         scop.c \
102         scop_plus.h \
103         scop_plus.cc \
104         skip.h \
105         skip.c \
106         set_lang_defaults_arg4.h \
107         state.h \
108         substituter.h \
109         substituter.cc \
110         summary.h \
111         summary.c \
112         value_bounds.h \
113         value_bounds.c \
114         version.h \
115         version.cc \
116         pet.cc
117 libpet_la_LDFLAGS = -version-info @versioninfo@ $(AM_LDFLAGS) $(CLANG_RFLAG)
118 libpet_la_LIBADD = $(LIB_ISL) $(CLANG_LIBS) $(CLANG_LDFLAGS)
120 pet_CFLAGS = $(AM_CFLAGS) @LIBYAML_CPPFLAGS@
121 pet_LDFLAGS = $(AM_LDFLAGS) @LIBYAML_LDFLAGS@
122 pet_SOURCES = \
123         dummy.cc \
124         emit.c \
125         scop_yaml.h \
126         main.c
127 pet_LDADD = libpet.la $(LIB_ISL) -lyaml
129 pet_scop_cmp_CFLAGS = $(AM_CFLAGS) @LIBYAML_CPPFLAGS@
130 pet_scop_cmp_LDFLAGS = @LIBYAML_LDFLAGS@
131 pet_scop_cmp_LDADD = libpet.la $(LIB_ISL) -lyaml
132 pet_scop_cmp_SOURCES = \
133         dummy.cc \
134         scop_yaml.h \
135         parse.c \
136         pet_scop_cmp.c
138 pet_codegen_CFLAGS = $(AM_CFLAGS)
139 pet_codegen_LDFLAGS =
140 pet_codegen_LDADD = libpet.la $(LIB_ISL)
141 pet_codegen_SOURCES = \
142         dummy.cc \
143         pet_codegen.c
145 pet_check_code_CFLAGS = $(AM_CFLAGS)
146 pet_check_code_LDFLAGS =
147 pet_check_code_LDADD = libpet.la $(LIB_ISL)
148 pet_check_code_SOURCES = \
149         dummy.cc \
150         pet_check_code.c
152 pet_loopback_CFLAGS = $(AM_CFLAGS)
153 pet_loopback_LDFLAGS =
154 pet_loopback_LDADD = libpet.la $(LIB_ISL)
155 pet_loopback_SOURCES = \
156         dummy.cc \
157         pet_loopback.c
159 if HAVE_ISL_BUILDDIR
160 # dummy library that captures the dependencies on all headers
161 # that are relevant for the bindings
162 noinst_LIBRARIES = libdep.a
163 libdep_a_CPPFLAGS = $(DEFAULT_INCLUDES) @ISL_CFLAGS@
164 libdep_a_SOURCES = all.c
166 isl.py: libdep.a interface/isl.py.top
167         (cat $(srcdir)/interface/isl.py.top && \
168                 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT) \
169                         --language=python \
170                         $(DEFAULT_INCLUDES) @ISL_CFLAGS@ \
171                         "@ISL_SRCDIR@/all.h") \
172                         > $@ || (rm $@ && false)
173 endif
175 dist-hook: isl.py
176         cp $< $(distdir)/
177         echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID
179 gitversion.h: @GIT_HEAD@
180         $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@