[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 | |
---|
[e8fe5e0] | 20 | include $(top_srcdir)/src/cfa.make |
---|
| 21 | |
---|
[cc3e4d0] | 22 | repeats=10 |
---|
[d6ff3ff] | 23 | max_time=600 |
---|
[b9da9585] | 24 | preempt=10ul\`ms |
---|
[827a190] | 25 | debug=-debug |
---|
[7bdcac1] | 26 | type=LONG |
---|
[cc3e4d0] | 27 | |
---|
[e8fe5e0] | 28 | REPEAT = $(abs_top_builddir)/tools/repeat |
---|
| 29 | WATCHDOG = $(abs_top_builddir)/tools/watchdog |
---|
[0394c31] | 30 | TIME = /usr/bin/time -f "%E" |
---|
[cc3e4d0] | 31 | |
---|
[e8fe5e0] | 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) \ |
---|
[ecc0fec] | 44 | -DTEST_$(shell cat .type | tr a-z A-Z) |
---|
[cc3e4d0] | 45 | |
---|
[827a190] | 46 | TESTS = block coroutine create disjoint enter enter3 processor stack wait yield |
---|
[cc3e4d0] | 47 | |
---|
[e8fe5e0] | 48 | # .INTERMEDIATE: $(TESTS) |
---|
[cc3e4d0] | 49 | |
---|
[e8fe5e0] | 50 | all-local: $(TESTS:=.run) |
---|
[cc3e4d0] | 51 | |
---|
[e8fe5e0] | 52 | runall : $(TESTS:=.run) |
---|
[7bdcac1] | 53 | @ echo "All programs terminated normally" |
---|
| 54 | |
---|
[e8fe5e0] | 55 | watchall : $(TESTS:=.watch) |
---|
[7bdcac1] | 56 | @ echo "All programs terminated normally" |
---|
| 57 | |
---|
[e8fe5e0] | 58 | compileall : $(TESTS) |
---|
[7bdcac1] | 59 | @ echo "Compiled" |
---|
| 60 | |
---|
[0764cfb] | 61 | clean-local: |
---|
[e8fe5e0] | 62 | rm -f $(TESTS) core* out.log .type |
---|
[0764cfb] | 63 | |
---|
[e8fe5e0] | 64 | % : %.cfa $(CFACC) $(UPDATED_TYPE) |
---|
| 65 | $(AM_V_CFA)$(CFACOMPILE) $(<) $(debug) -o $(@) |
---|
[cc3e4d0] | 66 | |
---|
[e8fe5e0] | 67 | %.run : % $(REPEAT) |
---|
| 68 | @ time $(REPEAT) -r out.log -i -s $(repeats) timeout $(max_time) ./$(<) |
---|
| 69 | @ rm $(<) |
---|
| 70 | @ echo -e "$(<): SUCCESS\n" |
---|
[1449d83] | 71 | |
---|
[e8fe5e0] | 72 | %.watch : % $(WATCHDOG) |
---|
| 73 | @ time $(WATCHDOG} ./$(<) |
---|
| 74 | @ rm $(<) |
---|
| 75 | @ echo -e "$(<): SUCCESS\n" |
---|
[7bdcac1] | 76 | |
---|
[e8fe5e0] | 77 | %.time : % $(REPEAT) |
---|
| 78 | @ $(REPEAT) -i -s -- $(repeats) $(TIME) -a -o times.log ./$(<) |
---|
| 79 | @ rm $(<) |
---|
| 80 | @ echo -e "$(<): SUCCESS\n" |
---|
[0394c31] | 81 | |
---|
[e8fe5e0] | 82 | $(REPEAT): $(abs_top_builddir)/tools/Makefile |
---|
| 83 | @+make -C $(abs_top_builddir)/tools/ |
---|
[7bdcac1] | 84 | |
---|
[e8fe5e0] | 85 | $(WATCHDOG): $(abs_top_builddir)/tools/Makefile |
---|
| 86 | @+make -C $(abs_top_builddir)/tools/ |
---|