######################## -*- Mode: Makefile-Automake -*- ###################### ## ## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo ## ## The contents of this file are covered under the licence agreement in the ## file "LICENCE" distributed with Cforall. ## ## Makefile.am -- ## ## Author : Thierry Delisle ## Created On : Fri Jun 16 10:57:34 2017 ## Last Modified By : ## Last Modified On : ## Update Count : 0 ############################################################################### repeats=10 max_time=600 preempt=10ul\`ms debug=-debug type=LONG REPEAT = ${abs_top_srcdir}/tools/repeat WATCHDOG = ${abs_top_srcdir}/tools/watchdog TIME = /usr/bin/time -f "%E" # $(shell ./update-type $(type)) # ./update-type $(type) UPDATED_TYPE = $(shell ./update-type $(type)) BUILD_FLAGS = -g -Wall -Wno-unused-function -quiet @CFA_FLAGS@ -O2 -DPREEMPTION_RATE=${preempt} -I.. -I. -DTEST_$(shell cat .type | tr a-z A-Z) CFLAGS = ${BUILD_FLAGS} CC = @CFA_BINDIR@/@CFA_NAME@ TESTS = block coroutine create disjoint enter enter3 processor stack wait yield # .INTERMEDIATE: ${TESTS} all-local: ${TESTS:=.run} runall : ${TESTS:=.run} @ echo "All programs terminated normally" watchall : ${TESTS:=.watch} @ echo "All programs terminated normally" compileall : ${TESTS} @ echo "Compiled" clean-local: rm -f ${TESTS} core* out.log .type % : %.c ${CC} ${UPDATED_TYPE} ${AM_V_GEN}${CC} ${CFLAGS} ${<} $(debug) -o ${@} %.run : % ${REPEAT} @ time ${REPEAT} -r out.log -i -s $(repeats) timeout ${max_time} ./${<} @ rm ${<} @ echo -e "${<}: SUCCESS\n" %.watch : % ${WATCHDOG} @ time ${WATCHDOG} ./${<} @ rm ${<} @ echo -e "${<}: SUCCESS\n" %.time : % ${REPEAT} @ ${REPEAT} -i -s -- $(repeats) $(TIME) -a -o times.log ./${<} @ rm ${<} @ echo -e "${<}: SUCCESS\n" ${REPEAT}: ${abs_top_srcdir}/tools/Makefile @+make -C ${abs_top_srcdir}/tools/ ${WATCHDOG}: ${abs_top_srcdir}/tools/Makefile @+make -C ${abs_top_srcdir}/tools/