| [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 |  | 
|---|
| [bcadb26] | 20 | include $(top_srcdir)/tools/build/cfa.make | 
|---|
| [e8fe5e0] | 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 \ | 
|---|
| [850aff1] | 38 | -Wextra \ | 
|---|
|  | 39 | -Werror=return-type | 
|---|
| [e8fe5e0] | 40 | -Wno-unused-function \ | 
|---|
|  | 41 | -quiet \ | 
|---|
|  | 42 | -O2 \ | 
|---|
|  | 43 | -DPREEMPTION_RATE=$(preempt) \ | 
|---|
|  | 44 | -I$(abs_top_srcdir)/tests \ | 
|---|
|  | 45 | -I$(srcdir) \ | 
|---|
| [ecc0fec] | 46 | -DTEST_$(shell cat .type | tr a-z A-Z) | 
|---|
| [cc3e4d0] | 47 |  | 
|---|
| [26a249c] | 48 | TESTS = block coroutine create disjoint enter enter3 locks processor stack wait yield | 
|---|
| [cc3e4d0] | 49 |  | 
|---|
| [e8fe5e0] | 50 | # .INTERMEDIATE: $(TESTS) | 
|---|
| [cc3e4d0] | 51 |  | 
|---|
| [e8fe5e0] | 52 | all-local: $(TESTS:=.run) | 
|---|
| [cc3e4d0] | 53 |  | 
|---|
| [e8fe5e0] | 54 | runall : $(TESTS:=.run) | 
|---|
| [7bdcac1] | 55 | @ echo "All programs terminated normally" | 
|---|
|  | 56 |  | 
|---|
| [e8fe5e0] | 57 | watchall : $(TESTS:=.watch) | 
|---|
| [7bdcac1] | 58 | @ echo "All programs terminated normally" | 
|---|
|  | 59 |  | 
|---|
| [e8fe5e0] | 60 | compileall : $(TESTS) | 
|---|
| [7bdcac1] | 61 | @ echo "Compiled" | 
|---|
|  | 62 |  | 
|---|
| [0764cfb] | 63 | clean-local: | 
|---|
| [e8fe5e0] | 64 | rm -f $(TESTS) core* out.log .type | 
|---|
| [0764cfb] | 65 |  | 
|---|
| [e8fe5e0] | 66 | % : %.cfa $(CFACC) $(UPDATED_TYPE) | 
|---|
|  | 67 | $(AM_V_CFA)$(CFACOMPILE) $(<) $(debug) -o $(@) | 
|---|
| [cc3e4d0] | 68 |  | 
|---|
| [e8fe5e0] | 69 | %.run : % $(REPEAT) | 
|---|
|  | 70 | @ time $(REPEAT) -r out.log -i -s $(repeats) timeout $(max_time) ./$(<) | 
|---|
|  | 71 | @ rm $(<) | 
|---|
|  | 72 | @ echo -e "$(<): SUCCESS\n" | 
|---|
| [1449d83] | 73 |  | 
|---|
| [e8fe5e0] | 74 | %.watch : % $(WATCHDOG) | 
|---|
|  | 75 | @ time $(WATCHDOG} ./$(<) | 
|---|
|  | 76 | @ rm $(<) | 
|---|
|  | 77 | @ echo -e "$(<): SUCCESS\n" | 
|---|
| [7bdcac1] | 78 |  | 
|---|
| [e8fe5e0] | 79 | %.time : % $(REPEAT) | 
|---|
|  | 80 | @ $(REPEAT) -i -s -- $(repeats) $(TIME) -a -o times.log ./$(<) | 
|---|
|  | 81 | @ rm $(<) | 
|---|
|  | 82 | @ echo -e "$(<): SUCCESS\n" | 
|---|
| [0394c31] | 83 |  | 
|---|
| [e8fe5e0] | 84 | $(REPEAT): $(abs_top_builddir)/tools/Makefile | 
|---|
|  | 85 | @+make -C $(abs_top_builddir)/tools/ | 
|---|
| [7bdcac1] | 86 |  | 
|---|
| [e8fe5e0] | 87 | $(WATCHDOG): $(abs_top_builddir)/tools/Makefile | 
|---|
| [26a249c] | 88 | @+make -C $(abs_top_builddir)/tools/ | 
|---|