11573Srgrimes# $FreeBSD: releng/10.3/tools/build/Makefile 245311 2013-01-11 20:51:02Z brooks $
21573Srgrimes
31573Srgrimes.PATH: ${.CURDIR}/../../include
41573Srgrimes
51573SrgrimesLIB=		egacy
61573SrgrimesSRC=
71573SrgrimesINCSGROUPS=	INCS
81573SrgrimesINCS=
91573Srgrimes
101573SrgrimesBOOTSTRAPPING?=	0
111573Srgrimes
121573Srgrimes_WITH_GETLINE!=	grep -c _WITH_GETLINE /usr/include/stdio.h || true
131573Srgrimes.if ${_WITH_GETLINE} == 0
141573Srgrimes.PATH: ${.CURDIR}/../../contrib/file ${.CURDIR}/../../lib/libmagic
151573SrgrimesSRCS=		getline.c config.h
161573SrgrimesCFLAGS+=	-DHAVE_CONFIG_H -I.
171573SrgrimesCLEANFILES+=	config.h
181573Srgrimes
191573Srgrimes${SRCS:N*.h:R:S/$/.o/}: config.h
201573Srgrimesconfig.h: ${.CURDIR}/../../lib/libmagic/config.h
211573Srgrimes	grep -v HAVE_GETLINE ${.ALLSRC} > ${.TARGET}
221573Srgrimes.endif
231573Srgrimes
241573Srgrimes_WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/pwd.h || true
251573Srgrimes.if ${_WITH_PWCACHEDB} == 0
261573Srgrimes.PATH: ${.CURDIR}/../../contrib/libc-pwcache
271573SrgrimesCFLAGS+=	-I${.CURDIR}/../../contrib/libc-pwcache \
281573Srgrimes		-I${.CURDIR}/../../lib/libc/include
291573SrgrimesSRCS+=		pwcache.c
301573Srgrimes.endif
311573Srgrimes
3250476Speter_WITH_STRSVIS!=	grep -c strsvis /usr/include/vis.h || true
331573Srgrimes.if ${_WITH_STRSVIS} == 0
341573Srgrimes.PATH: ${.CURDIR}/../../contrib/libc-vis
351573SrgrimesSRCS+=		vis.c
361573SrgrimesCFLAGS+=	-I${.CURDIR}/../../contrib/libc-vis \
371573Srgrimes		-I${.CURDIR}/../../lib/libc/include
381573Srgrimes.endif
391573Srgrimes
401573Srgrimes.if empty(SRCS)
4159460SphantomSRCS=		dummy.c
4259460Sphantom.endif
431573Srgrimes
4484306Sru.if defined(CROSS_BUILD_TESTING)
451573SrgrimesSUBDIR=		cross-build
461573Srgrimes.endif
471573Srgrimes
481573Srgrimes.include <bsd.lib.mk>
491573Srgrimes