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 | |
---|
26 | .NOTPARALLEL: |
---|
27 | |
---|
28 | noinst_PROGRAMS = |
---|
29 | |
---|
30 | all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT) |
---|
31 | |
---|
32 | bench$(EXEEXT) : |
---|
33 | @for ccflags in "-debug" "-nodebug"; do \ |
---|
34 | echo ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -lrt bench.c;\ |
---|
35 | ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt bench.c;\ |
---|
36 | ./a.out ; \ |
---|
37 | done ; \ |
---|
38 | rm -f ./a.out ; |
---|
39 | |
---|
40 | csv-data$(EXEEXT): |
---|
41 | @${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -quiet -DN=50000000 csv-data.c |
---|
42 | @./a.out |
---|
43 | @rm -f ./a.out |
---|
44 | |
---|
45 | ## ========================================================================================================= |
---|
46 | ctxswitch$(EXEEXT): \ |
---|
47 | ctxswitch-pthread.run \ |
---|
48 | ctxswitch-cfa_coroutine.run \ |
---|
49 | ctxswitch-cfa_thread.run \ |
---|
50 | ctxswitch-upp_coroutine.run \ |
---|
51 | ctxswitch-upp_thread.run |
---|
52 | |
---|
53 | ctxswitch-cfa_coroutine$(EXEEXT): |
---|
54 | ${CC} ctxswitch/cfa_cor.c -DBENCH_N=50000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
55 | |
---|
56 | ctxswitch-cfa_thread$(EXEEXT): |
---|
57 | ${CC} ctxswitch/cfa_thrd.c -DBENCH_N=50000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
58 | |
---|
59 | ctxswitch-upp_coroutine$(EXEEXT): |
---|
60 | u++ ctxswitch/upp_cor.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
61 | |
---|
62 | ctxswitch-upp_thread$(EXEEXT): |
---|
63 | u++ ctxswitch/upp_thrd.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
64 | |
---|
65 | ctxswitch-pthread$(EXEEXT): |
---|
66 | @BACKEND_CC@ ctxswitch/pthreads.c -DBENCH_N=50000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
67 | |
---|
68 | ## ========================================================================================================= |
---|
69 | mutex$(EXEEXT) :\ |
---|
70 | mutex-function.run \ |
---|
71 | mutex-pthread_lock.run \ |
---|
72 | mutex-upp.run \ |
---|
73 | mutex-cfa1.run \ |
---|
74 | mutex-cfa2.run \ |
---|
75 | mutex-cfa4.run |
---|
76 | |
---|
77 | mutex-function$(EXEEXT): |
---|
78 | @BACKEND_CC@ mutex/function.c -DBENCH_N=500000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
79 | |
---|
80 | mutex-pthread_lock$(EXEEXT): |
---|
81 | @BACKEND_CC@ mutex/pthreads.c -DBENCH_N=50000000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
82 | |
---|
83 | mutex-upp$(EXEEXT): |
---|
84 | u++ mutex/upp.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
85 | |
---|
86 | mutex-cfa1$(EXEEXT): |
---|
87 | ${CC} mutex/cfa1.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
88 | |
---|
89 | mutex-cfa2$(EXEEXT): |
---|
90 | ${CC} mutex/cfa2.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
91 | |
---|
92 | mutex-cfa4$(EXEEXT): |
---|
93 | ${CC} mutex/cfa4.c -DBENCH_N=5000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
94 | |
---|
95 | ## ========================================================================================================= |
---|
96 | signal$(EXEEXT) :\ |
---|
97 | signal-upp.run \ |
---|
98 | signal-cfa1.run \ |
---|
99 | signal-cfa2.run \ |
---|
100 | signal-cfa4.run |
---|
101 | |
---|
102 | signal-upp$(EXEEXT): |
---|
103 | u++ schedint/upp.cc -DBENCH_N=5000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
104 | |
---|
105 | signal-cfa1$(EXEEXT): |
---|
106 | ${CC} schedint/cfa1.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
107 | |
---|
108 | signal-cfa2$(EXEEXT): |
---|
109 | ${CC} schedint/cfa2.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
110 | |
---|
111 | signal-cfa4$(EXEEXT): |
---|
112 | ${CC} schedint/cfa4.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
113 | |
---|
114 | ## ========================================================================================================= |
---|
115 | waitfor$(EXEEXT) :\ |
---|
116 | waitfor-upp.run \ |
---|
117 | waitfor-cfa1.run \ |
---|
118 | waitfor-cfa2.run \ |
---|
119 | waitfor-cfa4.run |
---|
120 | |
---|
121 | waitfor-upp$(EXEEXT): |
---|
122 | u++ schedext/upp.cc -DBENCH_N=5000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
123 | |
---|
124 | waitfor-cfa1$(EXEEXT): |
---|
125 | ${CC} schedext/cfa1.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
126 | |
---|
127 | waitfor-cfa2$(EXEEXT): |
---|
128 | ${CC} schedext/cfa2.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
129 | |
---|
130 | waitfor-cfa4$(EXEEXT): |
---|
131 | ${CC} schedext/cfa4.c -DBENCH_N=500000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
132 | |
---|
133 | ## ========================================================================================================= |
---|
134 | creation$(EXEEXT) :\ |
---|
135 | creation-pthread.run \ |
---|
136 | creation-cfa_coroutine.run \ |
---|
137 | creation-cfa_thread.run \ |
---|
138 | creation-upp_coroutine.run \ |
---|
139 | creation-upp_thread.run |
---|
140 | |
---|
141 | creation-cfa_coroutine$(EXEEXT): |
---|
142 | ${CC} creation/cfa_cor.c -DBENCH_N=10000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
143 | |
---|
144 | creation-cfa_thread$(EXEEXT): |
---|
145 | ${CC} creation/cfa_thrd.c -DBENCH_N=10000000 -I. -nodebug -lrt -quiet @CFA_FLAGS@ ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
146 | |
---|
147 | creation-upp_coroutine$(EXEEXT): |
---|
148 | u++ creation/upp_cor.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
149 | |
---|
150 | creation-upp_thread$(EXEEXT): |
---|
151 | u++ creation/upp_thrd.cc -DBENCH_N=50000000 -I. -nodebug -lrt -quiet ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
152 | |
---|
153 | creation-pthread$(EXEEXT): |
---|
154 | @BACKEND_CC@ creation/pthreads.c -DBENCH_N=250000 -I. -lrt -pthread ${AM_CFLAGS} ${CFLAGS} ${ccflags} |
---|
155 | |
---|
156 | ## ========================================================================================================= |
---|
157 | |
---|
158 | %.run : %$(EXEEXT) ${REPEAT} |
---|
159 | @rm -f .result.log |
---|
160 | @echo "------------------------------------------------------" |
---|
161 | @echo $< |
---|
162 | @${REPEAT} ${repeats} ./a.out | tee -a .result.log |
---|
163 | @${STATS} .result.log |
---|
164 | @echo "------------------------------------------------------" |
---|
165 | @rm -f a.out .result.log |
---|
166 | |
---|
167 | ${REPEAT} : |
---|
168 | @+make -C ${TOOLSDIR} repeat |
---|