# DF-2425 rig module -- build inside the guest against /usr/src kernel source.
# Install as /usr/src/sys/modules/amdrig/Makefile, then `make`.
KMOD=	amdrig
SRCS=	amdrig.c
SRCS+=	device_if.h bus_if.h pci_if.h opt_cam.h

.if !defined(KERNBUILDDIR)
opt_cam.h:
	echo "/* empty: module built outside a kernel build */" > ${.TARGET}
.endif

.include <bsd.kmod.mk>

# after the include: kmod.mk rebuilds CFLAGS from scratch
CFLAGS+=	-I/usr/src/sys -I/usr/src/sys/dev/disk/amd
# the xpt_done test shim (#define around the verbatim #include of amd.c)
# re-expands a prototype inside cam_xpt_sim.h; harmless for the rig.
CFLAGS+=	-Wno-redundant-decls
