xref: /freebsd/tools/build/Makefile (revision d80f1dd1d78ddebee8de9cfba9413032a1fedba8)
130aaff11SWarner Losh# $FreeBSD$
230aaff11SWarner Losh
330aaff11SWarner Losh.PATH: ${.CURDIR}/../../include
430aaff11SWarner Losh
51c62f923SWarner LoshLIB=		egacy
6c2774610SDavid E. O'BrienSRC=
7*d80f1dd1SJilles TjoelkerINCSGROUPS=	INCS SYSINCS
830aaff11SWarner LoshINCS=
930aaff11SWarner Losh
10*d80f1dd1SJilles TjoelkerSYSINCSDIR=	${INCLUDEDIR}/sys
11*d80f1dd1SJilles 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
38*d80f1dd1SJilles Tjoelker_WITH_UTIMENS!= grep -c utimensat /usr/include/sys/stat.h || true
39*d80f1dd1SJilles Tjoelker.if ${_WITH_UTIMENS} == 0
40*d80f1dd1SJilles TjoelkerSYSINCS+=	stat.h
41*d80f1dd1SJilles TjoelkerSRCS+=		futimens.c utimensat.c
42*d80f1dd1SJilles Tjoelker.endif
43*d80f1dd1SJilles Tjoelker
4430aaff11SWarner Losh.if empty(SRCS)
4530aaff11SWarner LoshSRCS=		dummy.c
4630aaff11SWarner Losh.endif
4730aaff11SWarner Losh
48f09a3cc4SRuslan Ermilov.if defined(CROSS_BUILD_TESTING)
49f09a3cc4SRuslan ErmilovSUBDIR=		cross-build
50f09a3cc4SRuslan Ermilov.endif
51f09a3cc4SRuslan Ermilov
5230aaff11SWarner Losh.include <bsd.lib.mk>
53