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