Changeset View
Changeset View
Standalone View
Standalone View
tools/build/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
.PATH: ${.CURDIR}/../../include | .PATH: ${.CURDIR}/../../include | ||||
LIB= egacy | LIB= egacy | ||||
SRC= | SRC= | ||||
INCSGROUPS= INCS SYSINCS | INCSGROUPS= INCS SYSINCS MACHINESYSINCS UFSINCS FFSINCS X86INCS | ||||
INCS= | INCS= | ||||
SYSINCSDIR= ${INCLUDEDIR}/sys | SYSINCSDIR= ${INCLUDEDIR}/sys | ||||
MACHINESYSINCSDIR= ${INCLUDEDIR}/machine | |||||
UFSINCSDIR= ${INCLUDEDIR}/ufs/ufs | |||||
FFSINCSDIR= ${INCLUDEDIR}/ufs/ffs | |||||
X86INCSDIR= ${INCLUDEDIR}/x86 | |||||
BOOTSTRAPPING?= 0 | BOOTSTRAPPING?= 0 | ||||
_WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/grp.h || true | _WITH_PWCACHEDB!= grep -c pwcache_groupdb /usr/include/grp.h || true | ||||
.if ${_WITH_PWCACHEDB} == 0 | .if ${_WITH_PWCACHEDB} == 0 | ||||
.PATH: ${.CURDIR}/../../contrib/libc-pwcache | .PATH: ${.CURDIR}/../../contrib/libc-pwcache | ||||
CFLAGS+= -I${.CURDIR}/../../contrib/libc-pwcache \ | CFLAGS.pwcache.c+= -I${.CURDIR}/../../contrib/libc-pwcache \ | ||||
-I${.CURDIR}/../../lib/libc/include | -I${.CURDIR}/../../lib/libc/include | ||||
SRCS+= pwcache.c | SRCS+= pwcache.c | ||||
.endif | .endif | ||||
_WITH_STRSVIS!= grep -c strsvis /usr/include/vis.h || true | _WITH_STRSVIS!= grep -c strsvis /usr/include/vis.h || true | ||||
.if ${_WITH_STRSVIS} == 0 | .if ${_WITH_STRSVIS} == 0 | ||||
.PATH: ${.CURDIR}/../../contrib/libc-vis | .PATH: ${.CURDIR}/../../contrib/libc-vis | ||||
SRCS+= vis.c | SRCS+= vis.c | ||||
CFLAGS+= -I${.CURDIR}/../../contrib/libc-vis \ | CFLAGS.vis.c+= -I${.CURDIR}/../../contrib/libc-vis \ | ||||
-I${.CURDIR}/../../lib/libc/include | -I${.CURDIR}/../../lib/libc/include | ||||
.endif | .endif | ||||
_WITH_REALLOCARRAY!= grep -c reallocarray /usr/include/stdlib.h || true | _WITH_REALLOCARRAY!= grep -c reallocarray /usr/include/stdlib.h || true | ||||
.if ${_WITH_REALLOCARRAY} == 0 | .if ${_WITH_REALLOCARRAY} == 0 | ||||
.PATH: ${.CURDIR}/../../lib/libc/stdlib | .PATH: ${.CURDIR}/../../lib/libc/stdlib | ||||
INCS+= stdlib.h | INCS+= stdlib.h | ||||
SRCS+= reallocarray.c | SRCS+= reallocarray.c | ||||
CFLAGS+= -I${.CURDIR}/../../lib/libc/include | CFLAGS.reallocarray.c+= -I${.CURDIR}/../../lib/libc/include | ||||
.endif | .endif | ||||
_WITH_UTIMENS!= grep -c utimensat /usr/include/sys/stat.h || true | _WITH_UTIMENS!= grep -c utimensat /usr/include/sys/stat.h || true | ||||
.if ${_WITH_UTIMENS} == 0 | .if ${_WITH_UTIMENS} == 0 | ||||
SYSINCS+= stat.h | SYSINCS+= stat.h | ||||
SRCS+= futimens.c utimensat.c | SRCS+= futimens.c utimensat.c | ||||
.endif | |||||
.if ${.MAKE.OS} != "FreeBSD" | |||||
# don't copy stdlib.h when cross-building since it will cause | |||||
# conflicts with the host system's headers | |||||
INCS:= ${INCS:Nstdlib.h} | |||||
SYSINCS+= ${SRCTOP}/sys/sys/md5.h | |||||
SYSINCS+= ${SRCTOP}/sys/sys/sbuf.h | |||||
SYSINCS+= ${SRCTOP}/sys/sys/elf32.h | |||||
SYSINCS+= ${SRCTOP}/sys/sys/elf64.h | |||||
SYSINCS+= ${SRCTOP}/sys/sys/elf_common.h | |||||
SYSINCS+= ${SRCTOP}/sys/sys/elf_generic.h | |||||
_host_arch=${MACHINE} | |||||
.if ${_host_arch} == "x86_64" | |||||
# bmake on Linux/mac often prints that instead of amd64 | |||||
_host_arch=amd64 | |||||
.endif | |||||
MACHINESYSINCS+= ${SRCTOP}/sys/${_host_arch}/include/elf.h | |||||
.if ${_host_arch} == "amd64" || ${_host_arch} == "i386" | |||||
X86INCS+= ${SRCTOP}/sys/x86/include/elf.h | |||||
.endif | |||||
.PATH: ${.CURDIR}/../../lib/libc/stdlib | |||||
SRCS+= strtonum.c | |||||
.PATH: ${.CURDIR}/../../lib/libc/locale | |||||
SRCS+= rpmatch.c | |||||
# needed for btxld: | |||||
MACHINESYSINCS+= ${SRCTOP}/sys/${_host_arch}/include/exec.h | |||||
MACHINESYSINCS+= ${SRCTOP}/sys/${_host_arch}/include/reloc.h | |||||
INCS+= ${SRCTOP}/include/a.out.h | |||||
SYSINCS+= ${SRCTOP}/sys/sys/imgact_aout.h | |||||
# For mkscrfil.c: | |||||
SYSINCS+= ${SRCTOP}/sys/sys/consio.h ${SRCTOP}/sys/sys/ioccom.h | |||||
# for gencat: | |||||
INCS+= ${SRCTOP}/include/nl_types.h | |||||
#for makefs: | |||||
UFSINCS+= ${SRCTOP}/sys/ufs/ufs/dinode.h | |||||
UFSINCS+= ${SRCTOP}/sys/ufs/ufs/dir.h | |||||
FFSINCS+= ${SRCTOP}/sys/ufs/ffs/fs.h | |||||
# for tzsetup: | |||||
SRCS+= fake_sysctl.c | |||||
# for vtfontcvt: | |||||
SYSINCS+= ${SRCTOP}/sys/sys/fnv_hash.h | |||||
# opensolaris stuff | |||||
INCS+= ${SRCTOP}/include/elf.h | |||||
.endif | .endif | ||||
.if empty(SRCS) | .if empty(SRCS) | ||||
SRCS= dummy.c | SRCS= dummy.c | ||||
.endif | .endif | ||||
.if defined(CROSS_BUILD_TESTING) | .if defined(CROSS_BUILD_TESTING) | ||||
SUBDIR= cross-build | SUBDIR= cross-build | ||||
.endif | .endif | ||||
.include <bsd.lib.mk> | .include <bsd.lib.mk> |