.m.h:
	awk -f ${SYSDIR}/tools/makeobjops.awk ${.ALLSRC} -h

.m.c:
	awk -f ${SYSDIR}/tools/makeobjops.awk ${.ALLSRC} -c

SRCS=bus_if.h device_if.h pci_if.h cx88_if.h cx88_if.c cx88_common.h cx88_common.c cx88_regs.h cx88_common_ioctl.h cx88_i2c_if.h cx88_i2c_if.c cx88_i2c.h cx88_i2c.c
KMOD=cx88

PREFIX ?= /usr/local
IOCTL_HEADER_DIR ?= $(PREFIX)/include
CLEANFILES=cx88_if.c cx88_if.h bus_if.h device_if.h pci_if.h cx88_i2c_if.c cx88_i2c_if.h

.if defined(DIAGNOSTIC)
CFLAGS+= -D_DIAGNOSTIC=${DIAGNOSTIC}
.endif

.if defined(CX88_USE_IIC)
CFLAGS+= -DCX88_USE_IIC
.endif

afterinstall:
	mkdir -p $(IOCTL_HEADER_DIR)/cx88
	cp cx88_common_ioctl.h $(IOCTL_HEADER_DIR)/cx88/

.include <bsd.kmod.mk>

