add pet_inliner
[pet.git] / Makefile.am
blob64aa0f21c3baad085177db78c1cc08dbe9000991
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 EXTRA_DIST = \
28         tests
30 PET_INCLUDES = -I$(srcdir) -I$(srcdir)/include
32 AM_CFLAGS = $(PET_INCLUDES) @ISL_CFLAGS@
33 AM_CXXFLAGS = $(PET_INCLUDES) $(CLANG_CXXFLAGS) @ISL_CFLAGS@
34 AM_LDFLAGS = $(CLANG_LDFLAGS)
36 libpet_la_SOURCES = \
37         aff.h \
38         aff.c \
39         array.h \
40         array.c \
41         clang.h \
42         clang.cc \
43         context.h \
44         context.c \
45         expr.h \
46         expr.c \
47         expr_access_type.h \
48         expr_arg.h \
49         expr_arg.c \
50         filter.h \
51         filter.c \
52         id.h \
53         id.cc \
54         inliner.h \
55         inliner.cc \
56         loc.h \
57         loc.c \
58         nest.h \
59         nest.c \
60         options.h \
61         options.c \
62         patch.h \
63         patch.c \
64         print.c \
65         print.h \
66         tree.h \
67         tree.c \
68         tree2scop.h \
69         tree2scop.c \
70         scan.h \
71         scan.cc \
72         scop.h \
73         scop.c \
74         scop_plus.h \
75         scop_plus.cc \
76         skip.h \
77         skip.c \
78         state.h \
79         substituter.h \
80         substituter.cc \
81         summary.h \
82         summary.c \
83         value_bounds.h \
84         value_bounds.c \
85         version.h \
86         version.cc \
87         pet.cc
88 libpet_la_LDFLAGS = -version-info @versioninfo@ $(AM_LDFLAGS)
89 libpet_la_LIBADD = -lclangFrontend -lclangParse -lclangSema \
90         $(LIB_CLANG_EDIT) -lclangAnalysis \
91         -lclangAST -lclangLex -lclangBasic -lclangDriver -lclangSerialization \
92         $(CLANG_LIBS) $(CLANG_LDFLAGS) $(LIB_ISL)
94 pet_CFLAGS = $(AM_CFLAGS) @LIBYAML_CPPFLAGS@
95 pet_LDFLAGS = $(AM_LDFLAGS) @LIBYAML_LDFLAGS@
96 pet_SOURCES = \
97         dummy.cc \
98         emit.c \
99         scop_yaml.h \
100         main.c
101 pet_LDADD = libpet.la $(LIB_ISL) -lyaml
103 pet_scop_cmp_CFLAGS = $(AM_CFLAGS) @LIBYAML_CPPFLAGS@
104 pet_scop_cmp_LDFLAGS = @LIBYAML_LDFLAGS@
105 pet_scop_cmp_LDADD = libpet.la $(LIB_ISL) -lyaml
106 pet_scop_cmp_SOURCES = \
107         dummy.cc \
108         scop_yaml.h \
109         parse.c \
110         pet_scop_cmp.c
112 pet_codegen_CFLAGS = $(AM_CFLAGS)
113 pet_codegen_LDFLAGS =
114 pet_codegen_LDADD = libpet.la $(LIB_ISL)
115 pet_codegen_SOURCES = \
116         dummy.cc \
117         pet_codegen.c
119 pet_check_code_CFLAGS = $(AM_CFLAGS)
120 pet_check_code_LDFLAGS =
121 pet_check_code_LDADD = libpet.la $(LIB_ISL)
122 pet_check_code_SOURCES = \
123         dummy.cc \
124         pet_check_code.c
126 dist-hook:
127         echo @GIT_HEAD_VERSION@ > $(distdir)/GIT_HEAD_ID
129 gitversion.h: @GIT_HEAD@
130         $(AM_V_GEN)echo '#define GIT_HEAD_ID "'@GIT_HEAD_VERSION@'"' > $@