130aaff11SWarner Losh# $FreeBSD$ 230aaff11SWarner Losh 330aaff11SWarner Losh.PATH: ${.CURDIR}/../../include 430aaff11SWarner Losh 51c62f923SWarner LoshLIB= egacy 6c2774610SDavid E. O'BrienSRC= 7d80f1dd1SJilles TjoelkerINCSGROUPS= INCS SYSINCS 830aaff11SWarner LoshINCS= 930aaff11SWarner Losh 10d80f1dd1SJilles TjoelkerSYSINCSDIR= ${INCLUDEDIR}/sys 11d80f1dd1SJilles Tjoelker 1230aaff11SWarner LoshBOOTSTRAPPING?= 0 1330aaff11SWarner Losh 14804baa38SBryan Drewery_WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/grp.h || true 1579626055SBrooks Davis.if ${_WITH_PWCACHEDB} == 0 1679626055SBrooks Davis.PATH: ${.CURDIR}/../../contrib/libc-pwcache 1779626055SBrooks DavisCFLAGS+= -I${.CURDIR}/../../contrib/libc-pwcache \ 1879626055SBrooks Davis -I${.CURDIR}/../../lib/libc/include 1979626055SBrooks DavisSRCS+= pwcache.c 2079626055SBrooks Davis.endif 2179626055SBrooks Davis 22804baa38SBryan Drewery_WITH_STRSVIS!= grep -c strsvis /usr/include/vis.h || true 2379626055SBrooks Davis.if ${_WITH_STRSVIS} == 0 2479626055SBrooks Davis.PATH: ${.CURDIR}/../../contrib/libc-vis 2579626055SBrooks DavisSRCS+= vis.c 2679626055SBrooks DavisCFLAGS+= -I${.CURDIR}/../../contrib/libc-vis \ 2779626055SBrooks Davis -I${.CURDIR}/../../lib/libc/include 2879626055SBrooks Davis.endif 2979626055SBrooks Davis 30804baa38SBryan Drewery_WITH_REALLOCARRAY!= grep -c reallocarray /usr/include/stdlib.h || true 318e7e3163SDimitry Andric.if ${_WITH_REALLOCARRAY} == 0 328e7e3163SDimitry Andric.PATH: ${.CURDIR}/../../lib/libc/stdlib 338e7e3163SDimitry AndricINCS+= stdlib.h 348e7e3163SDimitry AndricSRCS+= reallocarray.c 358e7e3163SDimitry AndricCFLAGS+= -I${.CURDIR}/../../lib/libc/include 368e7e3163SDimitry Andric.endif 378e7e3163SDimitry Andric 38d80f1dd1SJilles Tjoelker_WITH_UTIMENS!= grep -c utimensat /usr/include/sys/stat.h || true 39d80f1dd1SJilles Tjoelker.if ${_WITH_UTIMENS} == 0 40d80f1dd1SJilles TjoelkerSYSINCS+= stat.h 41d80f1dd1SJilles TjoelkerSRCS+= futimens.c utimensat.c 42d80f1dd1SJilles Tjoelker.endif 43d80f1dd1SJilles Tjoelker 44*8d14ced6SAlex Richardson_WITH_EXPLICIT_BZERO!= grep -c explicit_bzero /usr/include/strings.h || true 45*8d14ced6SAlex Richardson.if ${_WITH_EXPLICIT_BZERO} == 0 46*8d14ced6SAlex Richardson.PATH: ${SRCTOP}/sys/libkern 47*8d14ced6SAlex RichardsonINCS+= strings.h 48*8d14ced6SAlex RichardsonSRCS+= explicit_bzero.c 49*8d14ced6SAlex Richardson.endif 50*8d14ced6SAlex Richardson 5130aaff11SWarner Losh.if empty(SRCS) 5230aaff11SWarner LoshSRCS= dummy.c 5330aaff11SWarner Losh.endif 5430aaff11SWarner Losh 55f09a3cc4SRuslan Ermilov.if defined(CROSS_BUILD_TESTING) 56f09a3cc4SRuslan ErmilovSUBDIR= cross-build 57f09a3cc4SRuslan Ermilov.endif 58f09a3cc4SRuslan Ermilov 5963889bbdSAlex Richardson# Needed to build config (since it uses libnv) 6063889bbdSAlex RichardsonSYSINCS+= ${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h 6163889bbdSAlex Richardson 6230aaff11SWarner Losh.include <bsd.lib.mk> 63