source: Daodan/MSVC/dSFMT/Makefile@ 831

Last change on this file since 831 was 567, checked in by gumby, 14 years ago

Daodan MSVC

File size: 6.2 KB
RevLine 
[567]1# @file Makefile
2# @brief Makefile
3#
4# @author Mutsuo Saito (Hiroshima University)
5# @author Makoto Matsumoto (Hiroshima University)
6#
7# Copyright (C) 2007, 2008 Mutsuo Saito, Makoto Matsumoto and
8# Hiroshima University. All rights reserved.
9#
10# The new BSD License is applied to this software.
11# see LICENSE.txt
12#
13# @note
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.
19
20WARN = -Wmissing-prototypes -Wall #-Winline
21#WARN = -Wmissing-prototypes -Wall -W
22OPTI = -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
25#STD =
26#STD = -std=c89 -pedantic
27#STD = -std=c99 -pedantic
28STD = -std=c99
29CC = gcc
30CCFLAGS = $(OPTI) $(WARN) $(STD)
31ALTIFLAGS = -mabi=altivec -maltivec -DHAVE_ALTIVEC
32OSXALTIFLAGS = -faltivec -maltivec -DHAVE_ALTIVEC
33SSE2FLAGS = -msse2 -DHAVE_SSE2
34STD_TARGET = test-std-M19937
35ALL_STD_TARGET = test-std-M521 test-std-M1279 test-std-M2203 test-std-M4253 \
36test-std-M11213 test-std-M19937 test-std-M44497 test-std-M86243 \
37test-std-M132049 test-std-M216091
38ALTI_TARGET = $(STD_TARGET) test-alti-M19937
39ALL_ALTI_TARGET = test-alti-M521 test-alti-M1279 test-alti-M2203 \
40test-alti-M4253 test-alti-M11213 test-alti-M19937 test-alti-M44497 \
41test-alti-M86243 test-alti-M132049 test-alti-M216091
42SSE2_TARGET = $(STD_TARGET) test-sse2-M19937
43ALL_SSE2_TARGET = test-sse2-M521 test-sse2-M1279 test-sse2-M2203 \
44test-sse2-M4253 test-sse2-M11213 test-sse2-M19937 test-sse2-M44497 \
45test-sse2-M86243 test-sse2-M132049 test-sse2-M216091
46# ==========================================================
47# comment out or EDIT following lines to get max performance
48# ==========================================================
49# --------------------
50# for gcc 4
51# --------------------
52#CCFLAGS += --param inline-unit-growth=500 \
53#--param large-function-growth=900
54# --------------------
55# for icl
56# --------------------
57#CC = icl /Wcheck /O3 /QxB /Qprefetch
58# --------------------
59# for icc
60# --------------------
61#CC = icc
62#OPTI = -O3 -finline-functions -fomit-frame-pointer -DNDEBUG \
63#-fno-strict-aliasing
64#CCFLAGS = $(OPTI) $(WARN) $(STD)
65# -----------------
66# for PowerPC
67# -----------------
68#CCFLAGS += -arch ppc
69# -----------------
70# for Pentium M
71# -----------------
72#CCFLAGS += -march=prescott
73# -----------------
74# for Athlon 64
75# -----------------
76#CCFLAGS += -march=athlon64
77
78.PHONY: std-check sse2-check alti-check
79
80std: ${STD_TARGET}
81
82sse2: ${SSE2_TARGET}
83
84alti: ${ALTI_TARGET}
85
86osx-alti:
87 ${MAKE} "ALTIFLAGS=${OSXALTIFLAGS}" alti
88
89std-check: ${ALL_STD_TARGET}
90 ./check.sh test-std
91
92sse2-check: ${ALL_SSE2_TARGET}
93 ./check.sh test-sse2
94
95alti-check: ${ALL_ALTI_TARGET}
96 ./check.sh test-alti
97
98osx-alti-check:
99 make "ALTIFLAGS=${OSXALTIFLAGS}" alti-check
100
101test-std-M521: test.c dSFMT.c dSFMT.h
102 ${CC} ${CCFLAGS} -DDSFMT_MEXP=521 -o $@ dSFMT.c test.c
103
104test-alti-M521: test.c dSFMT.c dSFMT.h
105 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP=521 -o $@ dSFMT.c test.c
106
107test-sse2-M521: test.c dSFMT.c dSFMT.h
108 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP=521 -o $@ dSFMT.c test.c
109
110test-std-M1279: test.c dSFMT.c dSFMT.h
111 ${CC} ${CCFLAGS} -DDSFMT_MEXP=1279 -o $@ dSFMT.c test.c
112
113test-alti-M1279: test.c dSFMT.c dSFMT.h
114 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP=1279 -o $@ dSFMT.c test.c
115
116test-sse2-M1279: test.c dSFMT.c dSFMT.h
117 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP=1279 -o $@ dSFMT.c test.c
118
119test-std-M2203: test.c dSFMT.c dSFMT.h
120 ${CC} ${CCFLAGS} -DDSFMT_MEXP=2203 -o $@ dSFMT.c test.c
121
122test-alti-M2203: test.c dSFMT.c dSFMT.h
123 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP=2203 -o $@ dSFMT.c test.c
124
125test-sse2-M2203: test.c dSFMT.c dSFMT.h
126 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP=2203 -o $@ dSFMT.c test.c
127
128test-std-M4253: test.c dSFMT.c dSFMT.h
129 ${CC} ${CCFLAGS} -DDSFMT_MEXP=4253 -o $@ dSFMT.c test.c
130
131test-alti-M4253: test.c dSFMT.c dSFMT.h
132 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP=4253 -o $@ dSFMT.c test.c
133
134test-sse2-M4253: test.c dSFMT.c dSFMT.h
135 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP=4253 -o $@ dSFMT.c test.c
136
137test-std-M11213: test.c dSFMT.c dSFMT.h
138 ${CC} ${CCFLAGS} -DDSFMT_MEXP=11213 -o $@ dSFMT.c test.c
139
140test-alti-M11213: test.c dSFMT.c dSFMT.h
141 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP=11213 -o $@ dSFMT.c test.c
142
143test-sse2-M11213: test.c dSFMT.c dSFMT.h
144 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP=11213 -o $@ dSFMT.c test.c
145
146test-std-M19937: test.c dSFMT.c dSFMT.h
147 ${CC} ${CCFLAGS} -DDSFMT_MEXP=19937 -o $@ dSFMT.c test.c
148
149test-alti-M19937: test.c dSFMT.c dSFMT.h
150 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP=19937 -o $@ dSFMT.c test.c
151
152test-sse2-M19937: test.c dSFMT.c dSFMT.h
153 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP=19937 -o $@ dSFMT.c test.c
154
155test-std-M44497: test.c dSFMT.c dSFMT.h
156 ${CC} ${CCFLAGS} -DDSFMT_MEXP=44497 -o $@ dSFMT.c test.c
157
158test-alti-M44497: test.c dSFMT.c dSFMT.h
159 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP=44497 -o $@ dSFMT.c test.c
160
161test-sse2-M44497: test.c dSFMT.c dSFMT.h
162 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP=44497 -o $@ dSFMT.c test.c
163
164test-std-M86243: test.c dSFMT.c dSFMT.h
165 ${CC} ${CCFLAGS} -DDSFMT_MEXP=86243 -o $@ dSFMT.c test.c
166
167test-alti-M86243: test.c dSFMT.c dSFMT.h
168 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP=86243 -o $@ dSFMT.c test.c
169
170test-sse2-M86243: test.c dSFMT.c dSFMT.h
171 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP=86243 -o $@ dSFMT.c test.c
172
173test-std-M132049: test.c dSFMT.c dSFMT.h
174 ${CC} ${CCFLAGS} -DDSFMT_MEXP=132049 -o $@ dSFMT.c test.c
175
176test-alti-M132049: test.c dSFMT.c dSFMT.h
177 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP=132049 -o $@ dSFMT.c test.c
178
179test-sse2-M132049: test.c dSFMT.c dSFMT.h
180 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP=132049 -o $@ dSFMT.c test.c
181
182test-std-M216091: test.c dSFMT.c dSFMT.h
183 ${CC} ${CCFLAGS} -DDSFMT_MEXP=216091 -o $@ dSFMT.c test.c
184
185test-alti-M216091: test.c dSFMT.c dSFMT.h
186 ${CC} ${CCFLAGS} ${ALTIFLAGS} -DDSFMT_MEXP=216091 -o $@ dSFMT.c test.c
187
188test-sse2-M216091: test.c dSFMT.c dSFMT.h
189 ${CC} ${CCFLAGS} ${SSE2FLAGS} -DDSFMT_MEXP=216091 -o $@ dSFMT.c test.c
190
191.c.o:
192 ${CC} ${CCFLAGS} -c $<
193
194clean:
195 rm -f *.o *~ test-*-M*
Note: See TracBrowser for help on using the repository browser.