Makefile revision 1.237
1#  $NetBSD: Makefile,v 1.237 2024/06/10 12:47:40 riastradh Exp $
2#
3#  @(#)Makefile 5.1beta 93/09/24
4#
5#  ====================================================
6#  Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
7#
8#  Developed at SunPro, a Sun Microsystems, Inc. business.
9#  Permission to use, copy, modify, and distribute this
10#  software is freely granted, provided that this notice
11#  is preserved.
12#  ====================================================
13#
14#
15
16NOSANITIZER=		# defined
17COPTS+=			${${ACTIVE_CC} == "gcc":? -frounding-math :}
18
19#
20# There are two options in making libm at fdlibm compile time:
21# 	_IEEE_LIBM 	--- IEEE libm; smaller, and somewhat faster
22#	_MULTI_LIBM	--- Support multi-standard at runtime by
23#			    imposing wrapper functions defined in
24#			    fdlibm.h:
25#				_IEEE_MODE 	-- IEEE
26#				_XOPEN_MODE 	-- X/OPEN
27#				_POSIX_MODE 	-- POSIX/ANSI
28#				_SVID3_MODE 	-- SVID
29#
30# Here is how to set up CPPFLAGS to create the desired libm at
31# compile time:
32#
33# 	CPPFLAGS = -D_IEEE_LIBM		... IEEE libm (recommended)
34#	CPPFLAGS = -D_SVID3_MODE	... Multi-standard supported
35#					    libm with SVID as the
36#					    default standard
37#	CPPFLAGS = -D_XOPEN_MODE	... Multi-standard supported
38#					    libm with XOPEN as the
39#					    default standard
40#	CPPFLAGS = -D_POSIX_MODE	... Multi-standard supported
41#					    libm with POSIX as the
42#					    default standard
43#	CPPFLAGS = 			... Multi-standard supported
44#					    libm with IEEE as the
45#					    default standard
46#
47
48USE_SHLIBDIR=	yes
49
50# require this for the value of I387_LIBM from mk.conf, if set.
51.include <bsd.own.mk>
52
53LIBC_MACHINE_ARCH?=	${MACHINE_ARCH}
54LIBC_MACHINE_CPU?=	${MACHINE_CPU}
55
56LINTFLAGS+=	-g		# compiler_rt uses typeof() and __extension__
57LINTFLAGS+=	-X 117		# GCC sign-extends '>>' on signed int
58LINTFLAGS.s_logl.c+=	-X 161	# constant in conditional context
59LINTFLAGS.s_logl.c+=	-X 193	# unreachable statement (due to 161)
60LINTFLAGS.s_logl.c+=	-X 177	# non-constant initializer
61
62EXPSYM_SRCS=	m.common.expsym
63EXPSYM_SRCS+=	m.ieee754.expsym
64EXPSYM_SRCS+=	m.fenv.expsym
65EXPSYM_SRCS+=	${EXPSYM_SRC_MD:U}
66
67.if exists(${.CURDIR}/m.${LIBC_MACHINE_ARCH}.expsym)
68EXPSYM_SRC_MD=	m.${LIBC_MACHINE_ARCH}.expsym
69.elif exists(${.CURDIR}/m.${LIBC_MACHINE_CPU}.expsym)
70EXPSYM_SRC_MD=	m.${LIBC_MACHINE_CPU}.expsym
71.endif
72
73# We will build m.expsym with a rule below, by merging all the files
74# listed in EXPSYM_SRCS, which individual architectures can override.
75# (The rule has to be written below after EXPSYM_SRCS has been
76# determined.)
77LIB_EXPSYM=	m.expsym
78
79.if (${LIBC_MACHINE_CPU} == "aarch64")
80.PATH: ${.CURDIR}/arch/aarch64
81ARCH_SRCS = e_sqrt.S e_sqrtf.S s_fabsf.S
82ARCH_SRCS+= s_fma.S s_fmaf.S s_fmax.S s_fmaxf.S s_fmin.S s_fminf.S
83.if ${MKSOFTFLOAT} == "no"
84COMMON_SRCS+= fenv.c
85.endif
86COMMON_SRCS+= s_nexttoward.c s_rintl.c
87COMMON_SRCS+= e_sqrtl.c
88COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
89
90.elif (${LIBC_MACHINE_ARCH} == "alpha")
91.PATH: ${.CURDIR}/arch/alpha
92ARCH_SRCS = s_copysign.S s_copysignf.S lrint.S
93COMMON_SRCS+= fenv.c
94COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
95COPTS+=	-mfloat-ieee -mieee-with-inexact -mfp-trap-mode=sui -mtrap-precision=i
96
97# alpha doesn't have symbols for:
98#
99#	feclearexcept
100#	fegetexceptflag
101#	fegetround
102#	feraiseexcept
103#	fesetexceptflag
104#	fesetround
105#	fetestexcept
106#
107# Instead, they are static inlines in fenv.h.  So we won't use
108# m.fenv.expsym.
109#
110EXPSYM_SRCS=	m.common.expsym m.ieee754.expsym m.alpha.expsym
111
112.elif (${LIBC_MACHINE_CPU} == "arm")
113.PATH.c: ${.CURDIR}/arch/arm
114.if ${MKSOFTFLOAT} == "no"
115COMMON_SRCS+= fenv.c
116EXPSYM_SRC_MD=	${LIB}.armhf.expsym
117.endif
118.for f in fenv.c lrint.S lrintf.S s_fabsf.S s_fma.S s_fmaf.S
119COPTS.$f +=	-mfpu=vfp
120.endfor
121COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
122.if (${MKSOFTFLOAT} == "no")
123.PATH.S: ${.CURDIR}/arch/arm
124ARCH_SRCS = e_sqrt.S e_sqrtf.S lrint.S lrintf.S s_fabsf.S s_fma.S s_fmaf.S
125.endif
126
127.elif (${LIBC_MACHINE_ARCH} == "ia64")
128.PATH: ${.CURDIR}/arch/ia64
129COMMON_SRCS += fenv.c
130
131.elif (${LIBC_MACHINE_ARCH} == "hppa")
132.PATH.c: ${.CURDIR}/arch/hppa
133COMMON_SRCS+= fenv.c
134
135.elif (${LIBC_MACHINE_ARCH} == "sparc")
136.PATH: ${.CURDIR}/arch/sparc
137COMMON_SRCS+= fenv.c
138COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
139
140.elif (${LIBC_MACHINE_ARCH} == "sparc64")
141.PATH: ${.CURDIR}/arch/sparc64
142COMMON_SRCS+= fenv.c
143COMMON_SRCS+= s_rintl.c
144.ifndef _COMPAT_M32_MK_
145COMMON_SRCS+= s_nexttoward.c
146.endif
147COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
148
149.elif ((${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "x86_64"))
150
151# XXX consider making this LIBC_MACHINE_ARCH?
152.if (${MACHINE_ARCH} == "x86_64")
153.PATH: ${.CURDIR}/arch/x86_64
154.endif
155.PATH:	${.CURDIR}/arch/i387
156
157COMMON_SRCS+= fenv.c s_nexttoward.c s_rintl.c
158COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
159
160ARCH_SRCS = e_acos.S e_asin.S e_atan2.S e_exp.S e_expf.S e_fmod.S e_log.S \
161	    e_logf.S e_log10.S e_log10f.S e_log2.S e_log2f.S e_remainder.S \
162	    e_remainderf.S e_scalb.S e_scalbf.S e_sqrt.S e_sqrtf.S s_atan.S \
163	    s_atanf.S s_ceil.S s_ceilf.S s_copysign.S s_copysignf.S \
164	    s_finite.S s_finitef.S s_floor.S s_floorf.S \
165	    s_log1p.S s_log1pf.S s_logb.S s_logbf.S s_logbl.S \
166	    s_rint.S s_rintf.S s_rintl.S \
167	    s_scalbn.S s_scalbnf.S \
168	    s_significand.S s_significandf.S \
169	    lrint.S
170# do not pick up the i387 asm version for the following functions;
171# it is incorrect
172.for f in cos cosf modf ilogb ilogbl ilogbf sin sinf tan tanf
173s_${f}.o s_${f}.pico s_${f}.po s_${f}.go s_${f}.d: s_${f}.c
174.endfor
175
176.if (${MACHINE_ARCH} == "i386")
177SUBDIR=arch/i387
178.endif
179
180.elif (${LIBC_MACHINE_ARCH} == "m68k")
181.if defined(M68060)
182.PATH:	${.CURDIR}/arch/m68060
183.include "${.CURDIR}/arch/m68060/Makefile.list"
184COPTS+= -m68060
185.PATH:	${.CURDIR}/arch/m68k
186ARCH_SRCS += s_ceil.S s_copysign.S s_finite.S s_floor.S s_rint.S
187.elif defined(M68040)
188.PATH: ${.CURDIR}/arch/m68k
189COPTS+= -m68040
190ARCH_SRCS = s_copysign.S s_finite.S
191.endif
192.if (${MKSOFTFLOAT} == "no")
193.PATH:	${.CURDIR}/arch/mc68881 ${.CURDIR}/arch/m68k
194ARCH_SRCS = e_acos.S e_asin.S e_atanh.S e_cosh.S e_exp.S e_fmod.S e_log.S \
195	    e_log10.S e_remainder.S e_scalb.S e_sinh.S e_sqrt.S s_atan.S \
196	    s_ceil.S s_copysign.S s_cos.S s_expm1.S s_finite.S s_floor.S \
197	    s_log1p.S s_logb.S s_rint.S s_scalbn.S s_sin.S s_tan.S s_tanh.S
198COMMON_SRCS += fenv.c s_nexttoward.c s_rintl.c
199.endif
200COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
201# end of m68k
202
203.elif (${LIBC_MACHINE_ARCH} == "vax")
204.PATH:	${.CURDIR}/arch/vax
205
206#NOIEEE_ARCH+= s_fmax.c s_fmaxf.c s_fmaxl.c
207#NOIEEE_ARCH+= n_infnan.S n_argred.S n_sqrt.S
208#ARCH_SRCS = n_atan2.S n_cabs.S n_cbrt.S n_support.S n_sincos.S n_tan.S
209# XXX - ripped out due to lack of the insn polyd in the Mariah chip,
210# and emulation code isn't written yet.
211ARCH_SRCS = n_scalbn.S
212WARNS?=5
213
214# No IEEE 754 stuff.  Not all of it is actually specific to IEEE 754,
215# but it's missing anyway: PR port-vax/57881.
216EXPSYM_SRCS=	m.common.expsym m.vax.expsym
217
218.elif (${LIBC_MACHINE_CPU} == "riscv")
219.PATH:	${.CURDIR}/arch/riscv
220
221COMMON_SRCS+= s_nexttoward.c s_rintl.c
222
223.if ${MKSOFTFLOAT} == "no"
224COMMON_SRCS += fenv.c
225ARCH_SRCS = e_sqrt.S e_sqrtf.S
226ARCH_SRCS += s_copysign.S s_copysignf.S
227ARCH_SRCS += s_fabs.S s_fabsf.S
228ARCH_SRCS += s_fma.S s_fmaf.S
229ARCH_SRCS += s_fmax.S s_fmaxf.S
230ARCH_SRCS += s_fmin.S s_fminf.S
231.endif
232
233.elif (${LIBC_MACHINE_CPU} == "powerpc")
234.PATH:	${.CURDIR}/arch/powerpc
235.if ${MKSOFTFLOAT} == "no"
236COMMON_SRCS += fenv.c
237.endif
238COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
239ARCH_SRCS += s_fma.S s_fmaf.S
240
241.elif (${LIBC_MACHINE_CPU} == "mips")
242.PATH:	${.CURDIR}/arch/mips
243.if ${MKSOFTFLOAT} == "no"
244COMMON_SRCS += fenv.c
245.endif
246.if ${MACHINE_MIPS64} && (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32))
247COMMON_SRCS+= s_nexttoward.c
248COMMON_SRCS+= s_rintl.c
249.endif
250COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
251
252.  if ${MKSOFTFLOAT} == "no"
253.    if ${MACHINE_MIPS64} && (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32))
254EXPSYM_SRC_MD=	m.mips64hf.expsym
255.    else
256EXPSYM_SRC_MD=	m.mipshf.expsym
257.    endif
258.  else
259.    if ${MACHINE_MIPS64} && (!defined(CPUFLAGS) || empty(CPUFLAGS:M-mabi=32))
260EXPSYM_SRC_MD=	m.mips64.expsym
261.    else
262EXPSYM_SRC_MD=	m.mips.expsym
263.    endif
264.  endif
265
266.elif (${LIBC_MACHINE_CPU} == "sh3")
267.PATH:	${.CURDIR}/arch/sh3
268.if ${MKSOFTFLOAT} == "no"
269COMMON_SRCS += fenv.c
270.endif
271COMMON_SRCS+= s_fma.c s_fmaf.c s_fmal.c
272.endif
273# End of list of CPU tests
274
275WARNS?=5
276
277.PATH:	${.CURDIR}/man
278.PATH:	${.CURDIR}/src
279.PATH:	${.CURDIR}/noieee_src
280
281m.expsym: ${EXPSYM_SRCS}
282	${_MKTARGET_CREATE}
283	LC_ALL=C sort -m ${.ALLSRC} >${.TARGET}.tmp && \
284	${MV} ${.TARGET}.tmp ${.TARGET}
285CLEANFILES+=	m.expsym m.expsym.tmp
286
287.if (${LIBC_MACHINE_ARCH} == "alpha")
288COPTS+= -mfp-rounding-mode=d
289.endif
290
291.if (${LIBC_MACHINE_ARCH} != "vax")
292CPPFLAGS+= -D_MULTI_LIBM -D_POSIX_MODE
293# XXX noieee libm is gross
294COPTS+=	-fno-strict-aliasing
295.endif
296CPPFLAGS+=-DLIBM_SCCS
297
298.if (${MKSOFTFLOAT} != "no" || ${MACHINE_ARCH} == "m68000")
299.PATH:	${.CURDIR}/softfloat
300.include "${.CURDIR}/../libc/libcincludes.mk"
301CPPFLAGS+=	-I${ARCHDIR}/softfloat
302COMMON_SRCS += \
303	feclearexcept.c \
304	fedisableexcept.c \
305	feenableexcept.c \
306	fegetenv.c \
307	fegetexcept.c \
308	fegetexceptflag.c \
309	fegetround.c \
310	feholdexcept.c \
311	feraiseexcept.c \
312	fesetenv.c \
313	fesetexceptflag.c \
314	fesetround.c \
315	fetestexcept.c \
316	feupdateenv.c
317.endif
318
319LIB=	m
320COMMON_SRCS+= b_exp.c b_log.c \
321	b_tgamma.c b_tgammal.c \
322	e_acos.c e_acosf.c e_acosl.c \
323	e_acosh.c e_acoshf.c e_acoshl.c \
324	e_asin.c e_asinf.c e_asinl.c \
325	e_atan2.c e_atan2f.c e_atan2l.c \
326	e_atanh.c e_atanhf.c e_atanhl.c \
327	e_cosh.c e_coshf.c e_coshl.c \
328	e_exp.c  e_expf.c \
329	e_fmod.c e_fmodf.c e_fmodl.c \
330	e_hypot.c e_hypotf.c e_hypotl.c \
331	e_j0.c e_j0f.c \
332	e_j1.c e_j1f.c \
333	e_jn.c e_jnf.c \
334	e_lgammal.c \
335	e_lgamma_r.c e_lgammaf_r.c e_lgammal_r.c e_log.c \
336	e_log2.c e_log10.c e_log10f.c e_log2f.c e_logf.c \
337	e_pow.c e_powf.c e_powl.c \
338	e_rem_pio2.c e_rem_pio2f.c \
339	e_remainder.c e_remainderf.c e_remainderl.c \
340	e_scalb.c e_scalbf.c \
341	e_sinh.c e_sinhf.c e_sinhl.c \
342	e_sqrt.c e_sqrtf.c e_sqrtl.c \
343	invtrig.c \
344	k_cos.c k_cosf.c \
345	k_rem_pio2.c k_rem_pio2f.c \
346	k_sin.c k_sinf.c \
347	k_standard.c k_tan.c k_tanf.c \
348	s_asinh.c s_asinhf.c s_asinhl.c \
349	s_atan.c s_atanf.c s_atanl.c \
350	s_cbrt.c s_cbrtf.c s_cbrtl.c \
351	s_ceil.c s_ceilf.c s_ceill.c s_copysign.c s_copysignf.c s_copysignl.c \
352	s_cos.c s_cosf.c s_cosl.c \
353	s_cospi.c s_cospif.c s_cospil.c \
354	s_erf.c s_erff.c s_erfl.c \
355	s_exp2.c s_exp2f.c s_expl.c s_exp2l.c s_expm1.c s_expm1f.c \
356	s_fabsf.c s_fabsl.c \
357	s_finite.c s_finitef.c \
358	s_floor.c s_floorf.c s_floorl.c s_frexpf.c \
359	s_ilogb.c s_ilogbf.c s_ilogbl.c \
360	s_isinff.c s_isnanf.c s_lib_version.c s_log1p.c \
361	s_llrint.c s_llrintf.c s_llrintl.c \
362	s_llround.c s_llroundf.c s_llroundl.c \
363	s_lrint.c s_lrintf.c s_lrintl.c \
364	s_lround.c s_lroundf.c s_lroundl.c \
365	s_log1pf.c s_logb.c s_logbf.c s_logbl.c s_logl.c \
366	s_matherr.c s_modff.c s_modfl.c \
367	s_nearbyint.c s_nextafter.c s_nextafterl.c \
368	s_nextafterf.c s_nexttowardf.c \
369	s_remquo.c s_remquof.c s_remquol.c \
370	s_rint.c s_rintf.c \
371	s_round.c s_roundf.c s_roundl.c s_scalbn.c \
372	s_scalbnf.c s_scalbnl.c s_signgam.c s_significand.c s_significandf.c \
373	s_sincos.c s_sincosf.c s_sincosl.c s_sin.c \
374	s_sinf.c s_sinl.c \
375	s_sinpi.c s_sinpif.c s_sinpil.c \
376	s_tan.c s_tanf.c s_tanl.c \
377	s_tanh.c s_tanhf.c s_tanhl.c \
378	s_tanpi.c s_tanpif.c s_tanpil.c \
379	s_tgammaf.c \
380	s_trunc.c s_truncf.c s_truncl.c \
381	w_acos.c w_acosf.c w_acosh.c w_acoshf.c w_asin.c w_asinf.c w_atan2.c \
382	w_atan2f.c w_atanh.c w_atanhf.c w_cosh.c w_coshf.c \
383	w_drem.c w_dremf.c w_exp.c w_expf.c w_fmod.c w_fmodf.c w_fmodl.c \
384	w_gamma.c w_gamma_r.c w_gammaf.c w_gammaf_r.c w_hypot.c w_hypotf.c \
385	w_j0.c \
386	w_j0f.c w_j1.c w_j1f.c w_jn.c w_jnf.c w_lgamma.c w_lgamma_r.c \
387	w_lgammaf.c w_lgammaf_r.c w_log.c w_log10.c w_log10f.c w_log2.c \
388	w_log2f.c w_logf.c \
389	w_pow.c w_powf.c w_remainder.c w_remainderf.c w_scalb.c w_scalbf.c \
390	w_sinh.c w_sinhf.c w_sqrt.c w_sqrtf.c w_sqrtl.c \
391	s_frexp.c s_frexpl.c s_modf.c \
392	s_fmax.c s_fmaxf.c s_fmaxl.c \
393	s_fmin.c s_fminf.c s_fminl.c s_fdim.c
394
395.PATH:	${.CURDIR}/compat
396COMMON_SRCS+= compat_cabs.c compat_cabsf.c
397# XXX our compatibility cabs() is different!
398COPTS.compat_cabs.c=	${${ACTIVE_CC} == "gcc":? -fno-builtin-cabs :}
399COPTS.compat_cabsf.c=	${${ACTIVE_CC} == "gcc":? -fno-builtin-cabsf :}
400
401# math routines for non-IEEE architectures.
402NOIEEE_SRCS = n_asincos.c n_acosh.c n_asinh.c n_atan.c n_atanh.c n_atanhf.c \
403	n_cosh.c \
404	n_erf.c n_exp.c n_exp2.c n_exp2f.c n_exp__E.c n_expm1.c \
405	n_floor.c n_fmod.c n_frexpf.c n_frexpl.c \
406	n_gamma.c n_ilogb.c \
407	n_lgamma.c n_j0.c n_j1.c n_jn.c n_log.c n_log10.c n_log1p.c \
408	n_log2.c n_log__L.c n_pow.c n_sinh.c n_tanh.c \
409	n_sincos.c n_sincos1.c n_tan.c \
410	n_round.c n_roundf.c n_lround.c n_lroundf.c \
411	n_fmax.c n_fmaxf.c n_fmin.c n_fminf.c
412#	n_sqrt.c n_argred.c n_infnan.c n_atan2.c n_cabs.c n_cbrt.c n_support.c
413
414
415# NetBSD's C library supplies these functions:
416#COMMON_SRCS+=	s_fabs.c s_frexp.c s_isinf.c s_isnan.c s_ldexp.c s_modf.c
417
418.if (${LIBC_MACHINE_ARCH} == "vax")
419SRCS=	${NOIEEE_SRCS} ${NOIEEE_ARCH}
420.else
421SRCS=	${COMMON_SRCS}
422.endif
423
424.ifdef ARCH_ADDS
425SRCS+= ${ARCH_ADDS}
426.endif
427
428# Substitute common sources with any arch specific sources
429.for i in ${ARCH_SRCS} ${NOIEEE_ARCH}
430    SRCS:=${SRCS:S/^${i:S/.S/.c/}/$i/}
431.endfor
432
433.if (${LIBC_MACHINE_ARCH} == "vax") # XXX until POLYD is written.
434.PATH:	${.CURDIR}/arch/vax
435SRCS:=${SRCS} n_sqrt.S n_argred.S n_infnan.S n_atan2.S n_cabs.S n_cbrt.S \
436	n_support.S n_scalbn.S
437.endif
438
439.if (${LIBC_MACHINE_ARCH} == "i386")
440# XXX this gets miscompiled. There should be a better fix.
441COPTS.s_tanh.c+= -O0
442.endif
443
444MAN+=	acos.3 acosh.3 asin.3 asinh.3 atan.3 atan2.3 atanh.3 \
445	ceil.3 copysign.3 cos.3 cosh.3 \
446	erf.3 exp.3 \
447	fabs.3 finite.3 fma.3 fmod.3 frexp.3 hypot.3 \
448	ieee_test.3 ilogb.3 isinff.3 j0.3 ldexp.3 lgamma.3 log.3 lrint.3 \
449	math.3 modf.3 nextafter.3 pow.3 \
450	remainder.3 rint.3 round.3 \
451	scalbn.3 sincos.3 sin.3 sinh.3 sqrt.3 \
452	tan.3 tanh.3 trunc.3 fmax.3 fdim.3
453
454# fenv.h interface
455MAN+=	feclearexcept.3 feenableexcept.3 fegetenv.3 fegetround.3 fenv.3
456MLINKS+=feclearexcept.3 fegetexceptflag.3	\
457	feclearexcept.3 feraiseexcept.3		\
458	feclearexcept.3 fesetexceptflag.3	\
459	feclearexcept.3 fetestexcept.3
460MLINKS+=feenableexcept.3 fedisableexcept.3	\
461	feenableexcept.3 fegetexcept.3
462MLINKS+=fegetenv.3 feholdexcept.3		\
463	fegetenv.3 fesetenv.3			\
464	fegetenv.3 feupdateenv.3
465MLINKS+=fegetround.3 fesetround.3
466
467MLINKS+=acos.3 acosf.3
468MLINKS+=acosh.3 acoshf.3
469MLINKS+=asin.3 asinf.3
470MLINKS+=asinh.3 asinhf.3
471MLINKS+=atan.3 atanf.3
472MLINKS+=atan2.3 atan2f.3
473MLINKS+=atanh.3 atanhf.3
474MLINKS+=ceil.3 ceilf.3 \
475	ceil.3 ceill.3 \
476	ceil.3 floor.3 \
477	ceil.3 floorf.3 \
478	ceil.3 floorl.3
479MLINKS+=copysign.3 copysignf.3 \
480	copysign.3 copysignl.3
481MLINKS+=cos.3 cosf.3
482MLINKS+=cos.3 cosl.3
483MLINKS+=cosh.3 coshf.3
484MLINKS+=cosh.3 coshl.3
485MLINKS+=erf.3 erff.3 \
486	erf.3 erfl.3 \
487	erf.3 erfc.3 \
488	erf.3 erfcf.3 \
489	erf.3 erfcl.3
490MLINKS+=exp.3 expf.3 exp.3 expm1.3 exp.3 expm1f.3 			\
491	exp.3 exp2.3 exp.3 exp2f.3 exp.3 expl.3				\
492	exp.3 expm1l.3 exp.3 exp2l.3
493MLINKS+=log.3 logf.3 \
494	log.3 logl.3 \
495	log.3 log10.3 \
496	log.3 log10f.3 \
497	log.3 log10l.3 \
498	log.3 log1p.3 \
499	log.3 log1pf.3 \
500	log.3 log1pl.3 \
501	log.3 log2.3 \
502	log.3 log2f.3 \
503	log.3 log2l.3
504MLINKS+=pow.3 powf.3
505MLINKS+=pow.3 powl.3
506MLINKS+=fabs.3 fabsf.3 \
507	fabs.3 fabsl.3
508MLINKS+=finite.3 finitef.3
509MLINKS+=fmod.3 fmodf.3 \
510	fmod.3 fmodl.3
511MLINKS+=hypot.3 hypotf.3 \
512	hypot.3 hypotl.3
513MLINKS+=ieee_test.3 logb.3 ieee_test.3 logbf.3 ieee_test.3 logbl.3
514MLINKS+=ieee_test.3 scalb.3 ieee_test.3 scalbf.3
515MLINKS+=ieee_test.3 significand.3 ieee_test.3 significandf.3
516MLINKS+=ilogb.3 ilogbf.3 ilogb.3 ilogbl.3
517MLINKS+=isinff.3 isnanf.3
518MLINKS+=j0.3 j0f.3 j0.3 j1.3 j0.3 j1f.3 j0.3 jn.3 j0.3 jnf.3 \
519	j0.3 y0.3 j0.3 y0f.3 j0.3 y1.3 j0.3 y1f.3 j0.3 yn.3 j0.3 ynf.3
520MLINKS+=ldexp.3 ldexpf.3 \
521	ldexp.3 ldexpl.3
522MLINKS+=lgamma.3 lgammaf.3 lgamma.3 lgamma_r.3 lgamma.3 lgammaf_r.3 \
523	lgamma.3 gamma.3 lgamma.3 gammaf.3 lgamma.3 gamma_r.3 \
524	lgamma.3 gammaf_r.3 lgamma.3 tgamma.3 lgamma.3 tgammaf.3 \
525	lgamma.3 lgammal.3 lgamma.3 lgammal_r.3 lgamma.3 tgammal.3
526MLINKS+=modf.3 modff.3 \
527	modf.3 modfl.3
528MLINKS+=nextafter.3 nextafterf.3 \
529	nextafter.3 nextafterl.3 \
530	nextafter.3 nexttoward.3 \
531	nextafter.3 nexttowardf.3 \
532	nextafter.3 nexttowardl.3
533MLINKS+=lrint.3 lrintf.3 lrint.3 lrintl.3 lrint.3 llrint.3 lrint.3 llrintf.3 lrint.3 llrintl.3
534MLINKS+=remainder.3 remainderf.3 \
535	remainder.3 remainderl.3 \
536	remainder.3 remquo.3 \
537	remainder.3 remquof.3 \
538	remainder.3 remquol.3
539MLINKS+=rint.3 rintf.3 \
540	rint.3 rintl.3 \
541	rint.3 nearbyint.3 \
542	rint.3 nearbyintf.3 \
543	rint.3 nearbyintl.3
544MLINKS+=scalbn.3 scalbnf.3 \
545	scalbn.3 scalbnl.3
546MLINKS+=sin.3 sinf.3 \
547	sin.3 sinl.3
548MLINKS+=sinh.3 sinhf.3
549MLINKS+=sinh.3 sinhl.3
550MLINKS+=sqrt.3 sqrtf.3 sqrt.3 sqrtl.3 \
551	sqrt.3 cbrt.3 sqrt.3 cbrtf.3 sqrt.3 cbrtl.3
552MLINKS+=tan.3 tanf.3 \
553	tan.3 tanl.3
554MLINKS+=tanh.3 tanhf.3 \
555	tanh.3 tanhl.3
556MLINKS+=round.3 roundf.3 \
557	round.3 roundl.3
558MLINKS+=trunc.3 truncf.3 \
559	trunc.3 truncl.3
560MLINKS+=fmax.3 fmaxl.3
561MLINKS+=fmax.3 fmaxf.3
562MLINKS+=fmax.3 fmin.3
563MLINKS+=fmax.3 fminl.3
564MLINKS+=fmax.3 fminf.3
565MLINKS+=fdim.3 fdiml.3
566MLINKS+=fdim.3 fdimf.3
567MLINKS+=fma.3 fmaf.3 \
568	fma.3 fmal.3
569MLINKS+=frexp.3 frexpf.3 \
570	frexp.3 frexpl.3
571
572.if (${MKCOMPLEX} != "no")
573.include "${.CURDIR}/complex/Makefile.inc"
574.endif
575
576COPTS.compat_cabs.c+=	${${ACTIVE_CC} == "clang":? -Wno-incompatible-library-redeclaration :}
577COPTS.compat_cabsf.c+=	${${ACTIVE_CC} == "clang":? -Wno-incompatible-library-redeclaration :}
578CWARNFLAGS.clang+=		-Wno-error=implicit-int-float-conversion
579
580.include "${.CURDIR}/compiler_rt/Makefile.inc"
581.include "${.CURDIR}/gen/Makefile.inc"
582
583.include <bsd.lib.mk>
584.include <bsd.subdir.mk>
585