]> git.proxmox.com Git - ceph.git/blob - ceph/src/isa-l/Makefile.nmake
update sources to v12.1.1
[ceph.git] / ceph / src / isa-l / Makefile.nmake
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
30 objs = \
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_avx512.obj \
84 bin\pq_gen_sse.obj \
85 bin\raid_base.obj \
86 bin\raid_multibinary.obj \
87 bin\xor_check_sse.obj \
88 bin\xor_gen_avx.obj \
89 bin\xor_gen_avx512.obj \
90 bin\xor_gen_sse.obj \
91 bin\crc16_t10dif_01.obj \
92 bin\crc16_t10dif_by4.obj \
93 bin\crc32_gzip.obj \
94 bin\crc32_ieee_01.obj \
95 bin\crc32_ieee_by4.obj \
96 bin\crc32_iscsi_00.obj \
97 bin\crc32_iscsi_01.obj \
98 bin\crc64_base.obj \
99 bin\crc64_ecma_norm_by8.obj \
100 bin\crc64_ecma_refl_by8.obj \
101 bin\crc64_iso_norm_by8.obj \
102 bin\crc64_iso_refl_by8.obj \
103 bin\crc64_jones_norm_by8.obj \
104 bin\crc64_jones_refl_by8.obj \
105 bin\crc64_multibinary.obj \
106 bin\crc_base.obj \
107 bin\crc32_gzip_base.obj \
108 bin\crc_multibinary.obj \
109 bin\huff_codes.obj \
110 bin\hufftables_c.obj \
111 bin\igzip.obj \
112 bin\igzip_base.obj \
113 bin\igzip_body_01.obj \
114 bin\igzip_body_02.obj \
115 bin\igzip_body_04.obj \
116 bin\igzip_decode_block_stateless_01.obj \
117 bin\igzip_decode_block_stateless_04.obj \
118 bin\igzip_finish.obj \
119 bin\flatten_ll.obj \
120 bin\encode_df.obj \
121 bin\encode_df_04.obj \
122 bin\proc_heap.obj \
123 bin\igzip_icf_body_01.obj \
124 bin\igzip_icf_body_02.obj \
125 bin\igzip_icf_body_04.obj \
126 bin\igzip_icf_finish.obj \
127 bin\igzip_icf_base.obj \
128 bin\igzip_inflate.obj \
129 bin\igzip_inflate_multibinary.obj \
130 bin\igzip_multibinary.obj \
131 bin\igzip_update_histogram_01.obj \
132 bin\igzip_update_histogram_04.obj \
133 bin\rfc1951_lookup.obj \
134 bin\detect_repeated_char.obj
135
136 INCLUDES = -I./ -Ierasure_code/ -Iraid/ -Icrc/ -Iigzip/ -Iinclude/
137 LINKFLAGS = /nologo
138 CFLAGS = -O2 -D NDEBUG /nologo -D_USE_MATH_DEFINES -Qstd=c99 $(INCLUDES) $(D)
139 AFLAGS = -f win64 $(INCLUDES) $(D)
140 CC = icl
141 AS = yasm
142
143 lib: bin static dll
144 static: bin isa-l_static.lib
145 dll: bin isa-l.dll
146
147 bin: ; -mkdir $@
148
149 isa-l_static.lib: $(objs)
150 lib -out:$@ $?
151
152 isa-l.dll: $(objs)
153 link -out:$@ -dll -def:isa-l.def $?
154
155 {erasure_code}.c.obj:
156 $(CC) $(CFLAGS) /c -Fo$@ $?
157 {erasure_code}.asm.obj:
158 $(AS) $(AFLAGS) -o $@ $?
159
160 {raid}.c.obj:
161 $(CC) $(CFLAGS) /c -Fo$@ $?
162 {raid}.asm.obj:
163 $(AS) $(AFLAGS) -o $@ $?
164
165 {crc}.c.obj:
166 $(CC) $(CFLAGS) /c -Fo$@ $?
167 {crc}.asm.obj:
168 $(AS) $(AFLAGS) -o $@ $?
169
170 {igzip}.c.obj:
171 $(CC) $(CFLAGS) /c -Fo$@ $?
172 {igzip}.asm.obj:
173 $(AS) $(AFLAGS) -o $@ $?
174
175
176 # Examples
177 ex = xor_example.exe crc_simple_test.exe igzip_example.exe igzip_sync_flush_example.exe
178 ex: lib $(ex)
179
180 $(ex): $(@B).obj
181
182 .obj.exe:
183 link /out:$@ $(LINKFLAGS) isa-l.lib $?
184
185 # Check tests
186 checks = \
187 gf_vect_mul_test.exe \
188 erasure_code_test.exe \
189 gf_inverse_test.exe \
190 erasure_code_update_test.exe \
191 xor_gen_test.exe \
192 pq_gen_test.exe \
193 xor_check_test.exe \
194 pq_check_test.exe \
195 crc16_t10dif_test.exe \
196 crc32_ieee_test.exe \
197 crc32_iscsi_test.exe \
198 crc64_funcs_test.exe \
199 igzip_rand_test.exe
200
201 checks: lib $(checks)
202 $(checks): $(@B).obj
203 check: $(checks)
204 !$?
205
206 # Unit tests
207 tests = \
208 gf_vect_mul_base_test.exe \
209 gf_vect_dot_prod_base_test.exe \
210 gf_vect_dot_prod_test.exe \
211 gf_vect_mad_test.exe \
212 erasure_code_base_test.exe
213
214 tests: lib $(tests)
215 $(tests): $(@B).obj
216
217 # Performance tests
218 perfs = \
219 gf_vect_mul_perf.exe \
220 gf_vect_mul_sse_perf.exe \
221 gf_vect_mul_avx_perf.exe \
222 gf_vect_dot_prod_sse_perf.exe \
223 gf_vect_dot_prod_avx_perf.exe \
224 gf_2vect_dot_prod_sse_perf.exe \
225 gf_3vect_dot_prod_sse_perf.exe \
226 gf_4vect_dot_prod_sse_perf.exe \
227 gf_5vect_dot_prod_sse_perf.exe \
228 gf_6vect_dot_prod_sse_perf.exe \
229 gf_vect_dot_prod_perf.exe \
230 gf_vect_dot_prod_1tbl.exe \
231 gf_vect_mad_perf.exe \
232 erasure_code_perf.exe \
233 erasure_code_base_perf.exe \
234 erasure_code_sse_perf.exe \
235 erasure_code_update_perf.exe \
236 xor_gen_perf.exe \
237 pq_gen_perf.exe \
238 crc16_t10dif_perf.exe \
239 crc32_ieee_perf.exe \
240 crc32_iscsi_perf.exe \
241 igzip_perf.exe \
242 igzip_sync_flush_perf.exe
243
244 perfs: lib $(perfs)
245 $(perfs): $(@B).obj
246
247 clean:
248 -if exist *.obj del *.obj
249 -if exist bin\*.obj del bin\*.obj
250 -if exist isa-l_static.lib del isa-l_static.lib
251 -if exist *.exe del *.exe
252 -if exist isa-l.lib del isa-l.lib
253 -if exist isa-l.dll del isa-l.dll
254
255 zlib.lib:
256 igzip_inflate_perf.exe: zlib.lib
257 igzip_inflate_test.exe: zlib.lib