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 | ACLOCAL_AMFLAGS = -I automake
|
---|
19 |
|
---|
20 | include $(top_srcdir)/src/cfa.make
|
---|
21 |
|
---|
22 | repeats=10
|
---|
23 | max_time=600
|
---|
24 | preempt=10ul\`ms
|
---|
25 | debug=-debug
|
---|
26 | type=LONG
|
---|
27 |
|
---|
28 | REPEAT = $(abs_top_builddir)/tools/repeat
|
---|
29 | WATCHDOG = $(abs_top_builddir)/tools/watchdog
|
---|
30 | TIME = /usr/bin/time -f "%E"
|
---|
31 |
|
---|
32 | UPDATED_TYPE = $(shell $(srcdir)/update-type $(type))
|
---|
33 |
|
---|
34 | BUILD_FLAGS =
|
---|
35 | AM_CFAFLAGS = \
|
---|
36 | -g \
|
---|
37 | -Wall \
|
---|
38 | -Wno-unused-function \
|
---|
39 | -quiet \
|
---|
40 | -O2 \
|
---|
41 | -DPREEMPTION_RATE=$(preempt) \
|
---|
42 | -I$(abs_top_srcdir)/tests \
|
---|
43 | -I$(srcdir) \
|
---|
44 | -DTEST_$(shell cat .type | tr a-z A-Z) \
|
---|
45 | -in-tree
|
---|
46 |
|
---|
47 | TESTS = block coroutine create disjoint enter enter3 processor stack wait yield
|
---|
48 |
|
---|
49 | # .INTERMEDIATE: $(TESTS)
|
---|
50 |
|
---|
51 | all-local: $(TESTS:=.run)
|
---|
52 |
|
---|
53 | runall : $(TESTS:=.run)
|
---|
54 | @ echo "All programs terminated normally"
|
---|
55 |
|
---|
56 | watchall : $(TESTS:=.watch)
|
---|
57 | @ echo "All programs terminated normally"
|
---|
58 |
|
---|
59 | compileall : $(TESTS)
|
---|
60 | @ echo "Compiled"
|
---|
61 |
|
---|
62 | clean-local:
|
---|
63 | rm -f $(TESTS) core* out.log .type
|
---|
64 |
|
---|
65 | % : %.cfa $(CFACC) $(UPDATED_TYPE)
|
---|
66 | $(AM_V_CFA)$(CFACOMPILE) $(<) $(debug) -o $(@)
|
---|
67 |
|
---|
68 | %.run : % $(REPEAT)
|
---|
69 | @ time $(REPEAT) -r out.log -i -s $(repeats) timeout $(max_time) ./$(<)
|
---|
70 | @ rm $(<)
|
---|
71 | @ echo -e "$(<): SUCCESS\n"
|
---|
72 |
|
---|
73 | %.watch : % $(WATCHDOG)
|
---|
74 | @ time $(WATCHDOG} ./$(<)
|
---|
75 | @ rm $(<)
|
---|
76 | @ echo -e "$(<): SUCCESS\n"
|
---|
77 |
|
---|
78 | %.time : % $(REPEAT)
|
---|
79 | @ $(REPEAT) -i -s -- $(repeats) $(TIME) -a -o times.log ./$(<)
|
---|
80 | @ rm $(<)
|
---|
81 | @ echo -e "$(<): SUCCESS\n"
|
---|
82 |
|
---|
83 | $(REPEAT): $(abs_top_builddir)/tools/Makefile
|
---|
84 | @+make -C $(abs_top_builddir)/tools/
|
---|
85 |
|
---|
86 | $(WATCHDOG): $(abs_top_builddir)/tools/Makefile
|
---|
87 | @+make -C $(abs_top_builddir)/tools/
|
---|