[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 | |
---|
[0c1b566] | 17 | AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names |
---|
| 18 | |
---|
[cc3e4d0] | 19 | repeats=10 |
---|
[d6ff3ff] | 20 | max_time=600 |
---|
[b9da9585] | 21 | preempt=10ul\`ms |
---|
[827a190] | 22 | debug=-debug |
---|
[7bdcac1] | 23 | type=LONG |
---|
[cc3e4d0] | 24 | |
---|
[1449d83] | 25 | REPEAT = ${abs_top_srcdir}/tools/repeat |
---|
[7bdcac1] | 26 | WATCHDOG = ${abs_top_srcdir}/tools/watchdog |
---|
[0394c31] | 27 | TIME = /usr/bin/time -f "%E" |
---|
[cc3e4d0] | 28 | |
---|
[d35e796] | 29 | # $(shell ./update-type $(type)) |
---|
| 30 | # ./update-type $(type) |
---|
| 31 | |
---|
| 32 | UPDATED_TYPE = $(shell ./update-type $(type)) |
---|
| 33 | |
---|
| 34 | 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] | 35 | CFLAGS = ${BUILD_FLAGS} |
---|
[bf5a6477] | 36 | CC = @CFACC@ |
---|
[cc3e4d0] | 37 | |
---|
[827a190] | 38 | TESTS = block coroutine create disjoint enter enter3 processor stack wait yield |
---|
[cc3e4d0] | 39 | |
---|
[7bdcac1] | 40 | # .INTERMEDIATE: ${TESTS} |
---|
[cc3e4d0] | 41 | |
---|
| 42 | all-local: ${TESTS:=.run} |
---|
| 43 | |
---|
[7bdcac1] | 44 | runall : ${TESTS:=.run} |
---|
| 45 | @ echo "All programs terminated normally" |
---|
| 46 | |
---|
| 47 | watchall : ${TESTS:=.watch} |
---|
| 48 | @ echo "All programs terminated normally" |
---|
| 49 | |
---|
| 50 | compileall : ${TESTS} |
---|
| 51 | @ echo "Compiled" |
---|
| 52 | |
---|
[0764cfb] | 53 | clean-local: |
---|
[d35e796] | 54 | rm -f ${TESTS} core* out.log .type |
---|
[0764cfb] | 55 | |
---|
[d35e796] | 56 | % : %.c ${CC} ${UPDATED_TYPE} |
---|
[827a190] | 57 | ${AM_V_GEN}${CC} ${CFLAGS} ${<} $(debug) -o ${@} |
---|
[cc3e4d0] | 58 | |
---|
[1449d83] | 59 | %.run : % ${REPEAT} |
---|
| 60 | @ time ${REPEAT} -r out.log -i -s $(repeats) timeout ${max_time} ./${<} |
---|
[cc3e4d0] | 61 | @ rm ${<} |
---|
[1449d83] | 62 | @ echo -e "${<}: SUCCESS\n" |
---|
| 63 | |
---|
[7bdcac1] | 64 | %.watch : % ${WATCHDOG} |
---|
| 65 | @ time ${WATCHDOG} ./${<} |
---|
| 66 | @ rm ${<} |
---|
| 67 | @ echo -e "${<}: SUCCESS\n" |
---|
| 68 | |
---|
[0394c31] | 69 | %.time : % ${REPEAT} |
---|
| 70 | @ ${REPEAT} -i -s -- $(repeats) $(TIME) -a -o times.log ./${<} |
---|
| 71 | @ rm ${<} |
---|
| 72 | @ echo -e "${<}: SUCCESS\n" |
---|
| 73 | |
---|
[7bdcac1] | 74 | ${REPEAT}: ${abs_top_srcdir}/tools/Makefile |
---|
[1449d83] | 75 | @+make -C ${abs_top_srcdir}/tools/ |
---|
[7bdcac1] | 76 | |
---|
| 77 | ${WATCHDOG}: ${abs_top_srcdir}/tools/Makefile |
---|
| 78 | @+make -C ${abs_top_srcdir}/tools/ |
---|