Remove building with NOCRYPTO option
[minix.git] / external / lgpl3 / mpfr / lib / libmpfr / Makefile
blobdb9f34fac8b704b2e2266bf6f4b8ebf03f1c8529
1 # $NetBSD: Makefile,v 1.16 2013/12/19 01:10:19 gdt Exp $
3 .include <bsd.init.mk>
5 # We don't install mpfr, just provide it for GCC.
6 LIBISPRIVATE?= yes
8 .if ${LIBISPRIVATE} != "yes"
9 INCS= mpf2mpfr.h mpfr.h
10 INCSDIR= /usr/include
11 .endif
13 # XXX get_d.c triggers lint div zero errors (which is valid?)
14 MKLINT=no
16 LIB= mpfr
18 LIBDPLIBS+= gmp ${.CURDIR}/../../../gmp/lib/libgmp
20 SRCS= \
21 abort_prec_max.c \
22 acos.c \
23 acosh.c \
24 add.c \
25 add1.c \
26 add1sp.c \
27 add_d.c \
28 add_ui.c \
29 agm.c \
30 ai.c \
31 asin.c \
32 asinh.c \
33 atan.c \
34 atan2.c \
35 atanh.c \
36 bernoulli.c \
37 buildopt.c \
38 cache.c \
39 cbrt.c \
40 check.c \
41 clear.c \
42 clears.c \
43 cmp.c \
44 cmp2.c \
45 cmp_abs.c \
46 cmp_d.c \
47 cmp_ld.c \
48 cmp_si.c \
49 cmp_ui.c \
50 comparisons.c \
51 const_catalan.c \
52 const_euler.c \
53 const_log2.c \
54 const_pi.c \
55 constant.c \
56 copysign.c \
57 cos.c \
58 cosh.c \
59 cot.c \
60 coth.c \
61 csc.c \
62 csch.c \
63 d_div.c \
64 d_sub.c \
65 digamma.c \
66 dim.c \
67 div.c \
68 div_2exp.c \
69 div_2si.c \
70 div_2ui.c \
71 div_d.c \
72 div_ui.c \
73 dump.c \
74 eint.c \
75 eq.c \
76 erf.c \
77 erfc.c \
78 exp.c \
79 exp10.c \
80 exp2.c \
81 exp3.c \
82 exp_2.c \
83 expm1.c \
84 factorial.c \
85 fits_intmax.c \
86 fits_sint.c \
87 fits_slong.c \
88 fits_sshort.c \
89 fits_uint.c \
90 fits_uintmax.c \
91 fits_ulong.c \
92 fits_ushort.c \
93 fma.c \
94 fms.c \
95 frac.c \
96 free_cache.c \
97 frexp.c \
98 gamma.c \
99 gammaonethird.c \
100 get_d.c \
101 get_d64.c \
102 get_exp.c \
103 get_f.c \
104 get_flt.c \
105 get_ld.c \
106 get_patches.c \
107 get_si.c \
108 get_sj.c \
109 get_str.c \
110 get_ui.c \
111 get_uj.c \
112 get_z.c \
113 get_z_exp.c \
114 gmp_op.c \
115 grandom.c \
116 hypot.c \
117 init.c \
118 init2.c \
119 inits.c \
120 inits2.c \
121 inp_str.c \
122 int_ceil_log2.c \
123 isinf.c \
124 isinteger.c \
125 isnan.c \
126 isnum.c \
127 isqrt.c \
128 isregular.c \
129 iszero.c \
130 jn.c \
131 li2.c \
132 lngamma.c \
133 log.c \
134 log10.c \
135 log1p.c \
136 log2.c \
137 logging.c \
138 min_prec.c \
139 minmax.c \
140 modf.c \
141 mp_clz_tab.c \
142 mpfr-gmp.c \
143 mpn_exp.c \
144 mul.c \
145 mul_2exp.c \
146 mul_2si.c \
147 mul_2ui.c \
148 mul_d.c \
149 mul_ui.c \
150 mulders.c \
151 neg.c \
152 next.c \
153 out_str.c \
154 pow.c \
155 pow_si.c \
156 pow_ui.c \
157 pow_z.c \
158 powerof2.c \
159 print_raw.c \
160 print_rnd_mode.c \
161 printf.c \
162 rec_sqrt.c \
163 reldiff.c \
164 rem1.c \
165 rint.c \
166 root.c \
167 round_near_x.c \
168 round_p.c \
169 round_prec.c \
170 scale2.c \
171 sec.c \
172 sech.c \
173 set.c \
174 set_d.c \
175 set_d64.c \
176 set_dfl_prec.c \
177 set_exp.c \
178 set_f.c \
179 set_flt.c \
180 set_inf.c \
181 set_ld.c \
182 set_nan.c \
183 set_prc_raw.c \
184 set_prec.c \
185 set_q.c \
186 set_rnd.c \
187 set_si.c \
188 set_si_2exp.c \
189 set_sj.c \
190 set_str.c \
191 set_str_raw.c \
192 set_ui.c \
193 set_ui_2exp.c \
194 set_uj.c \
195 set_z.c \
196 set_z_exp.c \
197 set_zero.c \
198 setmax.c \
199 setmin.c \
200 setsign.c \
201 sgn.c \
202 si_op.c \
203 signbit.c \
204 sin.c \
205 sin_cos.c \
206 sinh.c \
207 sinh_cosh.c \
208 sqr.c \
209 sqrt.c \
210 sqrt_ui.c \
211 stack_interface.c \
212 strtofr.c \
213 sub.c \
214 sub1.c \
215 sub1sp.c \
216 sub_d.c \
217 sub_ui.c \
218 subnormal.c \
219 sum.c \
220 swap.c \
221 tan.c \
222 tanh.c \
223 uceil_log2.c \
224 ufloor_log2.c \
225 ui_div.c \
226 ui_pow.c \
227 ui_pow_ui.c \
228 ui_sub.c \
229 urandom.c \
230 urandomb.c \
231 vasprintf.c \
232 version.c \
233 volatile.c \
234 yn.c \
235 zeta.c \
236 zeta_ui.c
238 SRCS+= \
239 exceptions.c \
240 extract.c \
241 uceil_exp2.c \
242 uceil_log2.c \
243 ufloor_log2.c \
244 add.c \
245 add1.c \
246 add_ui.c \
247 agm.c \
248 clear.c \
249 cmp.c \
250 cmp_abs.c \
251 cmp_si.c \
252 cmp_ui.c \
253 comparisons.c \
254 div_2exp.c \
255 div_2si.c \
256 div_2ui.c \
257 div.c \
258 div_ui.c \
259 dump.c \
260 eq.c \
261 exp10.c \
262 exp2.c \
263 exp3.c \
264 exp.c \
265 frac.c \
266 get_d.c \
267 get_exp.c \
268 get_str.c \
269 init.c \
270 inp_str.c \
271 isinteger.c \
272 isinf.c \
273 isnan.c \
274 isnum.c \
275 const_log2.c \
276 log.c \
277 modf.c \
278 mul_2exp.c \
279 mul_2si.c \
280 mul_2ui.c \
281 mul.c \
282 mul_ui.c \
283 neg.c \
284 next.c \
285 out_str.c \
286 printf.c \
287 vasprintf.c \
288 const_pi.c \
289 pow.c \
290 pow_si.c \
291 pow_ui.c \
292 print_raw.c \
293 print_rnd_mode.c \
294 reldiff.c \
295 round_prec.c \
296 set.c \
297 setmax.c \
298 setmin.c \
299 set_d.c \
300 set_dfl_prec.c \
301 set_exp.c \
302 set_rnd.c \
303 set_f.c \
304 set_prc_raw.c \
305 set_prec.c \
306 set_q.c \
307 set_si.c \
308 set_str.c \
309 set_str_raw.c \
310 set_ui.c \
311 set_z.c \
312 sqrt.c \
313 sqrt_ui.c \
314 sub.c \
315 sub1.c \
316 sub_ui.c \
317 rint.c \
318 ui_div.c \
319 ui_sub.c \
320 urandom.c \
321 urandomb.c \
322 get_z_exp.c \
323 swap.c \
324 factorial.c \
325 cosh.c \
326 sinh.c \
327 tanh.c \
328 sinh_cosh.c \
329 acosh.c \
330 asinh.c \
331 atanh.c \
332 atan.c \
333 cmp2.c \
334 exp_2.c \
335 asin.c \
336 const_euler.c \
337 cos.c \
338 sin.c \
339 tan.c \
340 fma.c \
341 fms.c \
342 hypot.c \
343 log1p.c \
344 expm1.c \
345 log2.c \
346 log10.c \
347 ui_pow.c \
348 ui_pow_ui.c \
349 minmax.c \
350 dim.c \
351 signbit.c \
352 copysign.c \
353 setsign.c \
354 gmp_op.c \
355 init2.c \
356 acos.c \
357 sin_cos.c \
358 set_nan.c \
359 set_inf.c \
360 set_zero.c \
361 powerof2.c \
362 gamma.c \
363 set_ld.c \
364 get_ld.c \
365 cbrt.c \
366 volatile.c \
367 fits_sshort.c \
368 fits_sint.c \
369 fits_slong.c \
370 fits_ushort.c \
371 fits_uint.c \
372 fits_ulong.c \
373 fits_uintmax.c \
374 fits_intmax.c \
375 get_si.c \
376 get_ui.c \
377 zeta.c \
378 cmp_d.c \
379 erf.c \
380 inits.c \
381 inits2.c \
382 clears.c \
383 sgn.c \
384 check.c \
385 sub1sp.c \
386 version.c \
387 mpn_exp.c \
388 mpfr-gmp.c \
389 mp_clz_tab.c \
390 sum.c \
391 add1sp.c \
392 free_cache.c \
393 si_op.c \
394 cmp_ld.c \
395 set_ui_2exp.c \
396 set_si_2exp.c \
397 set_uj.c \
398 set_sj.c \
399 get_sj.c \
400 get_uj.c \
401 get_z.c \
402 iszero.c \
403 cache.c \
404 sqr.c \
405 int_ceil_log2.c \
406 isqrt.c \
407 strtofr.c \
408 pow_z.c \
409 logging.c \
410 mulders.c \
411 get_f.c \
412 round_p.c \
413 erfc.c \
414 atan2.c \
415 subnormal.c \
416 const_catalan.c \
417 root.c \
418 sec.c \
419 csc.c \
420 cot.c \
421 eint.c \
422 sech.c \
423 csch.c \
424 coth.c \
425 round_near_x.c \
426 constant.c \
427 abort_prec_max.c \
428 stack_interface.c \
429 lngamma.c \
430 zeta_ui.c \
431 set_d64.c \
432 get_d64.c \
433 jn.c \
434 yn.c \
435 rem1.c \
436 get_patches.c \
437 add_d.c \
438 sub_d.c \
439 d_sub.c \
440 mul_d.c \
441 div_d.c \
442 d_div.c \
443 li2.c \
444 rec_sqrt.c \
445 min_prec.c \
446 buildopt.c \
447 digamma.c \
448 bernoulli.c \
449 isregular.c \
450 set_flt.c \
451 get_flt.c \
452 scale2.c \
453 set_z_exp.c \
454 ai.c \
455 gammaonethird.c
457 CPPFLAGS+= -I. \
458 -DHAVE_INTTYPES_H=1 \
459 -DHAVE_STDINT_H=1 \
460 -DTIME_WITH_SYS_TIME=1 \
461 -DHAVE_LOCALE_H=1 \
462 -DHAVE_WCHAR_H=1 \
463 -DHAVE_STDARG=1 \
464 -DHAVE_SYS_TIME_H=1 \
465 -DHAVE_STDINT_H=1 \
466 -DHAVE_VA_COPY=1 \
467 -DHAVE_SETLOCALE=1 \
468 -DHAVE_GETTIMEOFDAY=1 \
469 -DHAVE_LONG_LONG=1 \
470 -DHAVE_INTMAX_T=1 \
471 -DMPFR_HAVE_INTMAX_MAX=1 \
472 -DMPFR_HAVE_FESETROUND=1 \
473 -DHAVE_DENORMS=1 \
474 -DHAVE_ROUND=1 \
475 -DHAVE_TRUNC=1 \
476 -DHAVE_FLOOR=1 \
477 -DHAVE_CEIL=1 \
478 -DHAVE_ATTRIBUTE_MODE=1
480 # Find <gmp.h>
481 GMP_MACHINE_ARCH=${MACHINE_ARCH:S/earmv4/arm/:C/armv[5-7]/arm/}
482 CPPFLAGS+= -I${NETBSDSRCDIR}/external/lgpl3/gmp/lib/libgmp/arch/${GMP_MACHINE_ARCH}
483 CPPFLAGS+= -I${.CURDIR}/../../dist/src
485 # XXX
486 # XXX XXX check mips*
487 # XXX XXX do something more, more ports!!
488 # XXX
489 # XXX missing: arm* sparc sh3* m68k/m68000 (powerpc64/ia64)
491 # IEEE FP support. No VAX here.
492 .if ${MACHINE_ARCH} == "x86_64" || \
493 ${MACHINE_ARCH} == "i386"
494 ${MACHINE_ARCH} == "mipsel"
495 CPPFLAGS+= -DHAVE_LDOUBLE_IEEE_EXT_LITTLE=1
496 .endif
498 .if ${MACHINE_ARCH} == "mips64el"
499 CPPFLAGS+= -DHAVE_LDOUBLE_IEEE_QUAD_LITTLE=1
500 .endif
502 .if ${MACHINE_ARCH} == "sparc64" || \
503 ${MACHINE_ARCH} == "powerpc" || \
504 ${MACHINE_ARCH} == "powerpc64" || \
505 ${MACHINE_ARCH} == "mips64eb"
506 CPPFLAGS+= -DHAVE_LDOUBLE_IEEE_QUAD_BIG=1
507 .endif
509 WITHOUT_MAN= yes
511 .include <bsd.lib.mk>
513 mparam.h: mparam_h.in
514 rm -f ${.TARGET} && cp ${.ALLSRC} ${.TARGET}
516 ${SRCS}: mparam.h
517 CLEANFILES+= mparam.h
519 .PATH: ${.CURDIR}/../../dist/src
521 .if !empty(MACHINE_ARCH:M*arm*)
522 COPTS += -marm
523 .endif
524 .if ${MACHINE_ARCH} == "vax"
525 COPTS.set_ld.c+= -Wno-error
526 .endif
528 # Don't warn about functions which cannot be stack smash protected as
529 # there are a lot of them.
530 COPTS += -Wno-stack-protector