[cc3e4d0] | 1 | ######################## -*- Mode: Makefile-Automake -*- ######################
|
---|
| 2 | ##
|
---|
| 3 | ## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
|
---|
| 4 | ##
|
---|
| 5 | ## The contents of this file are covered under the licence agreement in the
|
---|
| 6 | ## file "LICENCE" distributed with Cforall.
|
---|
| 7 | ##
|
---|
| 8 | ## Makefile.am --
|
---|
| 9 | ##
|
---|
| 10 | ## Author : Thierry Delisle
|
---|
| 11 | ## Created On : Fri Jun 16 10:57:34 2017
|
---|
[f3c1737] | 12 | ## Last Modified By :
|
---|
| 13 | ## Last Modified On :
|
---|
[cc3e4d0] | 14 | ## Update Count : 0
|
---|
| 15 | ###############################################################################
|
---|
| 16 |
|
---|
| 17 | repeats=10
|
---|
[d6ff3ff] | 18 | max_time=600
|
---|
[b9da9585] | 19 | preempt=10ul\`ms
|
---|
[827a190] | 20 | debug=-debug
|
---|
[7bdcac1] | 21 | type=LONG
|
---|
[cc3e4d0] | 22 |
|
---|
[1449d83] | 23 | REPEAT = ${abs_top_srcdir}/tools/repeat
|
---|
[7bdcac1] | 24 | WATCHDOG = ${abs_top_srcdir}/tools/watchdog
|
---|
[0394c31] | 25 | TIME = /usr/bin/time -f "%E"
|
---|
[cc3e4d0] | 26 |
|
---|
[d35e796] | 27 | # $(shell ./update-type $(type))
|
---|
| 28 | # ./update-type $(type)
|
---|
| 29 |
|
---|
| 30 | UPDATED_TYPE = $(shell ./update-type $(type))
|
---|
| 31 |
|
---|
| 32 | 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)
|
---|
[cc3e4d0] | 33 | CFLAGS = ${BUILD_FLAGS}
|
---|
[bf5a6477] | 34 | CC = @CFACC@
|
---|
[cc3e4d0] | 35 |
|
---|
[827a190] | 36 | TESTS = block coroutine create disjoint enter enter3 processor stack wait yield
|
---|
[cc3e4d0] | 37 |
|
---|
[7bdcac1] | 38 | # .INTERMEDIATE: ${TESTS}
|
---|
[cc3e4d0] | 39 |
|
---|
| 40 | all-local: ${TESTS:=.run}
|
---|
| 41 |
|
---|
[7bdcac1] | 42 | runall : ${TESTS:=.run}
|
---|
| 43 | @ echo "All programs terminated normally"
|
---|
| 44 |
|
---|
| 45 | watchall : ${TESTS:=.watch}
|
---|
| 46 | @ echo "All programs terminated normally"
|
---|
| 47 |
|
---|
| 48 | compileall : ${TESTS}
|
---|
| 49 | @ echo "Compiled"
|
---|
| 50 |
|
---|
[0764cfb] | 51 | clean-local:
|
---|
[d35e796] | 52 | rm -f ${TESTS} core* out.log .type
|
---|
[0764cfb] | 53 |
|
---|
[d35e796] | 54 | % : %.c ${CC} ${UPDATED_TYPE}
|
---|
[827a190] | 55 | ${AM_V_GEN}${CC} ${CFLAGS} ${<} $(debug) -o ${@}
|
---|
[cc3e4d0] | 56 |
|
---|
[1449d83] | 57 | %.run : % ${REPEAT}
|
---|
| 58 | @ time ${REPEAT} -r out.log -i -s $(repeats) timeout ${max_time} ./${<}
|
---|
[cc3e4d0] | 59 | @ rm ${<}
|
---|
[1449d83] | 60 | @ echo -e "${<}: SUCCESS\n"
|
---|
| 61 |
|
---|
[7bdcac1] | 62 | %.watch : % ${WATCHDOG}
|
---|
| 63 | @ time ${WATCHDOG} ./${<}
|
---|
| 64 | @ rm ${<}
|
---|
| 65 | @ echo -e "${<}: SUCCESS\n"
|
---|
| 66 |
|
---|
[0394c31] | 67 | %.time : % ${REPEAT}
|
---|
| 68 | @ ${REPEAT} -i -s -- $(repeats) $(TIME) -a -o times.log ./${<}
|
---|
| 69 | @ rm ${<}
|
---|
| 70 | @ echo -e "${<}: SUCCESS\n"
|
---|
| 71 |
|
---|
[7bdcac1] | 72 | ${REPEAT}: ${abs_top_srcdir}/tools/Makefile
|
---|
[1449d83] | 73 | @+make -C ${abs_top_srcdir}/tools/
|
---|
[7bdcac1] | 74 |
|
---|
| 75 | ${WATCHDOG}: ${abs_top_srcdir}/tools/Makefile
|
---|
| 76 | @+make -C ${abs_top_srcdir}/tools/
|
---|