1# $FreeBSD$ 2 3.PATH: ${.CURDIR}/../../include 4 5LIB= egacy 6SRC= 7INCSGROUPS= INCS 8INCS= 9 10BOOTSTRAPPING?= 0 11 12_WITH_GETLINE!= grep -c _WITH_GETLINE /usr/include/stdio.h || true 13.if ${_WITH_GETLINE} == 0 14.PATH: ${.CURDIR}/../../contrib/file ${.CURDIR}/../../lib/libmagic 15SRCS= getline.c config.h 16CFLAGS+= -DHAVE_CONFIG_H -I. 17CLEANFILES+= config.h 18 19${SRCS:N*.h:R:S/$/.o/}: config.h 20config.h: ${.CURDIR}/../../lib/libmagic/config.h 21 grep -v HAVE_GETLINE ${.ALLSRC} > ${.TARGET} 22.endif 23 24_WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/pwd.h || true 25.if ${_WITH_PWCACHEDB} == 0 26.PATH: ${.CURDIR}/../../contrib/libc-pwcache 27CFLAGS+= -I${.CURDIR}/../../contrib/libc-pwcache \ 28 -I${.CURDIR}/../../lib/libc/include 29SRCS+= pwcache.c 30.endif 31 32_WITH_STRSVIS!= grep -c strsvis /usr/include/vis.h || true 33.if ${_WITH_STRSVIS} == 0 34.PATH: ${.CURDIR}/../../contrib/libc-vis 35SRCS+= vis.c 36CFLAGS+= -I${.CURDIR}/../../contrib/libc-vis \ 37 -I${.CURDIR}/../../lib/libc/include 38.endif 39 40.if empty(SRCS) 41SRCS= dummy.c 42.endif 43 44.if defined(CROSS_BUILD_TESTING) 45SUBDIR= cross-build 46.endif 47 48.include <bsd.lib.mk> 49