130aaff11SWarner Losh# $FreeBSD$ 230aaff11SWarner Losh 330aaff11SWarner Losh.PATH: ${.CURDIR}/../../include 430aaff11SWarner Losh 51c62f923SWarner LoshLIB= egacy 630aaff11SWarner LoshSRCS= 730aaff11SWarner LoshINCSGROUPS= INCS 830aaff11SWarner LoshINCS= 930aaff11SWarner Losh 1030aaff11SWarner LoshBOOTSTRAPPING?= 0 1130aaff11SWarner Losh 1230aaff11SWarner Losh# Some tools need <sys/endian.h>. 1330aaff11SWarner Losh.if !exists(/usr/include/sys/endian.h) 1430aaff11SWarner LoshINCSGROUPS+= SYSHDRS 1530aaff11SWarner LoshSYSHDRS= endian.h 1630aaff11SWarner LoshSYSHDRSDIR= ${INCLUDEDIR}/sys 1730aaff11SWarner Losh.endif 1830aaff11SWarner Losh 1930aaff11SWarner Losh# gnu/usr.bin/binutils/ld needs <elf-hints.h>. 2030aaff11SWarner Losh.if !exists(/usr/include/elf-hints.h) 2130aaff11SWarner LoshINCS+= elf-hints.h 2230aaff11SWarner Losh.endif 2330aaff11SWarner Losh 2430aaff11SWarner Losh# lib/libncurses needs <stdbool.h>. 2530aaff11SWarner Losh.if !exists(/usr/include/stdbool.h) 2630aaff11SWarner LoshINCS+= stdbool.h 2730aaff11SWarner Losh.endif 2830aaff11SWarner Losh 2930aaff11SWarner Losh# usr.bin/xargs needs <nl_langinfo.h>. 3030aaff11SWarner Losh.if !exists(/usr/include/langinfo.h) 3130aaff11SWarner LoshINCS+= langinfo.h 3230aaff11SWarner Losh.endif 3330aaff11SWarner Losh 3430aaff11SWarner Losh# gnu/usr.bin/binutils/libiberty needs basename(3). 3530aaff11SWarner Losh.if ( ${BOOTSTRAPPING} < 440000 || \ 3630aaff11SWarner Losh ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500022 )) 3730aaff11SWarner Losh.PATH: ${.CURDIR}/../../lib/libc/gen 3830aaff11SWarner LoshSRCS+= basename.c 3930aaff11SWarner Losh.endif 4030aaff11SWarner Losh 4130aaff11SWarner Losh# Some tools need {get,set}progname(3). 4230aaff11SWarner Losh.if ( ${BOOTSTRAPPING} < 440001 || \ 4330aaff11SWarner Losh ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500023 )) 4430aaff11SWarner LoshSRCS+= progname.c 4530aaff11SWarner Losh.endif 4630aaff11SWarner Losh 4730aaff11SWarner Losh# install(1) needs strtofflags(3). 4830aaff11SWarner Losh.if ( ${BOOTSTRAPPING} < 400021 || \ 4930aaff11SWarner Losh ( ${BOOTSTRAPPING} >= 500000 && ${BOOTSTRAPPING} < 500007 )) 5030aaff11SWarner Losh.PATH: ${.CURDIR}/../../lib/libc/gen 5130aaff11SWarner LoshSRCS+= strtofflags.c 5230aaff11SWarner Losh.endif 5330aaff11SWarner Losh 5430aaff11SWarner Losh.if empty(SRCS) 5530aaff11SWarner LoshSRCS= dummy.c 5630aaff11SWarner Losh.endif 5730aaff11SWarner Losh 5830aaff11SWarner Losh.include <bsd.lib.mk> 59