Use MACHINE_CPUARCH in preference to MACHINE_ARCH. The former is the source code location of the machine, the latter the binary output. In general, we want to use MACHINE_CPUARCH instead of MACHINE_ARCH unless we're tesitng for a specific target. The isn't even moot for i386/amd64 where there's momemntum towards a MACHINE_CPUARCH == x86, although a specific cleanup for that likely would be needed...
35 lines
708 B
Makefile
35 lines
708 B
Makefile
# $FreeBSD$
|
|
|
|
.PATH: ${.CURDIR}/../../dev/mem
|
|
.PATH: ${.CURDIR}/../../${MACHINE}/${MACHINE}
|
|
.PATH: ${.CURDIR}/../../${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
|
|
|
|
KMOD= mem
|
|
SRCS= memdev.c mem.c
|
|
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386"
|
|
SRCS+= memutil.c
|
|
.endif
|
|
.if ${MACHINE_CPUARCH} == "i386"
|
|
SRCS+= i686_mem.c k6_mem.c
|
|
.endif
|
|
.if ${MACHINE_CPUARCH} == "amd64"
|
|
SRCS+= amd64_mem.c
|
|
.endif
|
|
SRCS+= bus_if.h device_if.h
|
|
|
|
.if ${MACHINE} == "sun4v"
|
|
SRCS+= opt_global.h
|
|
|
|
.if defined(KERNBUILDDIR)
|
|
MKDEP= -include ${KERNBUILDDIR}/opt_global.h
|
|
.else
|
|
CFLAGS+= -include opt_global.h
|
|
MKDEP= -include opt_global.h
|
|
|
|
opt_global.h:
|
|
echo "#define SUN4V 1" > ${.TARGET}
|
|
.endif
|
|
.endif
|
|
|
|
.include <bsd.kmod.mk>
|