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 |
---|
20 | CC = @CFA_BINDIR@/@CFA_NAME@ |
---|
21 | TOOLSDIR = ${abs_top_srcdir}/tools/ |
---|
22 | REPEAT = ${TOOLSDIR}repeat |
---|
23 | STATS = ${TOOLSDIR}stat.py |
---|
24 | repeats = 30 |
---|
25 | TIME_FORMAT = "%E" |
---|
26 | PRINT_FORMAT = %20s: #Comments needed for spacing |
---|
27 | |
---|
28 | .NOTPARALLEL: |
---|
29 | |
---|
30 | noinst_PROGRAMS = |
---|
31 | |
---|
32 | all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT) |
---|
33 | |
---|
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 |
---|
42 | |
---|
43 | %.runquiet : |
---|
44 | @+make $(basename $@) |
---|
45 | @./a.out |
---|
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 "}" |
---|
89 | |
---|
90 | ## ========================================================================================================= |
---|
91 | ctxswitch$(EXEEXT): \ |
---|
92 | ctxswitch-pthread.run \ |
---|
93 | ctxswitch-cfa_coroutine.run \ |
---|
94 | ctxswitch-cfa_thread.run \ |
---|
95 | ctxswitch-upp_coroutine.run \ |
---|
96 | ctxswitch-upp_thread.run \ |
---|
97 | ctxswitch-goroutine.run \ |
---|
98 | ctxswitch-java_thread.run |
---|
99 | |
---|
100 | ctxswitch-cfa_coroutine$(EXEEXT): |
---|
101 | @${CC} ctxswitch/cfa_cor.c -DBENCH_N=50000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
102 | |
---|
103 | ctxswitch-cfa_thread$(EXEEXT): |
---|
104 | @${CC} ctxswitch/cfa_thrd.c -DBENCH_N=50000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
105 | |
---|
106 | ctxswitch-upp_coroutine$(EXEEXT): |
---|
107 | @u++ ctxswitch/upp_cor.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
108 | |
---|
109 | ctxswitch-upp_thread$(EXEEXT): |
---|
110 | @u++ ctxswitch/upp_thrd.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
111 | |
---|
112 | ctxswitch-pthread$(EXEEXT): |
---|
113 | @@BACKEND_CC@ ctxswitch/pthreads.c -DBENCH_N=50000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
114 | |
---|
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 | |
---|
124 | ## ========================================================================================================= |
---|
125 | mutex$(EXEEXT) :\ |
---|
126 | mutex-function.run \ |
---|
127 | mutex-fetch_add.run \ |
---|
128 | mutex-pthread_lock.run \ |
---|
129 | mutex-upp.run \ |
---|
130 | mutex-cfa1.run \ |
---|
131 | mutex-cfa2.run \ |
---|
132 | mutex-cfa4.run \ |
---|
133 | mutex-java_thread.run |
---|
134 | |
---|
135 | mutex-function$(EXEEXT): |
---|
136 | @@BACKEND_CC@ mutex/function.c -DBENCH_N=500000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
137 | |
---|
138 | mutex-fetch_add$(EXEEXT): |
---|
139 | @@BACKEND_CC@ mutex/fetch_add.c -DBENCH_N=500000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
140 | |
---|
141 | mutex-pthread_lock$(EXEEXT): |
---|
142 | @@BACKEND_CC@ mutex/pthreads.c -DBENCH_N=50000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
143 | |
---|
144 | mutex-upp$(EXEEXT): |
---|
145 | @u++ mutex/upp.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
146 | |
---|
147 | mutex-cfa1$(EXEEXT): |
---|
148 | @${CC} mutex/cfa1.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
149 | |
---|
150 | mutex-cfa2$(EXEEXT): |
---|
151 | @${CC} mutex/cfa2.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
152 | |
---|
153 | mutex-cfa4$(EXEEXT): |
---|
154 | @${CC} mutex/cfa4.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
155 | |
---|
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 | |
---|
162 | ## ========================================================================================================= |
---|
163 | signal$(EXEEXT) :\ |
---|
164 | signal-upp.run \ |
---|
165 | signal-cfa1.run \ |
---|
166 | signal-cfa2.run \ |
---|
167 | signal-cfa4.run \ |
---|
168 | signal-java_thread.run |
---|
169 | |
---|
170 | signal-upp$(EXEEXT): |
---|
171 | @u++ schedint/upp.cc -DBENCH_N=5000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
172 | |
---|
173 | signal-cfa1$(EXEEXT): |
---|
174 | @${CC} schedint/cfa1.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
175 | |
---|
176 | signal-cfa2$(EXEEXT): |
---|
177 | @${CC} schedint/cfa2.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
178 | |
---|
179 | signal-cfa4$(EXEEXT): |
---|
180 | @${CC} schedint/cfa4.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
181 | |
---|
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 | |
---|
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): |
---|
197 | @u++ schedext/upp.cc -DBENCH_N=5000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
198 | |
---|
199 | waitfor-cfa1$(EXEEXT): |
---|
200 | @${CC} schedext/cfa1.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
201 | |
---|
202 | waitfor-cfa2$(EXEEXT): |
---|
203 | @${CC} schedext/cfa2.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
204 | |
---|
205 | waitfor-cfa4$(EXEEXT): |
---|
206 | @${CC} schedext/cfa4.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
207 | |
---|
208 | ## ========================================================================================================= |
---|
209 | creation$(EXEEXT) :\ |
---|
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 \ |
---|
215 | creation-upp_thread.run \ |
---|
216 | creation-goroutine.run \ |
---|
217 | creation-java_thread.run |
---|
218 | |
---|
219 | creation-cfa_coroutine$(EXEEXT): |
---|
220 | @${CC} creation/cfa_cor.c -DBENCH_N=10000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
221 | |
---|
222 | creation-cfa_coroutine_eager$(EXEEXT): |
---|
223 | @${CC} creation/cfa_cor.c -DBENCH_N=10000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} -DEAGER |
---|
224 | |
---|
225 | creation-cfa_thread$(EXEEXT): |
---|
226 | @${CC} creation/cfa_thrd.c -DBENCH_N=10000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
227 | |
---|
228 | creation-upp_coroutine$(EXEEXT): |
---|
229 | @u++ creation/upp_cor.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
230 | |
---|
231 | creation-upp_thread$(EXEEXT): |
---|
232 | @u++ creation/upp_thrd.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
233 | |
---|
234 | creation-pthread$(EXEEXT): |
---|
235 | @@BACKEND_CC@ creation/pthreads.c -DBENCH_N=250000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
236 | |
---|
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 | |
---|
246 | ## ========================================================================================================= |
---|
247 | |
---|
248 | compile$(EXEEXT) :\ |
---|
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 |
---|
257 | |
---|
258 | |
---|
259 | compile-array$(EXEEXT): |
---|
260 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/array.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
261 | |
---|
262 | compile-attributes$(EXEEXT): |
---|
263 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/attributes.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
264 | |
---|
265 | compile-empty$(EXEEXT): |
---|
266 | @${CC} -nodebug -quiet -fsyntax-only -w compile/empty.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
267 | |
---|
268 | compile-expression$(EXEEXT): |
---|
269 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/expression.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
270 | |
---|
271 | compile-io$(EXEEXT): |
---|
272 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/io.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
273 | |
---|
274 | compile-monitor$(EXEEXT): |
---|
275 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/concurrent/monitor.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
276 | |
---|
277 | compile-operators$(EXEEXT): |
---|
278 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/operators.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
279 | |
---|
280 | compile-thread$(EXEEXT): |
---|
281 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/concurrent/thread.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
282 | |
---|
283 | compile-typeof$(EXEEXT): |
---|
284 | @${CC} -nodebug -quiet -fsyntax-only -w ../tests/typeof.c @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
285 | |
---|