]> git.proxmox.com Git - ceph.git/blame - ceph/src/isa-l/Makefile.nmake
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / isa-l / Makefile.nmake
CommitLineData
7c673cae
FG
1########################################################################
2# Copyright(c) 2011-2016 Intel Corporation All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions
6# are met:
7# * Redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer.
9# * Redistributions in binary form must reproduce the above copyright
10# notice, this list of conditions and the following disclaimer in
11# the documentation and/or other materials provided with the
12# distribution.
13# * Neither the name of Intel Corporation nor the names of its
14# contributors may be used to endorse or promote products derived
15# from this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28########################################################################
29
30objs = \
31 bin\ec_base.obj \
32 bin\ec_highlevel_func.obj \
33 bin\ec_multibinary.obj \
34 bin\gf_2vect_dot_prod_avx.obj \
35 bin\gf_2vect_dot_prod_avx2.obj \
36 bin\gf_2vect_dot_prod_avx512.obj \
37 bin\gf_2vect_dot_prod_sse.obj \
38 bin\gf_2vect_mad_avx.obj \
39 bin\gf_2vect_mad_avx2.obj \
40 bin\gf_2vect_mad_avx512.obj \
41 bin\gf_2vect_mad_sse.obj \
42 bin\gf_3vect_dot_prod_avx.obj \
43 bin\gf_3vect_dot_prod_avx2.obj \
44 bin\gf_3vect_dot_prod_avx512.obj \
45 bin\gf_3vect_dot_prod_sse.obj \
46 bin\gf_3vect_mad_avx.obj \
47 bin\gf_3vect_mad_avx2.obj \
48 bin\gf_3vect_mad_avx512.obj \
49 bin\gf_3vect_mad_sse.obj \
50 bin\gf_4vect_dot_prod_avx.obj \
51 bin\gf_4vect_dot_prod_avx2.obj \
52 bin\gf_4vect_dot_prod_avx512.obj \
53 bin\gf_4vect_dot_prod_sse.obj \
54 bin\gf_4vect_mad_avx.obj \
55 bin\gf_4vect_mad_avx2.obj \
56 bin\gf_4vect_mad_avx512.obj \
57 bin\gf_4vect_mad_sse.obj \
58 bin\gf_5vect_dot_prod_avx.obj \
59 bin\gf_5vect_dot_prod_avx2.obj \
60 bin\gf_5vect_dot_prod_sse.obj \
61 bin\gf_5vect_mad_avx.obj \
62 bin\gf_5vect_mad_avx2.obj \
63 bin\gf_5vect_mad_sse.obj \
64 bin\gf_6vect_dot_prod_avx.obj \
65 bin\gf_6vect_dot_prod_avx2.obj \
66 bin\gf_6vect_dot_prod_sse.obj \
67 bin\gf_6vect_mad_avx.obj \
68 bin\gf_6vect_mad_avx2.obj \
69 bin\gf_6vect_mad_sse.obj \
70 bin\gf_vect_dot_prod_avx.obj \
71 bin\gf_vect_dot_prod_avx2.obj \
72 bin\gf_vect_dot_prod_avx512.obj \
73 bin\gf_vect_dot_prod_sse.obj \
74 bin\gf_vect_mad_avx.obj \
75 bin\gf_vect_mad_avx2.obj \
76 bin\gf_vect_mad_avx512.obj \
77 bin\gf_vect_mad_sse.obj \
78 bin\gf_vect_mul_avx.obj \
79 bin\gf_vect_mul_sse.obj \
80 bin\pq_check_sse.obj \
81 bin\pq_gen_avx.obj \
82 bin\pq_gen_avx2.obj \
83 bin\pq_gen_sse.obj \
84 bin\raid_base.obj \
85 bin\raid_multibinary.obj \
86 bin\xor_check_sse.obj \
87 bin\xor_gen_avx.obj \
88 bin\xor_gen_sse.obj \
89 bin\crc16_t10dif_01.obj \
90 bin\crc16_t10dif_by4.obj \
91 bin\crc32_gzip.obj \
92 bin\crc32_ieee_01.obj \
93 bin\crc32_ieee_by4.obj \
94 bin\crc32_iscsi_00.obj \
95 bin\crc32_iscsi_01.obj \
96 bin\crc_base.obj \
97 bin\crc_data.obj \
98 bin\crc_multibinary.obj \
99 bin\huff_codes.obj \
100 bin\hufftables_c.obj \
101 bin\igzip.obj \
102 bin\igzip_base.obj \
103 bin\igzip_body_01.obj \
104 bin\igzip_body_04.obj \
105 bin\igzip_finish.obj \
106 bin\igzip_multibinary.obj \
107 bin\igzip_stateless_01.obj \
108 bin\igzip_stateless_04.obj \
109 bin\igzip_stateless_base.obj \
110 bin\crc_utils_01.obj \
111 bin\crc_utils_04.obj \
112 bin\detect_repeated_char.obj
113
114INCLUDES = -I./ -Ierasure_code/ -Iraid/ -Icrc/ -Iigzip/ -Iinclude/
115LINKFLAGS = /nologo
116CFLAGS = -O2 -D NDEBUG /nologo -D_USE_MATH_DEFINES -Qstd=c99 $(INCLUDES) $(D)
117AFLAGS = -f win64 $(INCLUDES) $(D)
118CC = icl
119AS = yasm
120
121lib: bin static dll
122static: bin isa-l_static.lib
123dll: bin isa-l.dll
124
125bin: ; -mkdir $@
126
127isa-l_static.lib: $(objs)
128 lib -out:$@ $?
129
130isa-l.dll: $(objs)
131 link -out:$@ -dll -def:isa-l.def $?
132
133{erasure_code}.c.obj:
134 $(CC) $(CFLAGS) /c -Fo$@ $?
135{erasure_code}.asm.obj:
136 $(AS) $(AFLAGS) -o $@ $?
137
138{raid}.c.obj:
139 $(CC) $(CFLAGS) /c -Fo$@ $?
140{raid}.asm.obj:
141 $(AS) $(AFLAGS) -o $@ $?
142
143{crc}.c.obj:
144 $(CC) $(CFLAGS) /c -Fo$@ $?
145{crc}.asm.obj:
146 $(AS) $(AFLAGS) -o $@ $?
147
148{igzip}.c.obj:
149 $(CC) $(CFLAGS) /c -Fo$@ $?
150{igzip}.asm.obj:
151 $(AS) $(AFLAGS) -o $@ $?
152
153
154# Examples
155ex = xor_example.exe crc_simple_test.exe igzip_example.exe igzip_sync_flush_example.exe
156ex: lib $(ex)
157
158$(ex): $(@B).obj
159
160.obj.exe:
161 link /out:$@ $(LINKFLAGS) isa-l.lib $?
162
163# Check tests
164checks = \
165 gf_vect_mul_test.exe \
166 erasure_code_test.exe \
167 gf_inverse_test.exe \
168 erasure_code_update_test.exe \
169 xor_gen_test.exe \
170 pq_gen_test.exe \
171 xor_check_test.exe \
172 pq_check_test.exe \
173 crc16_t10dif_test.exe \
174 crc32_ieee_test.exe \
175 crc32_iscsi_test.exe \
176 igzip_check.exe
177
178checks: lib $(checks)
179$(checks): $(@B).obj
180check: $(checks)
181 !$?
182
183# Unit tests
184tests = \
185 gf_vect_mul_sse_test.exe \
186 gf_vect_mul_avx_test.exe \
187 gf_vect_mul_base_test.exe \
188 gf_vect_dot_prod_sse_test.exe \
189 gf_vect_dot_prod_avx_test.exe \
190 gf_2vect_dot_prod_sse_test.exe \
191 gf_3vect_dot_prod_sse_test.exe \
192 gf_4vect_dot_prod_sse_test.exe \
193 gf_5vect_dot_prod_sse_test.exe \
194 gf_6vect_dot_prod_sse_test.exe \
195 gf_vect_dot_prod_base_test.exe \
196 gf_vect_dot_prod_test.exe \
197 gf_vect_mad_test.exe \
198 erasure_code_base_test.exe \
199 erasure_code_sse_test.exe \
200 igzip_rand_test.exe
201
202tests: lib $(tests)
203$(tests): $(@B).obj
204
205# Performance tests
206perfs = \
207 gf_vect_mul_perf.exe \
208 gf_vect_mul_sse_perf.exe \
209 gf_vect_mul_avx_perf.exe \
210 gf_vect_dot_prod_sse_perf.exe \
211 gf_vect_dot_prod_avx_perf.exe \
212 gf_2vect_dot_prod_sse_perf.exe \
213 gf_3vect_dot_prod_sse_perf.exe \
214 gf_4vect_dot_prod_sse_perf.exe \
215 gf_5vect_dot_prod_sse_perf.exe \
216 gf_6vect_dot_prod_sse_perf.exe \
217 gf_vect_dot_prod_perf.exe \
218 gf_vect_dot_prod_1tbl.exe \
219 gf_vect_mad_perf.exe \
220 erasure_code_perf.exe \
221 erasure_code_base_perf.exe \
222 erasure_code_sse_perf.exe \
223 erasure_code_update_perf.exe \
224 xor_gen_perf.exe \
225 pq_gen_perf.exe \
226 crc16_t10dif_perf.exe \
227 crc32_ieee_perf.exe \
228 crc32_iscsi_perf.exe \
229 igzip_perf.exe \
230 igzip_sync_flush_perf.exe
231
232perfs: lib $(perfs)
233$(perfs): $(@B).obj
234
235clean:
236 -if exist *.obj del *.obj
237 -if exist bin\*.obj del bin\*.obj
238 -if exist isa-l_static.lib del isa-l_static.lib
239 -if exist *.exe del *.exe
240 -if exist isa-l.lib del isa-l.lib
241 -if exist isa-l.dll del isa-l.dll
242
243zlib.lib:
244igzip_rand_test.exe: igzip_inflate_ref.obj
245igzip_inflate_perf.exe: igzip_inflate_ref.obj
246igzip_inflate_perf.exe: zlib.lib
247igzip_inflate_test.exe: igzip_inflate_ref.obj
248igzip_inflate_test.exe: zlib.lib
249igzip_check.exe: igzip_inflate_ref.obj