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"ctxswitch": {' |
---|
62 | @echo -en '\t\t"coroutine":' |
---|
63 | @+make ctxswitch-cfa_coroutine.runquiet |
---|
64 | @echo -en '\t\t,"thread":' |
---|
65 | @+make ctxswitch-cfa_thread.runquiet |
---|
66 | @echo -e '\t},' |
---|
67 | @echo -e '\t"mutex": [' |
---|
68 | @echo -en '\t\t' |
---|
69 | @+make mutex-cfa1.runquiet |
---|
70 | @echo -en '\t\t,' |
---|
71 | @+make mutex-cfa2.runquiet |
---|
72 | @echo -e '\t],' |
---|
73 | @echo -e '\t"scheduling": [' |
---|
74 | @echo -en '\t\t' |
---|
75 | @+make signal-cfa1.runquiet |
---|
76 | @echo -en '\t\t,' |
---|
77 | @+make signal-cfa2.runquiet |
---|
78 | @echo -en '\t\t,' |
---|
79 | @+make waitfor-cfa1.runquiet |
---|
80 | @echo -en '\t\t,' |
---|
81 | @+make waitfor-cfa2.runquiet |
---|
82 | @echo -e '\n\t],' |
---|
83 | @echo -e '\t"epoch": ' $(shell date +%s) |
---|
84 | @echo "}" |
---|
85 | |
---|
86 | ## ========================================================================================================= |
---|
87 | ctxswitch$(EXEEXT): \ |
---|
88 | ctxswitch-pthread.run \ |
---|
89 | ctxswitch-cfa_coroutine.run \ |
---|
90 | ctxswitch-cfa_thread.run \ |
---|
91 | ctxswitch-upp_coroutine.run \ |
---|
92 | ctxswitch-upp_thread.run \ |
---|
93 | ctxswitch-goroutine.run \ |
---|
94 | ctxswitch-java_thread.run |
---|
95 | |
---|
96 | ctxswitch-cfa_coroutine$(EXEEXT): |
---|
97 | @${CC} ctxswitch/cfa_cor.c -DBENCH_N=50000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
98 | |
---|
99 | ctxswitch-cfa_thread$(EXEEXT): |
---|
100 | @${CC} ctxswitch/cfa_thrd.c -DBENCH_N=50000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
101 | |
---|
102 | ctxswitch-upp_coroutine$(EXEEXT): |
---|
103 | @u++ ctxswitch/upp_cor.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
104 | |
---|
105 | ctxswitch-upp_thread$(EXEEXT): |
---|
106 | @u++ ctxswitch/upp_thrd.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
107 | |
---|
108 | ctxswitch-pthread$(EXEEXT): |
---|
109 | @@BACKEND_CC@ ctxswitch/pthreads.c -DBENCH_N=50000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
110 | |
---|
111 | ctxswitch-goroutine$(EXEEXT): |
---|
112 | @go build -o a.out ctxswitch/goroutine.go |
---|
113 | |
---|
114 | ctxswitch-java_thread$(EXEEXT): |
---|
115 | @javac ctxswitch/JavaThread.java |
---|
116 | @echo "#!/bin/sh" > a.out |
---|
117 | @echo "cd ctxswitch && java JavaThread" >> a.out |
---|
118 | @chmod a+x a.out |
---|
119 | |
---|
120 | ## ========================================================================================================= |
---|
121 | mutex$(EXEEXT) :\ |
---|
122 | mutex-function.run \ |
---|
123 | mutex-fetch_add.run \ |
---|
124 | mutex-pthread_lock.run \ |
---|
125 | mutex-upp.run \ |
---|
126 | mutex-cfa1.run \ |
---|
127 | mutex-cfa2.run \ |
---|
128 | mutex-cfa4.run \ |
---|
129 | mutex-java_thread.run |
---|
130 | |
---|
131 | mutex-function$(EXEEXT): |
---|
132 | @@BACKEND_CC@ mutex/function.c -DBENCH_N=500000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
133 | |
---|
134 | mutex-fetch_add$(EXEEXT): |
---|
135 | @@BACKEND_CC@ mutex/fetch_add.c -DBENCH_N=500000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
136 | |
---|
137 | mutex-pthread_lock$(EXEEXT): |
---|
138 | @@BACKEND_CC@ mutex/pthreads.c -DBENCH_N=50000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
139 | |
---|
140 | mutex-upp$(EXEEXT): |
---|
141 | @u++ mutex/upp.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
142 | |
---|
143 | mutex-cfa1$(EXEEXT): |
---|
144 | @${CC} mutex/cfa1.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
145 | |
---|
146 | mutex-cfa2$(EXEEXT): |
---|
147 | @${CC} mutex/cfa2.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
148 | |
---|
149 | mutex-cfa4$(EXEEXT): |
---|
150 | @${CC} mutex/cfa4.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
151 | |
---|
152 | mutex-java_thread$(EXEEXT): |
---|
153 | @javac mutex/JavaThread.java |
---|
154 | @echo "#!/bin/sh" > a.out |
---|
155 | @echo "cd mutex && java JavaThread" >> a.out |
---|
156 | @chmod a+x a.out |
---|
157 | |
---|
158 | ## ========================================================================================================= |
---|
159 | signal$(EXEEXT) :\ |
---|
160 | signal-pthread_cond.run \ |
---|
161 | signal-upp.run \ |
---|
162 | signal-cfa1.run \ |
---|
163 | signal-cfa2.run \ |
---|
164 | signal-cfa4.run \ |
---|
165 | signal-java_thread.run |
---|
166 | |
---|
167 | signal-pthread_cond$(EXEEXT): |
---|
168 | @@BACKEND_CC@ schedint/pthreads.c -DBENCH_N=500000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
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 | |
---|