2 # /**-------------------------------------------------------------------**
4 # **-------------------------------------------------------------------**
6 # **-------------------------------------------------------------------**
7 # ** First version: march 6th 2003 **
8 # **-------------------------------------------------------------------**/
10 # makefile for checking.
12 #/*****************************************************************************
13 # * CLooG : the Chunky Loop Generator (experimental) *
14 # *****************************************************************************
16 # * Copyright (C) 2003 Cedric Bastoul *
18 # * This library is free software; you can redistribute it and/or *
19 # * modify it under the terms of the GNU Lesser General Public *
20 # * License as published by the Free Software Foundation; either *
21 # * version 2.1 of the License, or (at your option) any later version. *
23 # * This library is distributed in the hope that it will be useful, *
24 # * but WITHOUT ANY WARRANTY; without even the implied warranty of *
25 # * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
26 # * Lesser General Public License for more details. *
28 # * You should have received a copy of the GNU Lesser General Public *
29 # * License along with this library; if not, write to the Free Software *
30 # * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
31 # * Boston, MA 02110-1301 USA *
33 # * CLooG, the Chunky Loop Generator *
34 # * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
35 # * This file has been written with the help of the Bart Kienhuis's checking *
36 # * makefile for PipLib. *
38 # *****************************************************************************/
43 GENERATE_TEST = generate_test
45 noinst_PROGRAMS = $(GENERATE_TEST)
46 AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include
47 LDADD = ../libcloog-isl.la
48 generate_test_SOURCES = generate_test.c
51 ../libcloog-isl.la: FORCE
52 cd ..; $(MAKE) $(AM_MAKEFLAGS) libcloog-isl.la
56 FINITE_CLOOGTEST_C = \
121 square+triangle-1-1-2-3 \
136 non_optimal/nul_complex1 \
137 non_optimal/usvd_e_t \
139 reservoir/cholesky2 \
150 reservoir/liu-zhuge1 \
151 reservoir/loechner3 \
152 reservoir/loechner4 \
153 reservoir/loechner5 \
154 reservoir/mg-interp2 \
155 reservoir/mg-interp \
166 reservoir/tang-xue1 \
180 $(FINITE_CLOOGTEST_C) \
183 CLOOGTEST_FORTRAN = \
189 CLOOG_ISL_TEST_STRIDED = \
192 CLOOGTEST_STRIDED = \
205 $(CLOOG_ISL_TEST_STRIDED)
210 CLOOGTEST_OPENSCOP = \
233 'isl/unroll -first-unroll 1' \
234 'isl/jacobi-shared -f 4 -l -1 -override -strides 1 -sh 1' \
235 'isl/unroll2 -first-unroll 1' \
236 'backtrack -f 1 -backtrack' \
237 'vasilache -f 8 -l 9' \
239 'equality -f -1 -l 2 -override' \
240 'equality2 -f -1 -l 4 -esp 1 -override' \
241 'otl -block 1 -esp 0 -otl 0' \
242 'param-split -f -1' \
243 'pouchet -f 3 -l 7' \
244 'stride -f -1 -strides 1' \
245 'stride2 -f -1 -strides 1' \
249 @echo " /*-----------------------------------------------*"
250 @echo " * Generate files *"
251 @echo " *-----------------------------------------------*/"
252 @for x in $(CLOOGTEST_C) ; do \
253 echo "Generate $$x.c" ; \
254 $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.c ; \
256 for x in $(CLOOGTEST_FORTRAN) ; do \
257 echo "Generate $$x.f" ; \
258 $(top_builddir)/cloog $(srcdir)/$$x.cloog -o $(srcdir)/$$x.f ; \
260 for x in $(CLOOGTEST_STRIDED) ; do \
261 echo "Generate $$x.c" ; \
262 $(top_builddir)/cloog $(srcdir)/$$x.cloog \
263 -strides 1 -o $(srcdir)/$$x.c ; \
265 for x in $(CLOOGTEST_OPENSCOP) ; do \
266 echo "Generate $$x.c" ; \
267 $(top_builddir)/cloog $(srcdir)/$$x.scop \
268 -openscop -o $(srcdir)/$$x.c ; \
270 for line in $(SPECIAL_OPTIONS); do \
271 options=`echo $$line | sed -e 's/^[^ ]* //'`; \
272 x=`echo $$line | sed -e 's/ .*//'`; \
273 echo "Generate file $$x ($$options)" ; \
274 $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog \
275 $$options > $(srcdir)/$$x.c ; \
279 @for x in $(FINITE_CLOOGTEST_C) ; do \
280 echo "Generate $$x.good.c" ; \
281 $(top_builddir)/cloog$(EXEEXT) -callable 1 $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \
283 for line in $(SPECIAL_OPTIONS); do echo $$line | while read x options; do \
284 echo "Generate $$x.good.c ($$options)" ; \
285 $(top_builddir)/cloog$(EXEEXT) -callable 1 $$options $(srcdir)/$$x.cloog -o $(srcdir)/$$x.good.c ; \
289 @echo " /*-----------------------------------------------*"
290 @echo " * Checking files by Valgrind *"
291 @echo " *-----------------------------------------------*/"
292 for x in $(CLOOGTEST_C) ; do \
293 echo "Valgrinding $$x.c" ; \
294 valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \
296 for x in $(CLOOGTEST_FORTRAN) ; do \
297 echo "Valgrinding $$x.f" ; \
298 valgrind $(top_builddir)/cloog$(EXEEXT) $(srcdir)/$$x.cloog ; \
301 CHECKER := "$(srcdir)/checker.sh"
303 TESTS_ENVIRONMENT = \
304 top_builddir=$(top_builddir) \
308 COMPILE="$(COMPILE)" \
310 FINITE_CLOOGTEST_C="$(FINITE_CLOOGTEST_C)" \
311 CLOOGTEST_C="$(CLOOGTEST_C)" \
312 CLOOGTEST_FORTRAN="$(CLOOGTEST_FORTRAN)" \
313 CLOOGTEST_STRIDED="$(CLOOGTEST_STRIDED)" \
314 CLOOGTEST_OPENSCOP="$(CLOOGTEST_OPENSCOP)" \
315 SPECIAL_OPTIONS="$(SPECIAL_OPTIONS)"
317 test_run: generate_test$(EXEEXT)
318 $(TESTS_ENVIRONMENT) \
319 $(srcdir)/check_run.sh
328 TESTS = $(check_SCRIPTS)
332 $(srcdir)/checker.sh \
333 $(srcdir)/check_run.sh \
334 $(CLOOGTEST_C:%=%.cloog) \
335 $(CLOOGTEST_C:%=%.c) \
336 $(FINITE_CLOOGTEST_C:%=%.good.c) \
337 $(CLOOGTEST_FORTRAN:%=%.cloog) \
338 $(CLOOGTEST_FORTRAN:%=%.f) \
339 $(CLOOGTEST_STRIDED:%=%.cloog) \
340 $(CLOOGTEST_STRIDED:%=%.c) \
341 $(CLOOGTEST_OPENSCOP:%=%.scop) \
342 $(CLOOGTEST_OPENSCOP:%=%.c) \
343 $(SPECIAL_TESTS:%=%.cloog) \
344 $(SPECIAL_TESTS:%=%.c) \
345 $(SPECIAL_TESTS:%=%.good.c)