2003-04-05 20:30:30 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
.PATH: ${.CURDIR}/../../include
|
|
|
|
|
2003-04-06 21:46:44 +00:00
|
|
|
LIB= egacy
|
2012-09-11 22:38:33 +00:00
|
|
|
SRC=
|
2016-06-09 21:57:34 +00:00
|
|
|
INCSGROUPS= INCS SYSINCS
|
2012-09-11 22:38:33 +00:00
|
|
|
INCS=
|
2003-04-05 20:30:30 +00:00
|
|
|
|
2016-06-09 21:57:34 +00:00
|
|
|
SYSINCSDIR= ${INCLUDEDIR}/sys
|
|
|
|
|
2003-04-05 20:30:30 +00:00
|
|
|
BOOTSTRAPPING?= 0
|
|
|
|
|
2015-11-16 21:05:38 +00:00
|
|
|
_WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/grp.h || true
|
2013-01-11 20:51:02 +00:00
|
|
|
.if ${_WITH_PWCACHEDB} == 0
|
|
|
|
.PATH: ${.CURDIR}/../../contrib/libc-pwcache
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../contrib/libc-pwcache \
|
|
|
|
-I${.CURDIR}/../../lib/libc/include
|
|
|
|
SRCS+= pwcache.c
|
|
|
|
.endif
|
|
|
|
|
2015-11-16 21:05:38 +00:00
|
|
|
_WITH_STRSVIS!= grep -c strsvis /usr/include/vis.h || true
|
2013-01-11 20:51:02 +00:00
|
|
|
.if ${_WITH_STRSVIS} == 0
|
|
|
|
.PATH: ${.CURDIR}/../../contrib/libc-vis
|
|
|
|
SRCS+= vis.c
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../contrib/libc-vis \
|
|
|
|
-I${.CURDIR}/../../lib/libc/include
|
|
|
|
.endif
|
|
|
|
|
2015-11-16 21:05:38 +00:00
|
|
|
_WITH_REALLOCARRAY!= grep -c reallocarray /usr/include/stdlib.h || true
|
2015-05-15 22:19:35 +00:00
|
|
|
.if ${_WITH_REALLOCARRAY} == 0
|
|
|
|
.PATH: ${.CURDIR}/../../lib/libc/stdlib
|
|
|
|
INCS+= stdlib.h
|
|
|
|
SRCS+= reallocarray.c
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../lib/libc/include
|
|
|
|
.endif
|
|
|
|
|
2016-06-09 21:57:34 +00:00
|
|
|
_WITH_UTIMENS!= grep -c utimensat /usr/include/sys/stat.h || true
|
|
|
|
.if ${_WITH_UTIMENS} == 0
|
|
|
|
SYSINCS+= stat.h
|
|
|
|
SRCS+= futimens.c utimensat.c
|
|
|
|
.endif
|
|
|
|
|
2018-07-16 11:03:05 +00:00
|
|
|
_WITH_EXPLICIT_BZERO!= grep -c explicit_bzero /usr/include/strings.h || true
|
|
|
|
.if ${_WITH_EXPLICIT_BZERO} == 0
|
|
|
|
.PATH: ${SRCTOP}/sys/libkern
|
|
|
|
INCS+= strings.h
|
|
|
|
SRCS+= explicit_bzero.c
|
|
|
|
.endif
|
|
|
|
|
2003-04-05 20:30:30 +00:00
|
|
|
.if empty(SRCS)
|
|
|
|
SRCS= dummy.c
|
|
|
|
.endif
|
|
|
|
|
2005-03-02 16:40:51 +00:00
|
|
|
.if defined(CROSS_BUILD_TESTING)
|
|
|
|
SUBDIR= cross-build
|
|
|
|
.endif
|
|
|
|
|
2018-07-16 10:57:26 +00:00
|
|
|
# Needed to build config (since it uses libnv)
|
|
|
|
SYSINCS+= ${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h
|
|
|
|
|
2018-08-20 10:39:53 +00:00
|
|
|
|
|
|
|
# Create all the directories that are needed during the legacy, bootstrap-tools
|
|
|
|
# and cross-tools stages. We do this here using mkdir since mtree may not exist
|
|
|
|
# yet (this happens if we are crossbuilding from Linux/Mac).
|
|
|
|
installdirs:
|
|
|
|
.for _dir in bin sbin usr/bin usr/sbin usr/lib usr/include lib/geom lib/casper
|
|
|
|
mkdir -p "${DESTDIR}/${_dir}"
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for _group in ${INCSGROUPS:NINCS}
|
|
|
|
mkdir -p "${DESTDIR}/${${_group}DIR}"
|
|
|
|
.endfor
|
|
|
|
|
2003-04-05 20:30:30 +00:00
|
|
|
.include <bsd.lib.mk>
|