support inlining of non-outermost call expressions
[pet.git] / Makefile.am
blob3b72335e5d270365a47988f57da5fa3474d1f666
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         inlined_calls.h \
72         inlined_calls.cc \
73         inliner.h \
74         inliner.cc \
75         isl_id_to_pet_expr.h \
76         isl_id_to_pet_expr.c \
77         killed_locals.h \
78         killed_locals.cc \
79         loc.h \
80         loc.c \
81         maybe_pet_expr.h \
82         nest.h \
83         nest.c \
84         options.h \
85         options.c \
86         patch.h \
87         patch.c \
88         pet_expr_to_isl_pw_aff.h \
89         pet_expr_to_isl_pw_aff.c \
90         print.c \
91         print.h \
92         tree.h \
93         tree.c \
94         tree2scop.h \
95         tree2scop.c \
96         scan.h \
97         scan.cc \
98         scop.h \
99         scop.c \
100         scop_plus.h \
101         scop_plus.cc \
102         skip.h \
103         skip.c \
104         state.h \
105         substituter.h \
106         substituter.cc \
107         summary.h \
108         summary.c \
109         value_bounds.h \
110         value_bounds.c \
111         version.h \
112         version.cc \
113         pet.cc
114 libpet_la_LDFLAGS = -version-info @versioninfo@ $(AM_LDFLAGS) $(CLANG_RFLAG)
115 libpet_la_LIBADD = -lclangFrontend -lclangParse -lclangSema \
116         $(LIB_CLANG_EDIT) -lclangAnalysis \
117         -lclangAST -lclangLex -lclangBasic -lclangDriver -lclangSerialization \
118         $(CLANG_LIBS) $(CLANG_LDFLAGS) $(LIB_ISL)
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 isl.py: interface/isl.py.top
153         (cat $(srcdir)/interface/isl.py.top; \
154                 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT) \
155                         $(DEFAULT_INCLUDES) @ISL_CFLAGS@ \
156                         "@ISL_SRCDIR@/interface/all.h") \
157                         > isl.py
159 dist-hook: isl.py
160         cp $< $(distdir)/
161         echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID
163 gitversion.h: @GIT_HEAD@
164         $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@