1 |
|
---|
2 | #=============================================================================
|
---|
3 | #
|
---|
4 | # This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic
|
---|
5 | # Package, Release 3e, by John R. Hauser.
|
---|
6 | #
|
---|
7 | # Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
|
---|
8 | # University of California. All rights reserved.
|
---|
9 | #
|
---|
10 | # Redistribution and use in source and binary forms, with or without
|
---|
11 | # modification, are permitted provided that the following conditions are met:
|
---|
12 | #
|
---|
13 | # 1. Redistributions of source code must retain the above copyright notice,
|
---|
14 | # this list of conditions, and the following disclaimer.
|
---|
15 | #
|
---|
16 | # 2. Redistributions in binary form must reproduce the above copyright
|
---|
17 | # notice, this list of conditions, and the following disclaimer in the
|
---|
18 | # documentation and/or other materials provided with the distribution.
|
---|
19 | #
|
---|
20 | # 3. Neither the name of the University nor the names of its contributors
|
---|
21 | # may be used to endorse or promote products derived from this software
|
---|
22 | # without specific prior written permission.
|
---|
23 | #
|
---|
24 | # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
|
---|
25 | # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
---|
26 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
|
---|
27 | # DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
|
---|
28 | # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
---|
29 | # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
---|
30 | # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
---|
31 | # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
32 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
33 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
34 | #
|
---|
35 | #=============================================================================
|
---|
36 |
|
---|
37 | SOURCE_DIR ?= ../../source
|
---|
38 | SPECIALIZE_TYPE ?= ARM-VFPv2
|
---|
39 |
|
---|
40 | SOFTFLOAT_OPTS ?= -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5
|
---|
41 |
|
---|
42 | DELETE = rm -f
|
---|
43 | C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include
|
---|
44 | COMPILE_C = \
|
---|
45 | gcc -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \
|
---|
46 | $(C_INCLUDES) -O2 -o $@
|
---|
47 | MAKELIB = ar crs $@
|
---|
48 |
|
---|
49 | OBJ = .o
|
---|
50 | LIB = .a
|
---|
51 |
|
---|
52 | OTHER_HEADERS =
|
---|
53 |
|
---|
54 | .PHONY: all
|
---|
55 | all: softfloat$(LIB)
|
---|
56 |
|
---|
57 | OBJS_PRIMITIVES = \
|
---|
58 | s_compare96M$(OBJ) \
|
---|
59 | s_compare128M$(OBJ) \
|
---|
60 | s_shortShiftLeft64To96M$(OBJ) \
|
---|
61 | s_shortShiftLeftM$(OBJ) \
|
---|
62 | s_shiftLeftM$(OBJ) \
|
---|
63 | s_shortShiftRightM$(OBJ) \
|
---|
64 | s_shortShiftRightJam64$(OBJ) \
|
---|
65 | s_shortShiftRightJamM$(OBJ) \
|
---|
66 | s_shiftRightJam32$(OBJ) \
|
---|
67 | s_shiftRightJam64$(OBJ) \
|
---|
68 | s_shiftRightJamM$(OBJ) \
|
---|
69 | s_shiftRightM$(OBJ) \
|
---|
70 | s_countLeadingZeros8$(OBJ) \
|
---|
71 | s_countLeadingZeros16$(OBJ) \
|
---|
72 | s_countLeadingZeros32$(OBJ) \
|
---|
73 | s_countLeadingZeros64$(OBJ) \
|
---|
74 | s_addM$(OBJ) \
|
---|
75 | s_addCarryM$(OBJ) \
|
---|
76 | s_addComplCarryM$(OBJ) \
|
---|
77 | s_negXM$(OBJ) \
|
---|
78 | s_sub1XM$(OBJ) \
|
---|
79 | s_subM$(OBJ) \
|
---|
80 | s_mul64To128M$(OBJ) \
|
---|
81 | s_mul128MTo256M$(OBJ) \
|
---|
82 | s_approxRecip_1Ks$(OBJ) \
|
---|
83 | s_approxRecip32_1$(OBJ) \
|
---|
84 | s_approxRecipSqrt_1Ks$(OBJ) \
|
---|
85 | s_approxRecipSqrt32_1$(OBJ) \
|
---|
86 | s_remStepMBy32$(OBJ) \
|
---|
87 |
|
---|
88 | OBJS_SPECIALIZE = \
|
---|
89 | softfloat_raiseFlags$(OBJ) \
|
---|
90 | s_f16UIToCommonNaN$(OBJ) \
|
---|
91 | s_commonNaNToF16UI$(OBJ) \
|
---|
92 | s_propagateNaNF16UI$(OBJ) \
|
---|
93 | s_f32UIToCommonNaN$(OBJ) \
|
---|
94 | s_commonNaNToF32UI$(OBJ) \
|
---|
95 | s_propagateNaNF32UI$(OBJ) \
|
---|
96 | s_f64UIToCommonNaN$(OBJ) \
|
---|
97 | s_commonNaNToF64UI$(OBJ) \
|
---|
98 | s_propagateNaNF64UI$(OBJ) \
|
---|
99 | extF80M_isSignalingNaN$(OBJ) \
|
---|
100 | s_extF80MToCommonNaN$(OBJ) \
|
---|
101 | s_commonNaNToExtF80M$(OBJ) \
|
---|
102 | s_propagateNaNExtF80M$(OBJ) \
|
---|
103 | f128M_isSignalingNaN$(OBJ) \
|
---|
104 | s_f128MToCommonNaN$(OBJ) \
|
---|
105 | s_commonNaNToF128M$(OBJ) \
|
---|
106 | s_propagateNaNF128M$(OBJ) \
|
---|
107 |
|
---|
108 | OBJS_OTHERS = \
|
---|
109 | s_roundToUI32$(OBJ) \
|
---|
110 | s_roundMToUI64$(OBJ) \
|
---|
111 | s_roundToI32$(OBJ) \
|
---|
112 | s_roundMToI64$(OBJ) \
|
---|
113 | s_normSubnormalF16Sig$(OBJ) \
|
---|
114 | s_roundPackToF16$(OBJ) \
|
---|
115 | s_normRoundPackToF16$(OBJ) \
|
---|
116 | s_addMagsF16$(OBJ) \
|
---|
117 | s_subMagsF16$(OBJ) \
|
---|
118 | s_mulAddF16$(OBJ) \
|
---|
119 | s_normSubnormalF32Sig$(OBJ) \
|
---|
120 | s_roundPackToF32$(OBJ) \
|
---|
121 | s_normRoundPackToF32$(OBJ) \
|
---|
122 | s_addMagsF32$(OBJ) \
|
---|
123 | s_subMagsF32$(OBJ) \
|
---|
124 | s_mulAddF32$(OBJ) \
|
---|
125 | s_normSubnormalF64Sig$(OBJ) \
|
---|
126 | s_roundPackToF64$(OBJ) \
|
---|
127 | s_normRoundPackToF64$(OBJ) \
|
---|
128 | s_addMagsF64$(OBJ) \
|
---|
129 | s_subMagsF64$(OBJ) \
|
---|
130 | s_mulAddF64$(OBJ) \
|
---|
131 | s_tryPropagateNaNExtF80M$(OBJ) \
|
---|
132 | s_invalidExtF80M$(OBJ) \
|
---|
133 | s_normExtF80SigM$(OBJ) \
|
---|
134 | s_roundPackMToExtF80M$(OBJ) \
|
---|
135 | s_normRoundPackMToExtF80M$(OBJ) \
|
---|
136 | s_addExtF80M$(OBJ) \
|
---|
137 | s_compareNonnormExtF80M$(OBJ) \
|
---|
138 | s_isNaNF128M$(OBJ) \
|
---|
139 | s_tryPropagateNaNF128M$(OBJ) \
|
---|
140 | s_invalidF128M$(OBJ) \
|
---|
141 | s_shiftNormSigF128M$(OBJ) \
|
---|
142 | s_roundPackMToF128M$(OBJ) \
|
---|
143 | s_normRoundPackMToF128M$(OBJ) \
|
---|
144 | s_addF128M$(OBJ) \
|
---|
145 | s_mulAddF128M$(OBJ) \
|
---|
146 | softfloat_state$(OBJ) \
|
---|
147 | ui32_to_f16$(OBJ) \
|
---|
148 | ui32_to_f32$(OBJ) \
|
---|
149 | ui32_to_f64$(OBJ) \
|
---|
150 | ui32_to_extF80M$(OBJ) \
|
---|
151 | ui32_to_f128M$(OBJ) \
|
---|
152 | ui64_to_f16$(OBJ) \
|
---|
153 | ui64_to_f32$(OBJ) \
|
---|
154 | ui64_to_f64$(OBJ) \
|
---|
155 | ui64_to_extF80M$(OBJ) \
|
---|
156 | ui64_to_f128M$(OBJ) \
|
---|
157 | i32_to_f16$(OBJ) \
|
---|
158 | i32_to_f32$(OBJ) \
|
---|
159 | i32_to_f64$(OBJ) \
|
---|
160 | i32_to_extF80M$(OBJ) \
|
---|
161 | i32_to_f128M$(OBJ) \
|
---|
162 | i64_to_f16$(OBJ) \
|
---|
163 | i64_to_f32$(OBJ) \
|
---|
164 | i64_to_f64$(OBJ) \
|
---|
165 | i64_to_extF80M$(OBJ) \
|
---|
166 | i64_to_f128M$(OBJ) \
|
---|
167 | f16_to_ui32$(OBJ) \
|
---|
168 | f16_to_ui64$(OBJ) \
|
---|
169 | f16_to_i32$(OBJ) \
|
---|
170 | f16_to_i64$(OBJ) \
|
---|
171 | f16_to_ui32_r_minMag$(OBJ) \
|
---|
172 | f16_to_ui64_r_minMag$(OBJ) \
|
---|
173 | f16_to_i32_r_minMag$(OBJ) \
|
---|
174 | f16_to_i64_r_minMag$(OBJ) \
|
---|
175 | f16_to_f32$(OBJ) \
|
---|
176 | f16_to_f64$(OBJ) \
|
---|
177 | f16_to_extF80M$(OBJ) \
|
---|
178 | f16_to_f128M$(OBJ) \
|
---|
179 | f16_roundToInt$(OBJ) \
|
---|
180 | f16_add$(OBJ) \
|
---|
181 | f16_sub$(OBJ) \
|
---|
182 | f16_mul$(OBJ) \
|
---|
183 | f16_mulAdd$(OBJ) \
|
---|
184 | f16_div$(OBJ) \
|
---|
185 | f16_rem$(OBJ) \
|
---|
186 | f16_sqrt$(OBJ) \
|
---|
187 | f16_eq$(OBJ) \
|
---|
188 | f16_le$(OBJ) \
|
---|
189 | f16_lt$(OBJ) \
|
---|
190 | f16_eq_signaling$(OBJ) \
|
---|
191 | f16_le_quiet$(OBJ) \
|
---|
192 | f16_lt_quiet$(OBJ) \
|
---|
193 | f16_isSignalingNaN$(OBJ) \
|
---|
194 | f32_to_ui32$(OBJ) \
|
---|
195 | f32_to_ui64$(OBJ) \
|
---|
196 | f32_to_i32$(OBJ) \
|
---|
197 | f32_to_i64$(OBJ) \
|
---|
198 | f32_to_ui32_r_minMag$(OBJ) \
|
---|
199 | f32_to_ui64_r_minMag$(OBJ) \
|
---|
200 | f32_to_i32_r_minMag$(OBJ) \
|
---|
201 | f32_to_i64_r_minMag$(OBJ) \
|
---|
202 | f32_to_f16$(OBJ) \
|
---|
203 | f32_to_f64$(OBJ) \
|
---|
204 | f32_to_extF80M$(OBJ) \
|
---|
205 | f32_to_f128M$(OBJ) \
|
---|
206 | f32_roundToInt$(OBJ) \
|
---|
207 | f32_add$(OBJ) \
|
---|
208 | f32_sub$(OBJ) \
|
---|
209 | f32_mul$(OBJ) \
|
---|
210 | f32_mulAdd$(OBJ) \
|
---|
211 | f32_div$(OBJ) \
|
---|
212 | f32_rem$(OBJ) \
|
---|
213 | f32_sqrt$(OBJ) \
|
---|
214 | f32_eq$(OBJ) \
|
---|
215 | f32_le$(OBJ) \
|
---|
216 | f32_lt$(OBJ) \
|
---|
217 | f32_eq_signaling$(OBJ) \
|
---|
218 | f32_le_quiet$(OBJ) \
|
---|
219 | f32_lt_quiet$(OBJ) \
|
---|
220 | f32_isSignalingNaN$(OBJ) \
|
---|
221 | f64_to_ui32$(OBJ) \
|
---|
222 | f64_to_ui64$(OBJ) \
|
---|
223 | f64_to_i32$(OBJ) \
|
---|
224 | f64_to_i64$(OBJ) \
|
---|
225 | f64_to_ui32_r_minMag$(OBJ) \
|
---|
226 | f64_to_ui64_r_minMag$(OBJ) \
|
---|
227 | f64_to_i32_r_minMag$(OBJ) \
|
---|
228 | f64_to_i64_r_minMag$(OBJ) \
|
---|
229 | f64_to_f16$(OBJ) \
|
---|
230 | f64_to_f32$(OBJ) \
|
---|
231 | f64_to_extF80M$(OBJ) \
|
---|
232 | f64_to_f128M$(OBJ) \
|
---|
233 | f64_roundToInt$(OBJ) \
|
---|
234 | f64_add$(OBJ) \
|
---|
235 | f64_sub$(OBJ) \
|
---|
236 | f64_mul$(OBJ) \
|
---|
237 | f64_mulAdd$(OBJ) \
|
---|
238 | f64_div$(OBJ) \
|
---|
239 | f64_rem$(OBJ) \
|
---|
240 | f64_sqrt$(OBJ) \
|
---|
241 | f64_eq$(OBJ) \
|
---|
242 | f64_le$(OBJ) \
|
---|
243 | f64_lt$(OBJ) \
|
---|
244 | f64_eq_signaling$(OBJ) \
|
---|
245 | f64_le_quiet$(OBJ) \
|
---|
246 | f64_lt_quiet$(OBJ) \
|
---|
247 | f64_isSignalingNaN$(OBJ) \
|
---|
248 | extF80M_to_ui32$(OBJ) \
|
---|
249 | extF80M_to_ui64$(OBJ) \
|
---|
250 | extF80M_to_i32$(OBJ) \
|
---|
251 | extF80M_to_i64$(OBJ) \
|
---|
252 | extF80M_to_ui32_r_minMag$(OBJ) \
|
---|
253 | extF80M_to_ui64_r_minMag$(OBJ) \
|
---|
254 | extF80M_to_i32_r_minMag$(OBJ) \
|
---|
255 | extF80M_to_i64_r_minMag$(OBJ) \
|
---|
256 | extF80M_to_f16$(OBJ) \
|
---|
257 | extF80M_to_f32$(OBJ) \
|
---|
258 | extF80M_to_f64$(OBJ) \
|
---|
259 | extF80M_to_f128M$(OBJ) \
|
---|
260 | extF80M_roundToInt$(OBJ) \
|
---|
261 | extF80M_add$(OBJ) \
|
---|
262 | extF80M_sub$(OBJ) \
|
---|
263 | extF80M_mul$(OBJ) \
|
---|
264 | extF80M_div$(OBJ) \
|
---|
265 | extF80M_rem$(OBJ) \
|
---|
266 | extF80M_sqrt$(OBJ) \
|
---|
267 | extF80M_eq$(OBJ) \
|
---|
268 | extF80M_le$(OBJ) \
|
---|
269 | extF80M_lt$(OBJ) \
|
---|
270 | extF80M_eq_signaling$(OBJ) \
|
---|
271 | extF80M_le_quiet$(OBJ) \
|
---|
272 | extF80M_lt_quiet$(OBJ) \
|
---|
273 | f128M_to_ui32$(OBJ) \
|
---|
274 | f128M_to_ui64$(OBJ) \
|
---|
275 | f128M_to_i32$(OBJ) \
|
---|
276 | f128M_to_i64$(OBJ) \
|
---|
277 | f128M_to_ui32_r_minMag$(OBJ) \
|
---|
278 | f128M_to_ui64_r_minMag$(OBJ) \
|
---|
279 | f128M_to_i32_r_minMag$(OBJ) \
|
---|
280 | f128M_to_i64_r_minMag$(OBJ) \
|
---|
281 | f128M_to_f16$(OBJ) \
|
---|
282 | f128M_to_f32$(OBJ) \
|
---|
283 | f128M_to_f64$(OBJ) \
|
---|
284 | f128M_to_extF80M$(OBJ) \
|
---|
285 | f128M_roundToInt$(OBJ) \
|
---|
286 | f128M_add$(OBJ) \
|
---|
287 | f128M_sub$(OBJ) \
|
---|
288 | f128M_mul$(OBJ) \
|
---|
289 | f128M_mulAdd$(OBJ) \
|
---|
290 | f128M_div$(OBJ) \
|
---|
291 | f128M_rem$(OBJ) \
|
---|
292 | f128M_sqrt$(OBJ) \
|
---|
293 | f128M_eq$(OBJ) \
|
---|
294 | f128M_le$(OBJ) \
|
---|
295 | f128M_lt$(OBJ) \
|
---|
296 | f128M_eq_signaling$(OBJ) \
|
---|
297 | f128M_le_quiet$(OBJ) \
|
---|
298 | f128M_lt_quiet$(OBJ) \
|
---|
299 |
|
---|
300 | OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS)
|
---|
301 |
|
---|
302 | $(OBJS_ALL): \
|
---|
303 | $(OTHER_HEADERS) platform.h $(SOURCE_DIR)/include/primitiveTypes.h \
|
---|
304 | $(SOURCE_DIR)/include/primitives.h
|
---|
305 | $(OBJS_SPECIALIZE) $(OBJS_OTHERS): \
|
---|
306 | $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \
|
---|
307 | $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \
|
---|
308 | $(SOURCE_DIR)/include/softfloat.h
|
---|
309 |
|
---|
310 | $(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c
|
---|
311 | $(COMPILE_C) $(SOURCE_DIR)/$*.c
|
---|
312 |
|
---|
313 | $(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c
|
---|
314 | $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c
|
---|
315 |
|
---|
316 | softfloat$(LIB): $(OBJS_ALL)
|
---|
317 | $(DELETE) $@
|
---|
318 | $(MAKELIB) $^
|
---|
319 |
|
---|
320 | .PHONY: clean
|
---|
321 | clean:
|
---|
322 | $(DELETE) $(OBJS_ALL) softfloat$(LIB)
|
---|
323 |
|
---|