2003-04-05 20:30:30 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
.PATH: ${.CURDIR}/../../include
|
|
|
|
|
2003-04-06 21:46:44 +00:00
|
|
|
LIB= egacy
|
2003-04-05 20:30:30 +00:00
|
|
|
SRCS=
|
|
|
|
INCSGROUPS= INCS
|
|
|
|
INCS=
|
|
|
|
|
|
|
|
BOOTSTRAPPING?= 0
|
|
|
|
|
|
|
|
# Some tools need <sys/endian.h>.
|
2003-04-15 06:51:04 +00:00
|
|
|
.if !exists(/usr/include/sys/endian.h) || ${BOOTSTRAPPING} < 500000
|
2003-04-05 20:30:30 +00:00
|
|
|
INCSGROUPS+= SYSHDRS
|
|
|
|
SYSHDRS= endian.h
|
|
|
|
SYSHDRSDIR= ${INCLUDEDIR}/sys
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# gnu/usr.bin/binutils/ld needs <elf-hints.h>.
|
|
|
|
.if !exists(/usr/include/elf-hints.h)
|
|
|
|
INCS+= elf-hints.h
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# lib/libncurses needs <stdbool.h>.
|
|
|
|
.if !exists(/usr/include/stdbool.h)
|
|
|
|
INCS+= stdbool.h
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# usr.bin/xargs needs <nl_langinfo.h>.
|
|
|
|
.if !exists(/usr/include/langinfo.h)
|
|
|
|
INCS+= langinfo.h
|
|
|
|
.endif
|
|
|
|
|
2003-04-11 17:58:17 +00:00
|
|
|
# Some tools need basename(3).
|
|
|
|
.if !exists(/usr/include/libgen.h)
|
|
|
|
INCS+= libgen.h
|
2003-04-05 20:30:30 +00:00
|
|
|
.PATH: ${.CURDIR}/../../lib/libc/gen
|
|
|
|
SRCS+= basename.c
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Some tools need {get,set}progname(3).
|
|
|
|
.if ( ${BOOTSTRAPPING} < 440001 || \
|
|
|
|
( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500023 ))
|
|
|
|
SRCS+= progname.c
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# install(1) needs strtofflags(3).
|
|
|
|
.if ( ${BOOTSTRAPPING} < 400021 || \
|
|
|
|
( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500007 ))
|
|
|
|
.PATH: ${.CURDIR}/../../lib/libc/gen
|
|
|
|
SRCS+= strtofflags.c
|
|
|
|
.endif
|
|
|
|
|
2004-02-20 11:55:14 +00:00
|
|
|
# Lot of tools need <getopt.h> and getopt_long(3).
|
2004-03-01 17:47:38 +00:00
|
|
|
.if !exists(/usr/include/getopt.h) || ${BOOTSTRAPPING} < 502104
|
2004-02-20 11:55:14 +00:00
|
|
|
INCS+= getopt.h
|
|
|
|
.PATH: ${.CURDIR}/../../lib/libc/stdlib
|
|
|
|
SRCS+= getopt_long.c
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# Some tools depend on a new <regex.h> not requiring <sys/types.h>.
|
|
|
|
.if ${BOOTSTRAPPING} < 500042
|
|
|
|
INCS+= regex.h
|
|
|
|
.endif
|
|
|
|
|
2003-04-05 20:30:30 +00:00
|
|
|
.if empty(SRCS)
|
|
|
|
SRCS= dummy.c
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.lib.mk>
|