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