[ac93b228] | 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 : Peter A. Buhr
|
---|
| 11 | ## Created On : Sun May 31 09:08:15 2015
|
---|
| 12 | ## Last Modified By : Peter A. Buhr
|
---|
| 13 | ## Last Modified On : Mon Jan 25 22:31:42 2016
|
---|
| 14 | ## Update Count : 25
|
---|
| 15 | ###############################################################################
|
---|
| 16 |
|
---|
| 17 | # applies to both programs
|
---|
| 18 | CFLAGS =
|
---|
| 19 | AM_CFLAGS = -g -Wall -Wno-unused-function -O2
|
---|
[df47e2f] | 20 | CC = @CFA_BINDIR@/@CFA_NAME@
|
---|
[b7170a64] | 21 | TOOLSDIR = ${abs_top_srcdir}/tools/
|
---|
| 22 | REPEAT = ${TOOLSDIR}repeat
|
---|
| 23 | STATS = ${TOOLSDIR}stat.py
|
---|
| 24 | repeats = 30
|
---|
[a5b7905] | 25 | TIME_FORMAT = "%E"
|
---|
[2086ab2] | 26 | PRINT_FORMAT = %20s: #Comments needed for spacing
|
---|
[034165a] | 27 |
|
---|
| 28 | .NOTPARALLEL:
|
---|
[ac93b228] | 29 |
|
---|
[b7170a64] | 30 | noinst_PROGRAMS =
|
---|
[ac93b228] | 31 |
|
---|
[4cedd9f] | 32 | all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT)
|
---|
| 33 |
|
---|
[a5b7905] | 34 | %.run : %$(EXEEXT) ${REPEAT}
|
---|
| 35 | @rm -f .result.log
|
---|
| 36 | @echo "------------------------------------------------------"
|
---|
| 37 | @echo $<
|
---|
| 38 | @${REPEAT} ${repeats} ./a.out | tee -a .result.log
|
---|
| 39 | @${STATS} .result.log
|
---|
| 40 | @echo "------------------------------------------------------"
|
---|
| 41 | @rm -f a.out .result.log
|
---|
[ac93b228] | 42 |
|
---|
[a5b7905] | 43 | %.runquiet :
|
---|
| 44 | @+make $(basename $@)
|
---|
[034165a] | 45 | @./a.out
|
---|
[a5b7905] | 46 | @rm -f a.out
|
---|
| 47 |
|
---|
| 48 | %.make :
|
---|
| 49 | @printf "${PRINT_FORMAT}" $(basename $(subst compile-,,$@))
|
---|
| 50 | @+/usr/bin/time -f ${TIME_FORMAT} make $(basename $@) 2>&1
|
---|
| 51 |
|
---|
| 52 | ${REPEAT} :
|
---|
| 53 | @+make -C ${TOOLSDIR} repeat
|
---|
| 54 |
|
---|
| 55 | ## =========================================================================================================
|
---|
| 56 |
|
---|
| 57 | jenkins$(EXEEXT):
|
---|
| 58 | @echo "{"
|
---|
| 59 | @echo -e '\t"githash": "'${githash}'",'
|
---|
| 60 | @echo -e '\t"arch": "' ${arch} '",'
|
---|
| 61 | @echo -e '\t"compile": {'
|
---|
| 62 | @+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :'
|
---|
| 63 | @echo -e '\t\t"dummy" : {}'
|
---|
| 64 | @echo -e '\t},'
|
---|
| 65 | @echo -e '\t"ctxswitch": {'
|
---|
| 66 | @echo -en '\t\t"coroutine":'
|
---|
| 67 | @+make ctxswitch-cfa_coroutine.runquiet
|
---|
| 68 | @echo -en '\t\t,"thread":'
|
---|
| 69 | @+make ctxswitch-cfa_thread.runquiet
|
---|
| 70 | @echo -e '\t},'
|
---|
| 71 | @echo -e '\t"mutex": ['
|
---|
| 72 | @echo -en '\t\t'
|
---|
| 73 | @+make mutex-cfa1.runquiet
|
---|
| 74 | @echo -en '\t\t,'
|
---|
| 75 | @+make mutex-cfa2.runquiet
|
---|
| 76 | @echo -e '\t],'
|
---|
| 77 | @echo -e '\t"scheduling": ['
|
---|
| 78 | @echo -en '\t\t'
|
---|
| 79 | @+make signal-cfa1.runquiet
|
---|
| 80 | @echo -en '\t\t,'
|
---|
| 81 | @+make signal-cfa2.runquiet
|
---|
| 82 | @echo -en '\t\t,'
|
---|
| 83 | @+make waitfor-cfa1.runquiet
|
---|
| 84 | @echo -en '\t\t,'
|
---|
| 85 | @+make waitfor-cfa2.runquiet
|
---|
| 86 | @echo -e '\n\t],'
|
---|
| 87 | @echo -e '\t"epoch": ' $(shell date +%s)
|
---|
| 88 | @echo "}"
|
---|
[ac93b228] | 89 |
|
---|
[034165a] | 90 | ## =========================================================================================================
|
---|
| 91 | ctxswitch$(EXEEXT): \
|
---|
[b7170a64] | 92 | ctxswitch-pthread.run \
|
---|
| 93 | ctxswitch-cfa_coroutine.run \
|
---|
| 94 | ctxswitch-cfa_thread.run \
|
---|
| 95 | ctxswitch-upp_coroutine.run \
|
---|
[50abab9] | 96 | ctxswitch-upp_thread.run \
|
---|
| 97 | ctxswitch-goroutine.run \
|
---|
| 98 | ctxswitch-java_thread.run
|
---|
[034165a] | 99 |
|
---|
| 100 | ctxswitch-cfa_coroutine$(EXEEXT):
|
---|
[a5b7905] | 101 | @${CC} ctxswitch/cfa_cor.c -DBENCH_N=50000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[034165a] | 102 |
|
---|
| 103 | ctxswitch-cfa_thread$(EXEEXT):
|
---|
[a5b7905] | 104 | @${CC} ctxswitch/cfa_thrd.c -DBENCH_N=50000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[034165a] | 105 |
|
---|
| 106 | ctxswitch-upp_coroutine$(EXEEXT):
|
---|
[a5b7905] | 107 | @u++ ctxswitch/upp_cor.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[034165a] | 108 |
|
---|
| 109 | ctxswitch-upp_thread$(EXEEXT):
|
---|
[a5b7905] | 110 | @u++ ctxswitch/upp_thrd.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[ac93b228] | 111 |
|
---|
[d67cdb7] | 112 | ctxswitch-pthread$(EXEEXT):
|
---|
[a5b7905] | 113 | @@BACKEND_CC@ ctxswitch/pthreads.c -DBENCH_N=50000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[034165a] | 114 |
|
---|
[50abab9] | 115 | ctxswitch-goroutine$(EXEEXT):
|
---|
| 116 | @go build -o a.out ctxswitch/goroutine.go
|
---|
| 117 |
|
---|
| 118 | ctxswitch-java_thread$(EXEEXT):
|
---|
| 119 | @javac ctxswitch/JavaThread.java
|
---|
| 120 | @echo "#!/bin/sh" > a.out
|
---|
| 121 | @echo "cd ctxswitch && java JavaThread" >> a.out
|
---|
| 122 | @chmod a+x a.out
|
---|
| 123 |
|
---|
[f54a0ab] | 124 | ## =========================================================================================================
|
---|
| 125 | mutex$(EXEEXT) :\
|
---|
| 126 | mutex-function.run \
|
---|
[6aa537a4] | 127 | mutex-fetch_add.run \
|
---|
[f54a0ab] | 128 | mutex-pthread_lock.run \
|
---|
| 129 | mutex-upp.run \
|
---|
| 130 | mutex-cfa1.run \
|
---|
| 131 | mutex-cfa2.run \
|
---|
[6aa537a4] | 132 | mutex-cfa4.run \
|
---|
| 133 | mutex-java_thread.run
|
---|
[f54a0ab] | 134 |
|
---|
| 135 | mutex-function$(EXEEXT):
|
---|
[a5b7905] | 136 | @@BACKEND_CC@ mutex/function.c -DBENCH_N=500000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[f54a0ab] | 137 |
|
---|
[6aa537a4] | 138 | mutex-fetch_add$(EXEEXT):
|
---|
| 139 | @@BACKEND_CC@ mutex/fetch_add.c -DBENCH_N=500000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
| 140 |
|
---|
[f54a0ab] | 141 | mutex-pthread_lock$(EXEEXT):
|
---|
[a5b7905] | 142 | @@BACKEND_CC@ mutex/pthreads.c -DBENCH_N=50000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[f54a0ab] | 143 |
|
---|
| 144 | mutex-upp$(EXEEXT):
|
---|
[a5b7905] | 145 | @u++ mutex/upp.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[f54a0ab] | 146 |
|
---|
| 147 | mutex-cfa1$(EXEEXT):
|
---|
[a5b7905] | 148 | @${CC} mutex/cfa1.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[f54a0ab] | 149 |
|
---|
| 150 | mutex-cfa2$(EXEEXT):
|
---|
[a5b7905] | 151 | @${CC} mutex/cfa2.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[f54a0ab] | 152 |
|
---|
| 153 | mutex-cfa4$(EXEEXT):
|
---|
[a5b7905] | 154 | @${CC} mutex/cfa4.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[034165a] | 155 |
|
---|
[6aa537a4] | 156 | mutex-java_thread$(EXEEXT):
|
---|
| 157 | @javac mutex/JavaThread.java
|
---|
| 158 | @echo "#!/bin/sh" > a.out
|
---|
| 159 | @echo "cd mutex && java JavaThread" >> a.out
|
---|
| 160 | @chmod a+x a.out
|
---|
| 161 |
|
---|
[9f0b975] | 162 | ## =========================================================================================================
|
---|
| 163 | signal$(EXEEXT) :\
|
---|
| 164 | signal-upp.run \
|
---|
| 165 | signal-cfa1.run \
|
---|
| 166 | signal-cfa2.run \
|
---|
[56de6b39] | 167 | signal-cfa4.run \
|
---|
| 168 | signal-java_thread.run
|
---|
[9f0b975] | 169 |
|
---|
| 170 | signal-upp$(EXEEXT):
|
---|
[a5b7905] | 171 | @u++ schedint/upp.cc -DBENCH_N=5000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[9f0b975] | 172 |
|
---|
| 173 | signal-cfa1$(EXEEXT):
|
---|
[a5b7905] | 174 | @${CC} schedint/cfa1.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[9f0b975] | 175 |
|
---|
| 176 | signal-cfa2$(EXEEXT):
|
---|
[a5b7905] | 177 | @${CC} schedint/cfa2.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[9f0b975] | 178 |
|
---|
| 179 | signal-cfa4$(EXEEXT):
|
---|
[a5b7905] | 180 | @${CC} schedint/cfa4.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[9f0b975] | 181 |
|
---|
[6aa537a4] | 182 | signal-java_thread$(EXEEXT):
|
---|
| 183 | @javac schedint/JavaThread.java
|
---|
| 184 | @echo "#!/bin/sh" > a.out
|
---|
| 185 | @echo "cd schedint && java JavaThread" >> a.out
|
---|
| 186 | @chmod a+x a.out
|
---|
| 187 |
|
---|
| 188 |
|
---|
[9f0b975] | 189 | ## =========================================================================================================
|
---|
| 190 | waitfor$(EXEEXT) :\
|
---|
| 191 | waitfor-upp.run \
|
---|
| 192 | waitfor-cfa1.run \
|
---|
| 193 | waitfor-cfa2.run \
|
---|
| 194 | waitfor-cfa4.run
|
---|
| 195 |
|
---|
| 196 | waitfor-upp$(EXEEXT):
|
---|
[a5b7905] | 197 | @u++ schedext/upp.cc -DBENCH_N=5000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[9f0b975] | 198 |
|
---|
| 199 | waitfor-cfa1$(EXEEXT):
|
---|
[a5b7905] | 200 | @${CC} schedext/cfa1.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[9f0b975] | 201 |
|
---|
| 202 | waitfor-cfa2$(EXEEXT):
|
---|
[a5b7905] | 203 | @${CC} schedext/cfa2.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[9f0b975] | 204 |
|
---|
| 205 | waitfor-cfa4$(EXEEXT):
|
---|
[a5b7905] | 206 | @${CC} schedext/cfa4.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[9f0b975] | 207 |
|
---|
[4cedd9f] | 208 | ## =========================================================================================================
|
---|
| 209 | creation$(EXEEXT) :\
|
---|
[3351cc0] | 210 | creation-pthread.run \
|
---|
| 211 | creation-cfa_coroutine.run \
|
---|
| 212 | creation-cfa_coroutine_eager.run \
|
---|
| 213 | creation-cfa_thread.run \
|
---|
| 214 | creation-upp_coroutine.run \
|
---|
[50abab9] | 215 | creation-upp_thread.run \
|
---|
| 216 | creation-goroutine.run \
|
---|
| 217 | creation-java_thread.run
|
---|
[4cedd9f] | 218 |
|
---|
| 219 | creation-cfa_coroutine$(EXEEXT):
|
---|
[a5b7905] | 220 | @${CC} creation/cfa_cor.c -DBENCH_N=10000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[4cedd9f] | 221 |
|
---|
[3351cc0] | 222 | creation-cfa_coroutine_eager$(EXEEXT):
|
---|
[a5b7905] | 223 | @${CC} creation/cfa_cor.c -DBENCH_N=10000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -DEAGER
|
---|
[3351cc0] | 224 |
|
---|
[4cedd9f] | 225 | creation-cfa_thread$(EXEEXT):
|
---|
[a5b7905] | 226 | @${CC} creation/cfa_thrd.c -DBENCH_N=10000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[4cedd9f] | 227 |
|
---|
| 228 | creation-upp_coroutine$(EXEEXT):
|
---|
[a5b7905] | 229 | @u++ creation/upp_cor.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[4cedd9f] | 230 |
|
---|
| 231 | creation-upp_thread$(EXEEXT):
|
---|
[a5b7905] | 232 | @u++ creation/upp_thrd.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[4cedd9f] | 233 |
|
---|
| 234 | creation-pthread$(EXEEXT):
|
---|
[a5b7905] | 235 | @@BACKEND_CC@ creation/pthreads.c -DBENCH_N=250000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[4cedd9f] | 236 |
|
---|
[50abab9] | 237 | creation-goroutine$(EXEEXT):
|
---|
| 238 | @go build -o a.out creation/goroutine.go
|
---|
| 239 |
|
---|
| 240 | creation-java_thread$(EXEEXT):
|
---|
| 241 | @javac creation/JavaThread.java
|
---|
| 242 | @echo "#!/bin/sh" > a.out
|
---|
| 243 | @echo "cd creation && java JavaThread" >> a.out
|
---|
| 244 | @chmod a+x a.out
|
---|
| 245 |
|
---|
[034165a] | 246 | ## =========================================================================================================
|
---|
| 247 |
|
---|
[3edc2df] | 248 | compile$(EXEEXT) :\
|
---|
[a5b7905] | 249 | compile-array.make \
|
---|
| 250 | compile-attributes.make \
|
---|
| 251 | compile-empty.make \
|
---|
| 252 | compile-expression.make \
|
---|
| 253 | compile-io.make \
|
---|
| 254 | compile-monitor.make \
|
---|
| 255 | compile-operators.make \
|
---|
| 256 | compile-typeof.make
|
---|
[3edc2df] | 257 |
|
---|
| 258 |
|
---|
| 259 | compile-array$(EXEEXT):
|
---|
[2086ab2] | 260 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/array.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[3edc2df] | 261 |
|
---|
| 262 | compile-attributes$(EXEEXT):
|
---|
[2086ab2] | 263 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/attributes.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[3edc2df] | 264 |
|
---|
| 265 | compile-empty$(EXEEXT):
|
---|
[2086ab2] | 266 | @${CC} -nodebug -quiet -fsyntax-only -w compile/empty.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[3edc2df] | 267 |
|
---|
| 268 | compile-expression$(EXEEXT):
|
---|
[2086ab2] | 269 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/expression.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[3edc2df] | 270 |
|
---|
| 271 | compile-io$(EXEEXT):
|
---|
[2086ab2] | 272 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/io.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[3edc2df] | 273 |
|
---|
| 274 | compile-monitor$(EXEEXT):
|
---|
[2086ab2] | 275 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/monitor.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[3edc2df] | 276 |
|
---|
| 277 | compile-operators$(EXEEXT):
|
---|
[2086ab2] | 278 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/operators.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[3edc2df] | 279 |
|
---|
| 280 | compile-thread$(EXEEXT):
|
---|
[2086ab2] | 281 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/thread.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[3edc2df] | 282 |
|
---|
| 283 | compile-typeof$(EXEEXT):
|
---|
[2086ab2] | 284 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/typeof.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags}
|
---|
[3edc2df] | 285 |
|
---|