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
|
---|
12 | ## Last Modified By :
|
---|
13 | ## Last Modified On :
|
---|
14 | ## Update Count : 0
|
---|
15 | ###############################################################################
|
---|
16 |
|
---|
17 | AUTOMAKE_OPTIONS = foreign # do not require all the GNU file names
|
---|
18 |
|
---|
19 | repeats=10
|
---|
20 | max_time=600
|
---|
21 | preempt=10ul\`ms
|
---|
22 | debug=-debug
|
---|
23 | type=LONG
|
---|
24 |
|
---|
25 | REPEAT = ${abs_top_srcdir}/tools/repeat
|
---|
26 | WATCHDOG = ${abs_top_srcdir}/tools/watchdog
|
---|
27 | TIME = /usr/bin/time -f "%E"
|
---|
28 |
|
---|
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)
|
---|
35 | CFLAGS = ${BUILD_FLAGS}
|
---|
36 | CC = @CFACC@
|
---|
37 |
|
---|
38 | TESTS = block coroutine create disjoint enter enter3 processor stack wait yield
|
---|
39 |
|
---|
40 | # .INTERMEDIATE: ${TESTS}
|
---|
41 |
|
---|
42 | all-local: ${TESTS:=.run}
|
---|
43 |
|
---|
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 |
|
---|
53 | clean-local:
|
---|
54 | rm -f ${TESTS} core* out.log .type
|
---|
55 |
|
---|
56 | % : %.c ${CC} ${UPDATED_TYPE}
|
---|
57 | ${AM_V_GEN}${CC} ${CFLAGS} ${<} $(debug) -o ${@}
|
---|
58 |
|
---|
59 | %.run : % ${REPEAT}
|
---|
60 | @ time ${REPEAT} -r out.log -i -s $(repeats) timeout ${max_time} ./${<}
|
---|
61 | @ rm ${<}
|
---|
62 | @ echo -e "${<}: SUCCESS\n"
|
---|
63 |
|
---|
64 | %.watch : % ${WATCHDOG}
|
---|
65 | @ time ${WATCHDOG} ./${<}
|
---|
66 | @ rm ${<}
|
---|
67 | @ echo -e "${<}: SUCCESS\n"
|
---|
68 |
|
---|
69 | %.time : % ${REPEAT}
|
---|
70 | @ ${REPEAT} -i -s -- $(repeats) $(TIME) -a -o times.log ./${<}
|
---|
71 | @ rm ${<}
|
---|
72 | @ echo -e "${<}: SUCCESS\n"
|
---|
73 |
|
---|
74 | ${REPEAT}: ${abs_top_srcdir}/tools/Makefile
|
---|
75 | @+make -C ${abs_top_srcdir}/tools/
|
---|
76 |
|
---|
77 | ${WATCHDOG}: ${abs_top_srcdir}/tools/Makefile
|
---|
78 | @+make -C ${abs_top_srcdir}/tools/
|
---|