xref: /NextBSD/tools/build/Makefile (revision eca8806ca223b223cfb8096ee948bc35fea9271f)
1# $FreeBSD$
2
3.PATH: ${.CURDIR}/../../include
4
5LIB=		egacy
6SRC=
7INCSGROUPS=	INCS
8INCS=
9
10BOOTSTRAPPING?=	0
11
12_WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/grp.h || true
13.if ${_WITH_PWCACHEDB} == 0
14.PATH: ${.CURDIR}/../../contrib/libc-pwcache
15CFLAGS+=	-I${.CURDIR}/../../contrib/libc-pwcache \
16		-I${.CURDIR}/../../lib/libc/include
17SRCS+=		pwcache.c
18.endif
19
20_WITH_STRSVIS!=	grep -c strsvis /usr/include/vis.h || true
21.if ${_WITH_STRSVIS} == 0
22.PATH: ${.CURDIR}/../../contrib/libc-vis
23SRCS+=		vis.c
24CFLAGS+=	-I${.CURDIR}/../../contrib/libc-vis \
25		-I${.CURDIR}/../../lib/libc/include
26.endif
27
28_WITH_REALLOCARRAY!= grep -c reallocarray /usr/include/stdlib.h || true
29.if ${_WITH_REALLOCARRAY} == 0
30.PATH: ${.CURDIR}/../../lib/libc/stdlib
31INCS+=		stdlib.h
32SRCS+=		reallocarray.c
33CFLAGS+=	-I${.CURDIR}/../../lib/libc/include
34.endif
35
36.if empty(SRCS)
37SRCS=		dummy.c
38.endif
39
40.if defined(CROSS_BUILD_TESTING)
41SUBDIR=		cross-build
42.endif
43
44.include <bsd.lib.mk>
45