4 # @author Mutsuo Saito (Hiroshima University)
5 # @author Makoto Matsumoto (Hiroshima University)
7 # Copyright (C) 2007, 2008 Mutsuo Saito, Makoto Matsumoto and
8 # Hiroshima University. All rights reserved.
10 # The new BSD License is applied to this software.
14 # We could comple test-sse2-Mxxx using gcc 3.4.4 of cygwin.
15 # We could comple test-sse2-Mxxx using gcc 4.0.1 of Linux.
16 # We coundn't comple test-sse2-Mxxx using gcc 3.3.2 of Linux.
17 # We could comple test-alti-Mxxx using gcc 3.3 of osx.
18 # We could comple test-alti-Mxxx using gcc 4.0 of osx.
20 WARN
= -Wmissing-prototypes
-Wall
#-Winline
21 #WARN = -Wmissing-prototypes -Wall -W
22 OPTI
= -O3
-finline-functions
-fomit-frame-pointer
-DNDEBUG \
23 -fno-strict-aliasing
--param max-inline-insns-single
=1800
24 #--param inline-unit-growth=500 --param large-function-growth=900 #for gcc 4
26 #STD = -std=c89 -pedantic
27 #STD = -std=c99 -pedantic
30 CCFLAGS
= $(OPTI
) $(WARN
) $(STD
)
31 ALTIFLAGS
= -mabi
=altivec
-maltivec
-DHAVE_ALTIVEC
32 OSXALTIFLAGS
= -faltivec
-maltivec
-DHAVE_ALTIVEC
33 SSE2FLAGS
= -msse2
-DHAVE_SSE2
34 STD_TARGET
= test-std-M19937
35 ALL_STD_TARGET
= test-std-M521 test-std-M1279 test-std-M2203 test-std-M4253 \
36 test-std-M11213 test-std-M19937 test-std-M44497 test-std-M86243 \
37 test-std-M132049 test-std-M216091
38 ALTI_TARGET
= $(STD_TARGET
) test-alti-M19937
39 ALL_ALTI_TARGET
= test-alti-M521 test-alti-M1279 test-alti-M2203 \
40 test-alti-M4253 test-alti-M11213 test-alti-M19937 test-alti-M44497 \
41 test-alti-M86243 test-alti-M132049 test-alti-M216091
42 SSE2_TARGET
= $(STD_TARGET
) test-sse2-M19937
43 ALL_SSE2_TARGET
= test-sse2-M521 test-sse2-M1279 test-sse2-M2203 \
44 test-sse2-M4253 test-sse2-M11213 test-sse2-M19937 test-sse2-M44497 \
45 test-sse2-M86243 test-sse2-M132049 test-sse2-M216091
46 # ==========================================================
47 # comment out or EDIT following lines to get max performance
48 # ==========================================================
49 # --------------------
51 # --------------------
52 #CCFLAGS += --param inline-unit-growth=500 \
53 #--param large-function-growth=900
54 # --------------------
56 # --------------------
57 #CC = icl /Wcheck /O3 /QxB /Qprefetch
58 # --------------------
60 # --------------------
62 #OPTI = -O3 -finline-functions -fomit-frame-pointer -DNDEBUG \
64 #CCFLAGS = $(OPTI) $(WARN) $(STD)
72 #CCFLAGS += -march=prescott
76 #CCFLAGS += -march=athlon64
78 .PHONY
: std-check sse2-check alti-check
87 ${MAKE} "ALTIFLAGS=${OSXALTIFLAGS}" alti
89 std-check
: ${ALL_STD_TARGET}
92 sse2-check
: ${ALL_SSE2_TARGET}
95 alti-check
: ${ALL_ALTI_TARGET}
99 make
"ALTIFLAGS=${OSXALTIFLAGS}" alti-check
101 test-std-M521
: test.c dSFMT.c dSFMT.h
102 ${CC} ${CCFLAGS} -DDSFMT_MEXP
=521 -o
$@ dSFMT.c
test.c
104 test-alti-M521
: test.c dSFMT.c dSFMT.h
105 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP
=521 -o
$@ dSFMT.c
test.c
107 test-sse2-M521
: test.c dSFMT.c dSFMT.h
108 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP
=521 -o
$@ dSFMT.c
test.c
110 test-std-M1279
: test.c dSFMT.c dSFMT.h
111 ${CC} ${CCFLAGS} -DDSFMT_MEXP
=1279 -o
$@ dSFMT.c
test.c
113 test-alti-M1279
: test.c dSFMT.c dSFMT.h
114 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP
=1279 -o
$@ dSFMT.c
test.c
116 test-sse2-M1279
: test.c dSFMT.c dSFMT.h
117 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP
=1279 -o
$@ dSFMT.c
test.c
119 test-std-M2203
: test.c dSFMT.c dSFMT.h
120 ${CC} ${CCFLAGS} -DDSFMT_MEXP
=2203 -o
$@ dSFMT.c
test.c
122 test-alti-M2203
: test.c dSFMT.c dSFMT.h
123 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP
=2203 -o
$@ dSFMT.c
test.c
125 test-sse2-M2203
: test.c dSFMT.c dSFMT.h
126 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP
=2203 -o
$@ dSFMT.c
test.c
128 test-std-M4253
: test.c dSFMT.c dSFMT.h
129 ${CC} ${CCFLAGS} -DDSFMT_MEXP
=4253 -o
$@ dSFMT.c
test.c
131 test-alti-M4253
: test.c dSFMT.c dSFMT.h
132 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP
=4253 -o
$@ dSFMT.c
test.c
134 test-sse2-M4253
: test.c dSFMT.c dSFMT.h
135 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP
=4253 -o
$@ dSFMT.c
test.c
137 test-std-M11213
: test.c dSFMT.c dSFMT.h
138 ${CC} ${CCFLAGS} -DDSFMT_MEXP
=11213 -o
$@ dSFMT.c
test.c
140 test-alti-M11213
: test.c dSFMT.c dSFMT.h
141 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP
=11213 -o
$@ dSFMT.c
test.c
143 test-sse2-M11213
: test.c dSFMT.c dSFMT.h
144 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP
=11213 -o
$@ dSFMT.c
test.c
146 test-std-M19937
: test.c dSFMT.c dSFMT.h
147 ${CC} ${CCFLAGS} -DDSFMT_MEXP
=19937 -o
$@ dSFMT.c
test.c
149 test-alti-M19937
: test.c dSFMT.c dSFMT.h
150 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP
=19937 -o
$@ dSFMT.c
test.c
152 test-sse2-M19937
: test.c dSFMT.c dSFMT.h
153 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP
=19937 -o
$@ dSFMT.c
test.c
155 test-std-M44497
: test.c dSFMT.c dSFMT.h
156 ${CC} ${CCFLAGS} -DDSFMT_MEXP
=44497 -o
$@ dSFMT.c
test.c
158 test-alti-M44497
: test.c dSFMT.c dSFMT.h
159 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP
=44497 -o
$@ dSFMT.c
test.c
161 test-sse2-M44497
: test.c dSFMT.c dSFMT.h
162 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP
=44497 -o
$@ dSFMT.c
test.c
164 test-std-M86243
: test.c dSFMT.c dSFMT.h
165 ${CC} ${CCFLAGS} -DDSFMT_MEXP
=86243 -o
$@ dSFMT.c
test.c
167 test-alti-M86243
: test.c dSFMT.c dSFMT.h
168 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP
=86243 -o
$@ dSFMT.c
test.c
170 test-sse2-M86243
: test.c dSFMT.c dSFMT.h
171 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP
=86243 -o
$@ dSFMT.c
test.c
173 test-std-M132049
: test.c dSFMT.c dSFMT.h
174 ${CC} ${CCFLAGS} -DDSFMT_MEXP
=132049 -o
$@ dSFMT.c
test.c
176 test-alti-M132049
: test.c dSFMT.c dSFMT.h
177 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP
=132049 -o
$@ dSFMT.c
test.c
179 test-sse2-M132049
: test.c dSFMT.c dSFMT.h
180 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP
=132049 -o
$@ dSFMT.c
test.c
182 test-std-M216091
: test.c dSFMT.c dSFMT.h
183 ${CC} ${CCFLAGS} -DDSFMT_MEXP
=216091 -o
$@ dSFMT.c
test.c
185 test-alti-M216091
: test.c dSFMT.c dSFMT.h
186 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP
=216091 -o
$@ dSFMT.c
test.c
188 test-sse2-M216091
: test.c dSFMT.c dSFMT.h
189 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP
=216091 -o
$@ dSFMT.c
test.c
192 ${CC} ${CCFLAGS} -c
$<
195 rm -f
*.o
*~ test-
*-M
*