PetScan: extract out pet_expr_access_from_index
[pet.git] / Makefile.am
blob0e38c2229c42fa8b2b16f6e54c5c489a4cb8e620
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 EXTRA_PROGRAMS = pet pet_scop_cmp
21 TESTS = @extra_tests@
22 EXTRA_TESTS = pet_test.sh codegen_test.sh
23 TEST_EXTENSIONS = .sh
25 include_HEADERS = include/pet.h
27 BUILT_SOURCES = \
28         gitversion.h
30 CLEANFILES = \
31         gitversion.h \
32         isl.py
34 DISTCLEANFILES = \
35         pet-uninstalled.sh \
36         pet-uninstalled.pc \
37         pet.pc \
38         pet.pc.in
40 EXTRA_DIST = \
41         interface/isl.py.top \
42         interface/pet.py \
43         tests
45 PET_INCLUDES = -I$(srcdir) -I$(srcdir)/include
47 AM_CFLAGS = $(PET_INCLUDES) @ISL_CFLAGS@
48 AM_CXXFLAGS = $(PET_INCLUDES) $(CLANG_CXXFLAGS) @ISL_CFLAGS@
49 AM_LDFLAGS = $(CLANG_LDFLAGS)
51 libpet_la_SOURCES = \
52         aff.h \
53         aff.c \
54         array.h \
55         array.c \
56         clang.h \
57         clang.cc \
58         context.h \
59         context.c \
60         expr.h \
61         expr.c \
62         expr_access_type.h \
63         expr_arg.h \
64         expr_arg.c \
65         expr_plus.h \
66         expr_plus.cc \
67         filter.h \
68         filter.c \
69         id.h \
70         id.cc \
71         inliner.h \
72         inliner.cc \
73         isl_id_to_pet_expr.h \
74         isl_id_to_pet_expr.c \
75         killed_locals.h \
76         killed_locals.cc \
77         loc.h \
78         loc.c \
79         maybe_pet_expr.h \
80         nest.h \
81         nest.c \
82         options.h \
83         options.c \
84         patch.h \
85         patch.c \
86         pet_expr_to_isl_pw_aff.h \
87         pet_expr_to_isl_pw_aff.c \
88         print.c \
89         print.h \
90         tree.h \
91         tree.c \
92         tree2scop.h \
93         tree2scop.c \
94         scan.h \
95         scan.cc \
96         scop.h \
97         scop.c \
98         scop_plus.h \
99         scop_plus.cc \
100         skip.h \
101         skip.c \
102         state.h \
103         substituter.h \
104         substituter.cc \
105         summary.h \
106         summary.c \
107         value_bounds.h \
108         value_bounds.c \
109         version.h \
110         version.cc \
111         pet.cc
112 libpet_la_LDFLAGS = -version-info @versioninfo@ $(AM_LDFLAGS) $(CLANG_RFLAG)
113 libpet_la_LIBADD = -lclangFrontend -lclangParse -lclangSema \
114         $(LIB_CLANG_EDIT) -lclangAnalysis \
115         -lclangAST -lclangLex -lclangBasic -lclangDriver -lclangSerialization \
116         $(CLANG_LIBS) $(CLANG_LDFLAGS) $(LIB_ISL)
118 pet_CFLAGS = $(AM_CFLAGS) @LIBYAML_CPPFLAGS@
119 pet_LDFLAGS = $(AM_LDFLAGS) @LIBYAML_LDFLAGS@
120 pet_SOURCES = \
121         dummy.cc \
122         emit.c \
123         scop_yaml.h \
124         main.c
125 pet_LDADD = libpet.la $(LIB_ISL) -lyaml
127 pet_scop_cmp_CFLAGS = $(AM_CFLAGS) @LIBYAML_CPPFLAGS@
128 pet_scop_cmp_LDFLAGS = @LIBYAML_LDFLAGS@
129 pet_scop_cmp_LDADD = libpet.la $(LIB_ISL) -lyaml
130 pet_scop_cmp_SOURCES = \
131         dummy.cc \
132         scop_yaml.h \
133         parse.c \
134         pet_scop_cmp.c
136 pet_codegen_CFLAGS = $(AM_CFLAGS)
137 pet_codegen_LDFLAGS =
138 pet_codegen_LDADD = libpet.la $(LIB_ISL)
139 pet_codegen_SOURCES = \
140         dummy.cc \
141         pet_codegen.c
143 pet_check_code_CFLAGS = $(AM_CFLAGS)
144 pet_check_code_LDFLAGS =
145 pet_check_code_LDADD = libpet.la $(LIB_ISL)
146 pet_check_code_SOURCES = \
147         dummy.cc \
148         pet_check_code.c
150 isl.py: interface/isl.py.top
151         (cat $(srcdir)/interface/isl.py.top; \
152                 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT) \
153                         $(DEFAULT_INCLUDES) @ISL_CFLAGS@ \
154                         "@ISL_SRCDIR@/interface/all.h") \
155                         > isl.py
157 dist-hook: isl.py
158         cp $< $(distdir)/
159         echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID
161 gitversion.h: @GIT_HEAD@
162         $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@