1# $FreeBSD$ 2 3.PATH: ${.CURDIR}/../../include 4 5LIB= egacy 6SRCS= 7INCSGROUPS= INCS 8INCS= 9 10BOOTSTRAPPING?= 0 11 12# Some tools need <sys/endian.h>. 13.if !exists(/usr/include/sys/endian.h) || ${BOOTSTRAPPING} < 500000 14INCSGROUPS+= SYSHDRS 15SYSHDRS= endian.h 16SYSHDRSDIR= ${INCLUDEDIR}/sys 17.endif 18 19# gnu/usr.bin/binutils/ld needs <elf-hints.h>. 20.if !exists(/usr/include/elf-hints.h) 21INCS+= elf-hints.h 22.endif 23 24# lib/libncurses needs <stdbool.h>. 25.if !exists(/usr/include/stdbool.h) 26INCS+= stdbool.h 27.endif 28 29# usr.bin/xargs needs <nl_langinfo.h>. 30.if !exists(/usr/include/langinfo.h) 31INCS+= langinfo.h 32.endif 33 34# Some tools need basename(3). 35.if !exists(/usr/include/libgen.h) 36INCS+= libgen.h 37.PATH: ${.CURDIR}/../../lib/libc/gen 38SRCS+= basename.c 39.endif 40 41# Some tools need {get,set}progname(3). 42.if ( ${BOOTSTRAPPING} < 440001 || \ 43 ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500023 )) 44SRCS+= progname.c 45.endif 46 47# install(1) needs strtofflags(3). 48.if ( ${BOOTSTRAPPING} < 400021 || \ 49 ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500007 )) 50.PATH: ${.CURDIR}/../../lib/libc/gen 51SRCS+= strtofflags.c 52.endif 53 54# Lot of tools need <getopt.h> and getopt_long(3). 55.if !exists(/usr/include/getopt.h) || ${BOOTSTRAPPING} < 502104 56INCS+= getopt.h 57.PATH: ${.CURDIR}/../../lib/libc/stdlib 58SRCS+= getopt_long.c 59.endif 60 61# Some tools depend on a new <regex.h> not requiring <sys/types.h>. 62.if ${BOOTSTRAPPING} < 500042 63INCS+= regex.h 64.endif 65 66.if empty(SRCS) 67SRCS= dummy.c 68.endif 69 70.include <bsd.lib.mk> 71