Changeset View
Changeset View
Standalone View
Standalone View
tools/build/Makefile
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | |||||
INCS+= libcasper.h | INCS+= libcasper.h | ||||
.endif | .endif | ||||
# rpcgen should build against the source tree rpc/types.h and not the host. | # rpcgen should build against the source tree rpc/types.h and not the host. | ||||
# This is especially important on non-FreeBSD systems where the types may | # This is especially important on non-FreeBSD systems where the types may | ||||
# not match. | # not match. | ||||
RPCINCS+= ${SRCTOP}/sys/rpc/types.h | RPCINCS+= ${SRCTOP}/sys/rpc/types.h | ||||
.if ${.MAKE.OS} != "FreeBSD" | |||||
.PATH: ${.CURDIR}/cross-build | |||||
INCS+= ${SRCTOP}/include/mpool.h | INCS+= ${SRCTOP}/include/mpool.h | ||||
INCS+= ${SRCTOP}/include/ndbm.h | INCS+= ${SRCTOP}/include/ndbm.h | ||||
INCS+= ${SRCTOP}/include/err.h | INCS+= ${SRCTOP}/include/err.h | ||||
INCS+= ${SRCTOP}/include/stringlist.h | INCS+= ${SRCTOP}/include/stringlist.h | ||||
# Needed to build arc4random.c | # Needed to build arc4random.c | ||||
INCSGROUPS+= CHACHA20INCS | INCSGROUPS+= CHACHA20INCS | ||||
CHACHA20INCSDIR= ${INCLUDEDIR}/crypto/chacha20 | CHACHA20INCSDIR= ${INCLUDEDIR}/crypto/chacha20 | ||||
CHACHA20INCS+= ${SRCTOP}/sys/crypto/chacha20/_chacha.h \ | CHACHA20INCS+= ${SRCTOP}/sys/crypto/chacha20/_chacha.h \ | ||||
${SRCTOP}/sys/crypto/chacha20/chacha.h | ${SRCTOP}/sys/crypto/chacha20/chacha.h | ||||
_host_arch=${MACHINE} | _host_arch=${MACHINE} | ||||
.if ${_host_arch} == "x86_64" | .if ${_host_arch} == "x86_64" | ||||
# bmake on Linux/mac often prints that instead of amd64 | # bmake on Linux/mac often prints that instead of amd64 | ||||
_host_arch=amd64 | _host_arch=amd64 | ||||
.endif | .endif | ||||
.if ${_host_arch} == "unknown" | .if ${_host_arch} == "unknown" | ||||
# HACK: If MACHINE is unknown, assume we are building on x86 | # HACK: If MACHINE is unknown, assume we are building on x86 | ||||
_host_arch=amd64 | _host_arch=amd64 | ||||
.endif | .endif | ||||
MACHINESYSINCS+= ${SRCTOP}/sys/${_host_arch}/include/elf.h | MACHINESYSINCS+= ${SRCTOP}/sys/${_host_arch}/include/elf.h | ||||
.if ${_host_arch} == "amd64" || ${_host_arch} == "i386" | .if ${_host_arch} == "amd64" || ${_host_arch} == "i386" | ||||
INCSGROUPS+= X86INCS | INCSGROUPS+= X86INCS | ||||
X86INCSDIR= ${INCLUDEDIR}/x86 | X86INCSDIR= ${INCLUDEDIR}/x86 | ||||
X86INCS+= ${SRCTOP}/sys/x86/include/elf.h | X86INCS+= ${SRCTOP}/sys/x86/include/elf.h | ||||
imp: Wouldn't you still need the amd64/i386 versions of these as well to build? | |||||
Done Inline ActionsGood catch, I got confused about why both existed. arichardson: Good catch, I got confused about why both existed.
Turns out the amd64/i386 headers are simply… | |||||
.endif | .endif | ||||
# needed for btxld: | # needed for btxld: | ||||
MACHINESYSINCS+= ${SRCTOP}/sys/${_host_arch}/include/exec.h | MACHINESYSINCS+= ${SRCTOP}/sys/${_host_arch}/include/exec.h | ||||
MACHINESYSINCS+= ${SRCTOP}/sys/${_host_arch}/include/reloc.h | MACHINESYSINCS+= ${SRCTOP}/sys/${_host_arch}/include/reloc.h | ||||
INCS+= ${SRCTOP}/include/a.out.h | INCS+= ${SRCTOP}/include/a.out.h | ||||
INCS+= ${SRCTOP}/include/nlist.h | INCS+= ${SRCTOP}/include/nlist.h | ||||
SYSINCS+= ${SRCTOP}/sys/sys/imgact_aout.h | SYSINCS+= ${SRCTOP}/sys/sys/imgact_aout.h | ||||
SYSINCS+= ${SRCTOP}/sys/sys/nlist_aout.h | SYSINCS+= ${SRCTOP}/sys/sys/nlist_aout.h | ||||
.if ${.MAKE.OS} != "FreeBSD" | |||||
.PATH: ${.CURDIR}/cross-build | |||||
# dbopen() behaves differently on Linux and FreeBSD so we ensure that we | # dbopen() behaves differently on Linux and FreeBSD so we ensure that we | ||||
# bootstrap the FreeBSD db code. The cross-build headers #define dbopen() to | # bootstrap the FreeBSD db code. The cross-build headers #define dbopen() to | ||||
# __freebsd_dbopen() so that we don't ever use the host version | # __freebsd_dbopen() so that we don't ever use the host version | ||||
INCS+= ${SRCTOP}/include/db.h | INCS+= ${SRCTOP}/include/db.h | ||||
LIBC_SRCTOP= ${SRCTOP}/lib/libc/ | LIBC_SRCTOP= ${SRCTOP}/lib/libc/ | ||||
.include "${LIBC_SRCTOP}/db/Makefile.inc" | .include "${LIBC_SRCTOP}/db/Makefile.inc" | ||||
# Do the same as we did for dbopen() for getopt() on since it's not compatible | # Do the same as we did for dbopen() for getopt() on since it's not compatible | ||||
# on Linux (and to avoid surprises also compile the FreeBSD code on macOS) | # on Linux (and to avoid surprises also compile the FreeBSD code on macOS) | ||||
▲ Show 20 Lines • Show All 192 Lines • Show Last 20 Lines |
Wouldn't you still need the amd64/i386 versions of these as well to build?