1112158Sdas# $FreeBSD$
2112158Sdas
3112158Sdas.PATH: ${.CURDIR}/../../include
4112158Sdas
5112158SdasLIB=		egacy
6112158SdasSRC=
7112158SdasINCSGROUPS=	INCS
8112158SdasINCS=
9112158Sdas
10112158SdasBOOTSTRAPPING?=	0
11112158Sdas
12112158Sdas_WITH_GETLINE!=	grep -c _WITH_GETLINE /usr/include/stdio.h || true
13112158Sdas.if ${_WITH_GETLINE} == 0
14112158Sdas.PATH: ${.CURDIR}/../../contrib/file ${.CURDIR}/../../lib/libmagic
15112158SdasSRCS=		getline.c config.h
16112158SdasCFLAGS+=	-DHAVE_CONFIG_H -I.
17112158SdasCLEANFILES+=	config.h
18112158Sdas
19112158Sdas${SRCS:N*.h:R:S/$/.o/}: config.h
20112158Sdasconfig.h: ${.CURDIR}/../../lib/libmagic/config.h
21112158Sdas	grep -v HAVE_GETLINE ${.ALLSRC} > ${.TARGET}
22112158Sdas.endif
23112158Sdas
24112158Sdas_WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/pwd.h || true
25112158Sdas.if ${_WITH_PWCACHEDB} == 0
26112158Sdas.PATH: ${.CURDIR}/../../contrib/libc-pwcache
27112158SdasCFLAGS+=	-I${.CURDIR}/../../contrib/libc-pwcache \
28112158Sdas		-I${.CURDIR}/../../lib/libc/include
29165743SdasSRCS+=		pwcache.c
30165743Sdas.endif
31112158Sdas
32112158Sdas_WITH_STRSVIS!=	grep -c strsvis /usr/include/vis.h || true
33112158Sdas.if ${_WITH_STRSVIS} == 0
34112158Sdas.PATH: ${.CURDIR}/../../contrib/libc-vis
35112158SdasSRCS+=		vis.c
36112158SdasCFLAGS+=	-I${.CURDIR}/../../contrib/libc-vis \
37112158Sdas		-I${.CURDIR}/../../lib/libc/include
38112158Sdas.endif
39112158Sdas
40112158Sdas.if empty(SRCS)
41112158SdasSRCS=		dummy.c
42112158Sdas.endif
43112158Sdas
44112158Sdas.if defined(CROSS_BUILD_TESTING)
45112158SdasSUBDIR=		cross-build
46112158Sdas.endif
47112158Sdas
48112158Sdas.include <bsd.lib.mk>
49112158Sdas