2023-10-29 16:32:52 -07:00
|
|
|
# $OpenBSD: Makefile.inc,v 1.31 2023/10/29 23:32:52 cheloha Exp $
|
1998-11-20 03:18:22 -08:00
|
|
|
#
|
2003-01-20 11:41:53 -08:00
|
|
|
# This file contains make rules used to build libc
|
1998-11-20 03:18:22 -08:00
|
|
|
#
|
|
|
|
|
|
|
|
.ifndef LIBCSRCDIR
|
|
|
|
all:
|
|
|
|
@echo "need to define LIBCSRCDIR" >&2; exit 1
|
|
|
|
.endif
|
|
|
|
|
2016-05-07 12:05:21 -07:00
|
|
|
CFLAGS+=-I${LIBCSRCDIR}/include -I${LIBCSRCDIR}/hidden -D__LIBC__ \
|
2015-09-10 11:13:46 -07:00
|
|
|
-Werror-implicit-function-declaration -include namespace.h
|
1998-11-20 03:18:22 -08:00
|
|
|
|
2015-11-24 21:01:44 -08:00
|
|
|
.if ${COMPILER_VERSION:L} != "gcc3"
|
|
|
|
CFLAGS+=-Werror=deprecated-declarations
|
|
|
|
.endif
|
|
|
|
|
2003-07-23 18:15:41 -07:00
|
|
|
# Include link-time warnings about unsafe API uses (ie. strcpy)
|
2005-03-06 18:26:41 -08:00
|
|
|
CFLAGS+=-DAPIWARN
|
2003-07-23 18:15:41 -07:00
|
|
|
|
2000-09-03 11:41:11 -07:00
|
|
|
.if (${YP:L} == "yes")
|
1998-11-20 03:18:22 -08:00
|
|
|
CFLAGS+=-DYP -I${LIBCSRCDIR}/yp
|
|
|
|
.endif
|
|
|
|
|
|
|
|
LLIBS=
|
2022-01-01 15:47:14 -08:00
|
|
|
AINC= -I${LIBCSRCDIR}/arch/${MACHINE_CPU} -I${LIBCSRCDIR}/arch
|
1998-11-20 03:18:22 -08:00
|
|
|
.if defined(DESTDIR)
|
|
|
|
AINC+= -nostdinc -idirafter ${DESTDIR}/usr/include
|
|
|
|
.endif
|
|
|
|
|
2010-02-03 12:48:58 -08:00
|
|
|
.if exists (${LIBCSRCDIR}/arch/${MACHINE_CPU}/Makefile.inc)
|
|
|
|
.PATH: ${LIBCSRCDIR}/arch/${MACHINE_CPU}
|
|
|
|
.include "${LIBCSRCDIR}/arch/${MACHINE_CPU}/Makefile.inc"
|
1998-11-20 03:18:22 -08:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include "${LIBCSRCDIR}/db/Makefile.inc"
|
2001-11-19 17:09:38 -08:00
|
|
|
.include "${LIBCSRCDIR}/dlfcn/Makefile.inc"
|
Replace the single-byte placeholders for the multi-byte/wide-character
conversion interfaces of libc (mbrtowc(3) and friends) with new
implementations that internally call an API based on NetBSD's citrus.
This allows us to support locales with multi-byte character encodings.
Provide two implementations of the citrus-based API: one based on the old
single-byte placeholders for use with our existing single-byte character
locales (C, ISO8859-*, KOI8, CP1251, etc.), and one that provides support
for UTF-8 encoded characters (code based on FreeBSD's implementation).
Install the en_US.UTF-8 ctype locale support file, and allow the UTF-8
ctype locale to be enabled via setlocale(3) (export LC_CTYPE='en_US.UTF-8').
A lot of programs, especially from ports, will now start using UTF-8 if the
UTF-8 locale is enabled. Use at your own risk, and please report any breakage.
Note that ncurses-based programs cannot display UTF-8 right now, this is being
worked on.
To prevent install media growth, add vfprintf(3) and mbrtowc(3) to libstubs.
The mbrtowc stub was copied unchanged from its old single-byte placeholder.
vfprintf.c doesn't need to be copied, just put in .PATH (hint by fgsch@).
Testing by myself, naddy, sthen, nicm, espie, armani, Dmitrij D. Czarkoff.
ok matthieu espie millert sthen nicm deraadt
2010-07-27 09:59:03 -07:00
|
|
|
.include "${LIBCSRCDIR}/citrus/Makefile.inc"
|
1998-11-20 03:18:22 -08:00
|
|
|
.include "${LIBCSRCDIR}/compat-43/Makefile.inc"
|
|
|
|
.include "${LIBCSRCDIR}/gen/Makefile.inc"
|
|
|
|
.include "${LIBCSRCDIR}/crypt/Makefile.inc"
|
- replace dtoa w/ David's gdtoa, version 2008-03-15
- provide proper dtoa locks
- use the real strtof implementation
- add strtold, __hdtoa, __hldtoa
- add %a/%A support
- don't lose precision in printf, don't round to double anymore
- implement extended-precision versions of libc functions: fpclassify,
isnan, isinf, signbit, isnormal, isfinite, now that the ieee.h is
fixed
- separate vax versions of strtof, and __hdtoa
- add complex math support. added functions: cacos, casin, catan,
ccos, csin, ctan, cacosh, casinh, catanh, ccosh, csinh, ctanh, cexp,
clog, cabs, cpow, csqrt, carg, cimag, conj, cproj, creal, cacosf,
casinf, catanf, ccosf, csinf, ctanf, cacoshf, casinhf, catanhf,
ccoshf, csinhf, ctanhf, cexpf, clogf, cabsf, cpowf, csqrtf, cargf,
cimagf, conjf, cprojf, crealf
- add fdim, fmax, fmin
- add log2. (adapted implementation e_log.c. could be more acruate
& faster, but it's good enough for now)
- remove wrappers & cruft in libm, supposed to work-around mistakes
in SVID, etc.; use ieee versions. fixes issues in python 2.6 for
djm@
- make _digittoint static
- proper definitions for i386, and amd64 in ieee.h
- sh, powerpc don't really have extended-precision
- add missing definitions for mips64 (quad), m{6,8}k (96-bit) float.h
for LDBL_*
- merge lead to frac for m{6,8}k, for gdtoa to work properly
- add FRAC*BITS & EXT_TO_ARRAY32 definitions in ieee.h, for hdtoa&ldtoa
to use
- add EXT_IMPLICIT_NBIT definition, which indicates implicit
normalization bit
- add regression tests for libc: fpclassify and printf
- arith.h & gd_qnan.h definitions
- update ieee.h: hppa doesn't have quad-precision, hppa64 does
- add missing prototypes to gdtoaimp
- on 64-bit platforms make sure gdtoa doesn't use a long when it
really wants an int
- etc., what i may have forgotten...
- bump libm major, due to removed&changed symbols
- no libc bump, since this is riding on djm's libc major crank from
a day ago
discussed with / requested by / testing theo, sthen@, djm@, jsg@,
merdely@, jsing@, tedu@, brad@, jakemsr@, and others.
looks good to millert@
parts of the diff ok kettenis@
this commit does not include:
- man page changes
2008-09-07 13:36:06 -07:00
|
|
|
.include "${LIBCSRCDIR}/gdtoa/Makefile.inc"
|
1998-11-20 03:18:22 -08:00
|
|
|
.include "${LIBCSRCDIR}/gmon/Makefile.inc"
|
|
|
|
.include "${LIBCSRCDIR}/hash/Makefile.inc"
|
|
|
|
.include "${LIBCSRCDIR}/locale/Makefile.inc"
|
2013-03-28 09:43:08 -07:00
|
|
|
.include "${LIBCSRCDIR}/asr/Makefile.inc"
|
1998-11-20 03:18:22 -08:00
|
|
|
.include "${LIBCSRCDIR}/net/Makefile.inc"
|
|
|
|
.include "${LIBCSRCDIR}/nls/Makefile.inc"
|
2015-08-31 12:43:39 -07:00
|
|
|
|
|
|
|
# 32-bit systems need these
|
|
|
|
.if (${MACHINE_CPU} == "i386") || (${MACHINE_CPU} == "powerpc") || \
|
|
|
|
(${MACHINE_CPU} == "hppa") || (${MACHINE_CPU} == "arm") || \
|
2023-10-29 16:32:52 -07:00
|
|
|
(${MACHINE_CPU} == "sh") || \
|
2016-03-09 08:28:44 -08:00
|
|
|
(${MACHINE_CPU} == "m88k")
|
1998-11-20 03:18:22 -08:00
|
|
|
.include "${LIBCSRCDIR}/quad/Makefile.inc"
|
|
|
|
.endif
|
2015-08-31 12:43:39 -07:00
|
|
|
|
1998-11-20 03:18:22 -08:00
|
|
|
.include "${LIBCSRCDIR}/regex/Makefile.inc"
|
|
|
|
.include "${LIBCSRCDIR}/rpc/Makefile.inc"
|
|
|
|
.include "${LIBCSRCDIR}/stdio/Makefile.inc"
|
|
|
|
.include "${LIBCSRCDIR}/stdlib/Makefile.inc"
|
|
|
|
.include "${LIBCSRCDIR}/string/Makefile.inc"
|
|
|
|
.include "${LIBCSRCDIR}/termios/Makefile.inc"
|
2000-01-06 00:47:07 -08:00
|
|
|
.include "${LIBCSRCDIR}/thread/Makefile.inc"
|
1998-11-20 03:18:22 -08:00
|
|
|
.include "${LIBCSRCDIR}/time/Makefile.inc"
|
2014-08-31 02:36:36 -07:00
|
|
|
.include "${LIBCSRCDIR}/uuid/Makefile.inc"
|
1998-11-20 03:18:22 -08:00
|
|
|
.include "${LIBCSRCDIR}/sys/Makefile.inc"
|
2000-09-03 11:41:11 -07:00
|
|
|
.if (${YP:L} == "yes")
|
1998-11-20 03:18:22 -08:00
|
|
|
.include "${LIBCSRCDIR}/yp/Makefile.inc"
|
|
|
|
.endif
|
|
|
|
|
2015-09-10 11:13:46 -07:00
|
|
|
${OBJS} ${GOBJS} ${POBJS} ${SOBJS} ${DOBJS}: ${LIBCSRCDIR}/include/namespace.h
|