]>
Commit | Line | Data |
---|---|---|
7c673cae | 1 | ######################################################################## |
20effc67 | 2 | # Copyright(c) 2011-2017 Intel Corporation All rights reserved. |
7c673cae FG |
3 | # |
4 | # Redistribution and use in source and binary forms, with or without | |
f91f0fd5 | 5 | # modification, are permitted provided that the following conditions |
7c673cae FG |
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 | ||
20effc67 TL |
30 | # This file can be auto-regenerated with $make -f Makefile.unx Makefile.nmake |
31 | ||
32 | objs = \ | |
7c673cae | 33 | bin\ec_base.obj \ |
20effc67 TL |
34 | bin\raid_base.obj \ |
35 | bin\crc_base.obj \ | |
36 | bin\crc64_base.obj \ | |
37 | bin\igzip.obj \ | |
38 | bin\hufftables_c.obj \ | |
39 | bin\igzip_base.obj \ | |
40 | bin\igzip_icf_base.obj \ | |
41 | bin\adler32_base.obj \ | |
42 | bin\flatten_ll.obj \ | |
43 | bin\encode_df.obj \ | |
44 | bin\igzip_icf_body.obj \ | |
45 | bin\huff_codes.obj \ | |
46 | bin\igzip_inflate.obj \ | |
47 | bin\mem_zero_detect_base.obj \ | |
7c673cae | 48 | bin\ec_highlevel_func.obj \ |
20effc67 TL |
49 | bin\gf_vect_mul_sse.obj \ |
50 | bin\gf_vect_mul_avx.obj \ | |
51 | bin\gf_vect_dot_prod_sse.obj \ | |
52 | bin\gf_vect_dot_prod_avx.obj \ | |
53 | bin\gf_vect_dot_prod_avx2.obj \ | |
7c673cae | 54 | bin\gf_2vect_dot_prod_sse.obj \ |
7c673cae | 55 | bin\gf_3vect_dot_prod_sse.obj \ |
7c673cae | 56 | bin\gf_4vect_dot_prod_sse.obj \ |
7c673cae | 57 | bin\gf_5vect_dot_prod_sse.obj \ |
20effc67 TL |
58 | bin\gf_6vect_dot_prod_sse.obj \ |
59 | bin\gf_2vect_dot_prod_avx.obj \ | |
60 | bin\gf_3vect_dot_prod_avx.obj \ | |
61 | bin\gf_4vect_dot_prod_avx.obj \ | |
62 | bin\gf_5vect_dot_prod_avx.obj \ | |
7c673cae | 63 | bin\gf_6vect_dot_prod_avx.obj \ |
20effc67 TL |
64 | bin\gf_2vect_dot_prod_avx2.obj \ |
65 | bin\gf_3vect_dot_prod_avx2.obj \ | |
66 | bin\gf_4vect_dot_prod_avx2.obj \ | |
67 | bin\gf_5vect_dot_prod_avx2.obj \ | |
7c673cae | 68 | bin\gf_6vect_dot_prod_avx2.obj \ |
20effc67 TL |
69 | bin\gf_vect_mad_sse.obj \ |
70 | bin\gf_2vect_mad_sse.obj \ | |
71 | bin\gf_3vect_mad_sse.obj \ | |
72 | bin\gf_4vect_mad_sse.obj \ | |
73 | bin\gf_5vect_mad_sse.obj \ | |
7c673cae | 74 | bin\gf_6vect_mad_sse.obj \ |
7c673cae | 75 | bin\gf_vect_mad_avx.obj \ |
20effc67 TL |
76 | bin\gf_2vect_mad_avx.obj \ |
77 | bin\gf_3vect_mad_avx.obj \ | |
78 | bin\gf_4vect_mad_avx.obj \ | |
79 | bin\gf_5vect_mad_avx.obj \ | |
80 | bin\gf_6vect_mad_avx.obj \ | |
7c673cae | 81 | bin\gf_vect_mad_avx2.obj \ |
20effc67 TL |
82 | bin\gf_2vect_mad_avx2.obj \ |
83 | bin\gf_3vect_mad_avx2.obj \ | |
84 | bin\gf_4vect_mad_avx2.obj \ | |
85 | bin\gf_5vect_mad_avx2.obj \ | |
86 | bin\gf_6vect_mad_avx2.obj \ | |
87 | bin\ec_multibinary.obj \ | |
88 | bin\gf_vect_dot_prod_avx512.obj \ | |
89 | bin\gf_2vect_dot_prod_avx512.obj \ | |
90 | bin\gf_3vect_dot_prod_avx512.obj \ | |
91 | bin\gf_4vect_dot_prod_avx512.obj \ | |
92 | bin\gf_5vect_dot_prod_avx512.obj \ | |
93 | bin\gf_6vect_dot_prod_avx512.obj \ | |
7c673cae | 94 | bin\gf_vect_mad_avx512.obj \ |
20effc67 TL |
95 | bin\gf_2vect_mad_avx512.obj \ |
96 | bin\gf_3vect_mad_avx512.obj \ | |
97 | bin\gf_4vect_mad_avx512.obj \ | |
98 | bin\gf_5vect_mad_avx512.obj \ | |
99 | bin\gf_6vect_mad_avx512.obj \ | |
100 | bin\xor_gen_sse.obj \ | |
101 | bin\pq_gen_sse.obj \ | |
102 | bin\xor_check_sse.obj \ | |
7c673cae FG |
103 | bin\pq_check_sse.obj \ |
104 | bin\pq_gen_avx.obj \ | |
20effc67 | 105 | bin\xor_gen_avx.obj \ |
7c673cae | 106 | bin\pq_gen_avx2.obj \ |
20effc67 | 107 | bin\xor_gen_avx512.obj \ |
224ce89b | 108 | bin\pq_gen_avx512.obj \ |
7c673cae | 109 | bin\raid_multibinary.obj \ |
7c673cae FG |
110 | bin\crc16_t10dif_01.obj \ |
111 | bin\crc16_t10dif_by4.obj \ | |
f91f0fd5 | 112 | bin\crc16_t10dif_02.obj \ |
20effc67 | 113 | bin\crc16_t10dif_by16_10.obj \ |
f91f0fd5 TL |
114 | bin\crc16_t10dif_copy_by4.obj \ |
115 | bin\crc16_t10dif_copy_by4_02.obj \ | |
7c673cae | 116 | bin\crc32_ieee_01.obj \ |
f91f0fd5 | 117 | bin\crc32_ieee_02.obj \ |
7c673cae | 118 | bin\crc32_ieee_by4.obj \ |
20effc67 | 119 | bin\crc32_ieee_by16_10.obj \ |
7c673cae | 120 | bin\crc32_iscsi_01.obj \ |
20effc67 TL |
121 | bin\crc32_iscsi_00.obj \ |
122 | bin\crc32_iscsi_by16_10.obj \ | |
123 | bin\crc_multibinary.obj \ | |
124 | bin\crc64_multibinary.obj \ | |
224ce89b | 125 | bin\crc64_ecma_refl_by8.obj \ |
20effc67 TL |
126 | bin\crc64_ecma_refl_by16_10.obj \ |
127 | bin\crc64_ecma_norm_by8.obj \ | |
128 | bin\crc64_ecma_norm_by16_10.obj \ | |
224ce89b | 129 | bin\crc64_iso_refl_by8.obj \ |
20effc67 TL |
130 | bin\crc64_iso_refl_by16_10.obj \ |
131 | bin\crc64_iso_norm_by8.obj \ | |
132 | bin\crc64_iso_norm_by16_10.obj \ | |
224ce89b | 133 | bin\crc64_jones_refl_by8.obj \ |
20effc67 TL |
134 | bin\crc64_jones_refl_by16_10.obj \ |
135 | bin\crc64_jones_norm_by8.obj \ | |
136 | bin\crc64_jones_norm_by16_10.obj \ | |
137 | bin\crc32_gzip_refl_by8.obj \ | |
138 | bin\crc32_gzip_refl_by8_02.obj \ | |
139 | bin\crc32_gzip_refl_by16_10.obj \ | |
f91f0fd5 | 140 | bin\igzip_body.obj \ |
7c673cae | 141 | bin\igzip_finish.obj \ |
f91f0fd5 | 142 | bin\igzip_icf_body_h1_gr_bt.obj \ |
224ce89b | 143 | bin\igzip_icf_finish.obj \ |
224ce89b | 144 | bin\rfc1951_lookup.obj \ |
f91f0fd5 TL |
145 | bin\adler32_sse.obj \ |
146 | bin\adler32_avx2_4.obj \ | |
20effc67 TL |
147 | bin\igzip_multibinary.obj \ |
148 | bin\igzip_update_histogram_01.obj \ | |
149 | bin\igzip_update_histogram_04.obj \ | |
150 | bin\igzip_decode_block_stateless_01.obj \ | |
151 | bin\igzip_decode_block_stateless_04.obj \ | |
152 | bin\igzip_inflate_multibinary.obj \ | |
153 | bin\encode_df_04.obj \ | |
154 | bin\encode_df_06.obj \ | |
155 | bin\proc_heap.obj \ | |
f91f0fd5 | 156 | bin\igzip_deflate_hash.obj \ |
f91f0fd5 | 157 | bin\igzip_gen_icf_map_lh1_06.obj \ |
20effc67 | 158 | bin\igzip_gen_icf_map_lh1_04.obj \ |
f91f0fd5 TL |
159 | bin\igzip_set_long_icf_fg_04.obj \ |
160 | bin\igzip_set_long_icf_fg_06.obj \ | |
f91f0fd5 | 161 | bin\mem_zero_detect_avx.obj \ |
20effc67 TL |
162 | bin\mem_zero_detect_sse.obj \ |
163 | bin\mem_multibinary.obj | |
7c673cae | 164 | |
20effc67 TL |
165 | INCLUDES = -I./ -Ierasure_code/ -Iraid/ -Icrc/ -Iigzip/ -Iprograms/ -Imem/ -Iinclude/ -Itests/fuzz/ -Iexamples/ec/ |
166 | # Modern asm feature level, consider upgrading nasm/yasm before decreasing feature_level | |
167 | FEAT_FLAGS = -DHAVE_AS_KNOWS_AVX512 -DAS_FEATURE_LEVEL=10 | |
168 | CFLAGS_REL = -O2 -DNDEBUG /Z7 /MD /Gy | |
169 | CFLAGS_DBG = -Od -DDEBUG /Z7 /MDd | |
170 | LINKFLAGS = -nologo -incremental:no -debug | |
171 | CFLAGS = $(CFLAGS_REL) -nologo -D_USE_MATH_DEFINES $(FEAT_FLAGS) $(INCLUDES) $(D) | |
172 | AFLAGS = -f win64 $(FEAT_FLAGS) $(INCLUDES) $(D) | |
173 | CC = cl | |
174 | # or CC = icl -Qstd=c99 | |
175 | AS = nasm | |
7c673cae FG |
176 | |
177 | lib: bin static dll | |
178 | static: bin isa-l_static.lib | |
179 | dll: bin isa-l.dll | |
180 | ||
181 | bin: ; -mkdir $@ | |
182 | ||
183 | isa-l_static.lib: $(objs) | |
f91f0fd5 TL |
184 | lib -out:$@ @<< |
185 | $? | |
186 | << | |
7c673cae FG |
187 | |
188 | isa-l.dll: $(objs) | |
20effc67 | 189 | link -out:$@ -dll -def:isa-l.def $(LINKFLAGS) @<< |
f91f0fd5 TL |
190 | $? |
191 | << | |
7c673cae FG |
192 | |
193 | {erasure_code}.c.obj: | |
194 | $(CC) $(CFLAGS) /c -Fo$@ $? | |
195 | {erasure_code}.asm.obj: | |
196 | $(AS) $(AFLAGS) -o $@ $? | |
197 | ||
198 | {raid}.c.obj: | |
199 | $(CC) $(CFLAGS) /c -Fo$@ $? | |
200 | {raid}.asm.obj: | |
201 | $(AS) $(AFLAGS) -o $@ $? | |
202 | ||
203 | {crc}.c.obj: | |
204 | $(CC) $(CFLAGS) /c -Fo$@ $? | |
205 | {crc}.asm.obj: | |
206 | $(AS) $(AFLAGS) -o $@ $? | |
207 | ||
208 | {igzip}.c.obj: | |
209 | $(CC) $(CFLAGS) /c -Fo$@ $? | |
210 | {igzip}.asm.obj: | |
211 | $(AS) $(AFLAGS) -o $@ $? | |
212 | ||
20effc67 TL |
213 | {programs}.c.obj: |
214 | $(CC) $(CFLAGS) /c -Fo$@ $? | |
215 | {programs}.asm.obj: | |
216 | $(AS) $(AFLAGS) -o $@ $? | |
217 | ||
f91f0fd5 TL |
218 | {mem}.c.obj: |
219 | $(CC) $(CFLAGS) /c -Fo$@ $? | |
220 | {mem}.asm.obj: | |
221 | $(AS) $(AFLAGS) -o $@ $? | |
7c673cae | 222 | |
20effc67 | 223 | |
7c673cae | 224 | # Examples |
20effc67 TL |
225 | ex = \ |
226 | xor_example.exe \ | |
227 | crc_simple_test.exe \ | |
228 | crc64_example.exe \ | |
229 | igzip_example.exe \ | |
230 | igzip_sync_flush_example.exe \ | |
231 | ec_simple_example.exe \ | |
232 | ec_piggyback_example.exe | |
233 | ||
7c673cae FG |
234 | ex: lib $(ex) |
235 | ||
236 | $(ex): $(@B).obj | |
237 | ||
238 | .obj.exe: | |
239 | link /out:$@ $(LINKFLAGS) isa-l.lib $? | |
240 | ||
241 | # Check tests | |
242 | checks = \ | |
243 | gf_vect_mul_test.exe \ | |
244 | erasure_code_test.exe \ | |
245 | gf_inverse_test.exe \ | |
246 | erasure_code_update_test.exe \ | |
247 | xor_gen_test.exe \ | |
248 | pq_gen_test.exe \ | |
249 | xor_check_test.exe \ | |
250 | pq_check_test.exe \ | |
251 | crc16_t10dif_test.exe \ | |
f91f0fd5 | 252 | crc16_t10dif_copy_test.exe \ |
224ce89b | 253 | crc64_funcs_test.exe \ |
20effc67 | 254 | crc32_funcs_test.exe \ |
f91f0fd5 | 255 | igzip_rand_test.exe \ |
20effc67 TL |
256 | igzip_wrapper_hdr_test.exe \ |
257 | checksum32_funcs_test.exe \ | |
f91f0fd5 | 258 | mem_zero_detect_test.exe |
7c673cae FG |
259 | |
260 | checks: lib $(checks) | |
261 | $(checks): $(@B).obj | |
262 | check: $(checks) | |
263 | !$? | |
264 | ||
265 | # Unit tests | |
266 | tests = \ | |
7c673cae | 267 | gf_vect_mul_base_test.exe \ |
7c673cae FG |
268 | gf_vect_dot_prod_base_test.exe \ |
269 | gf_vect_dot_prod_test.exe \ | |
270 | gf_vect_mad_test.exe \ | |
224ce89b | 271 | erasure_code_base_test.exe |
7c673cae FG |
272 | |
273 | tests: lib $(tests) | |
274 | $(tests): $(@B).obj | |
275 | ||
276 | # Performance tests | |
277 | perfs = \ | |
278 | gf_vect_mul_perf.exe \ | |
7c673cae FG |
279 | gf_vect_dot_prod_perf.exe \ |
280 | gf_vect_dot_prod_1tbl.exe \ | |
7c673cae FG |
281 | erasure_code_perf.exe \ |
282 | erasure_code_base_perf.exe \ | |
7c673cae FG |
283 | erasure_code_update_perf.exe \ |
284 | xor_gen_perf.exe \ | |
285 | pq_gen_perf.exe \ | |
286 | crc16_t10dif_perf.exe \ | |
20effc67 TL |
287 | crc16_t10dif_copy_perf.exe \ |
288 | crc16_t10dif_op_perf.exe \ | |
7c673cae FG |
289 | crc32_ieee_perf.exe \ |
290 | crc32_iscsi_perf.exe \ | |
20effc67 | 291 | crc64_funcs_perf.exe \ |
f91f0fd5 | 292 | crc32_gzip_refl_perf.exe \ |
20effc67 | 293 | adler32_perf.exe \ |
f91f0fd5 | 294 | mem_zero_detect_perf.exe |
7c673cae FG |
295 | |
296 | perfs: lib $(perfs) | |
297 | $(perfs): $(@B).obj | |
298 | ||
20effc67 TL |
299 | progs = \ |
300 | igzip.exe | |
301 | ||
302 | progs: lib $(progs) | |
303 | igzip.exe: programs\igzip_cli.obj | |
304 | link /out:$@ $(LINKFLAGS) isa-l.lib $? | |
305 | ||
7c673cae FG |
306 | clean: |
307 | -if exist *.obj del *.obj | |
308 | -if exist bin\*.obj del bin\*.obj | |
309 | -if exist isa-l_static.lib del isa-l_static.lib | |
310 | -if exist *.exe del *.exe | |
20effc67 | 311 | -if exist *.pdb del *.pdb |
7c673cae FG |
312 | -if exist isa-l.lib del isa-l.lib |
313 | -if exist isa-l.dll del isa-l.dll | |
20effc67 | 314 | -if exist isa-l.exp del isa-l.exp |
7c673cae FG |
315 | |
316 | zlib.lib: | |
20effc67 | 317 | igzip_perf.exe: zlib.lib |
7c673cae | 318 | igzip_inflate_test.exe: zlib.lib |