KMOD	= df5322
SRCS	= df5322.c
SRCS	+= bus_if.h device_if.h

# Rename firewire.c's global symbols so they do not clash with the copy
# compiled into the guest kernel (X86_64_GENERIC has `device firewire`).
# -Dfirewire=... also renames the SYSCTL_NODE(_hw,..,firewire,..), the
# DRIVER_MODULE name and DECLARE_DUMMY_MODULE name for the same reason.
KCFLAGS+= -Dfirewire=dfw_firewire -D_hw_firewire=_hw_dfw_firewire \
	   -Dfirewire_debug=dfw_debug -Dtry_bmr=dfw_try_bmr \
	   -Dhold_count=dfw_hold_count -Dfirewire_devclass=dfw_devclass \
	   -Dlinkspeed=dfw_linkspeed -Dgap_cnt=dfw_gap_cnt \
	   -DM_FW=DFW_M_FW -DM_FWXFER=DFW_M_FWXFER \
	   -Dfw_noderesolve_nodeid=dfw_nrn -Dfw_noderesolve_eui64=dfw_nre \
	   -Dfw_asyreq=dfw_asyreq -Dfw_asy_callback=dfw_asycb \
	   -Dfw_asybusy=dfw_asybusy -Dfw_busreset=dfw_busreset \
	   -Dfw_init=dfw_init -Dfw_bindlookup=dfw_bindlookup \
	   -Dfw_bindadd=dfw_bindadd -Dfw_bindremove=dfw_bindremove \
	   -Dfw_xfer_alloc=dfw_xa -Dfw_xfer_alloc_buf=dfw_xab \
	   -Dfw_xfer_done=dfw_xd -Dfw_xfer_unload=dfw_xu \
	   -Dfw_xfer_free_buf=dfw_xfb -Dfw_xfer_free=dfw_xf \
	   -Dfw_asy_callback_free=dfw_asycbf -Dfw_sidrcv=dfw_sidrcv \
	   -Dasyreqq=dfw_asyreqq -Dfw_rcv=dfw_rcv \
	   -Dfw_drain_txq=dfw_drain -Dfw_crc16=dfw_crc16
KCFLAGS+= -I${SYSDIR} -Wall

.include <bsd.kmod.mk>
