extract out pet_wrap_aff and pet_wrap_pw_aff
[pet.git] / Makefile.am
blob83110f3d4d7642ea7d93ce1976e1d76d76683fb8
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         filter.h \
66         filter.c \
67         id.h \
68         id.cc \
69         inliner.h \
70         inliner.cc \
71         killed_locals.h \
72         killed_locals.cc \
73         loc.h \
74         loc.c \
75         nest.h \
76         nest.c \
77         options.h \
78         options.c \
79         patch.h \
80         patch.c \
81         pet_expr_to_isl_pw_aff.h \
82         pet_expr_to_isl_pw_aff.c \
83         print.c \
84         print.h \
85         tree.h \
86         tree.c \
87         tree2scop.h \
88         tree2scop.c \
89         scan.h \
90         scan.cc \
91         scop.h \
92         scop.c \
93         scop_plus.h \
94         scop_plus.cc \
95         skip.h \
96         skip.c \
97         state.h \
98         substituter.h \
99         substituter.cc \
100         summary.h \
101         summary.c \
102         value_bounds.h \
103         value_bounds.c \
104         version.h \
105         version.cc \
106         pet.cc
107 libpet_la_LDFLAGS = -version-info @versioninfo@ $(AM_LDFLAGS) $(CLANG_RFLAG)
108 libpet_la_LIBADD = -lclangFrontend -lclangParse -lclangSema \
109         $(LIB_CLANG_EDIT) -lclangAnalysis \
110         -lclangAST -lclangLex -lclangBasic -lclangDriver -lclangSerialization \
111         $(CLANG_LIBS) $(CLANG_LDFLAGS) $(LIB_ISL)
113 pet_CFLAGS = $(AM_CFLAGS) @LIBYAML_CPPFLAGS@
114 pet_LDFLAGS = $(AM_LDFLAGS) @LIBYAML_LDFLAGS@
115 pet_SOURCES = \
116         dummy.cc \
117         emit.c \
118         scop_yaml.h \
119         main.c
120 pet_LDADD = libpet.la $(LIB_ISL) -lyaml
122 pet_scop_cmp_CFLAGS = $(AM_CFLAGS) @LIBYAML_CPPFLAGS@
123 pet_scop_cmp_LDFLAGS = @LIBYAML_LDFLAGS@
124 pet_scop_cmp_LDADD = libpet.la $(LIB_ISL) -lyaml
125 pet_scop_cmp_SOURCES = \
126         dummy.cc \
127         scop_yaml.h \
128         parse.c \
129         pet_scop_cmp.c
131 pet_codegen_CFLAGS = $(AM_CFLAGS)
132 pet_codegen_LDFLAGS =
133 pet_codegen_LDADD = libpet.la $(LIB_ISL)
134 pet_codegen_SOURCES = \
135         dummy.cc \
136         pet_codegen.c
138 pet_check_code_CFLAGS = $(AM_CFLAGS)
139 pet_check_code_LDFLAGS =
140 pet_check_code_LDADD = libpet.la $(LIB_ISL)
141 pet_check_code_SOURCES = \
142         dummy.cc \
143         pet_check_code.c
145 isl.py: interface/isl.py.top
146         (cat $(srcdir)/interface/isl.py.top; \
147                 @ISL_BUILDDIR@/interface/extract_interface$(EXEEXT) \
148                         $(DEFAULT_INCLUDES) @ISL_CFLAGS@ \
149                         "@ISL_SRCDIR@/interface/all.h") \
150                         > isl.py
152 dist-hook: isl.py
153         cp $< $(distdir)/
154         echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID
156 gitversion.h: @GIT_HEAD@
157         $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@