#
# This Makefile was automatically generated; do not edit.
# Generated on 'swio-display-x64-rhel04-19' on Thu Sep 14 13:46:30 PDT 2017.
#

OSOBJ=		nv-freebsd.o
KMOD=		nvidia
RMOBJ=		nv-kernel.o

.ifndef BSDVER
BSDVER!=	/sbin/sysctl -n kern.osreldate
.endif

.if ${BSDVER} >= 500011
KMODDIR?=	/boot/modules
.endif

SRCS=		nvidia_ctl.c nvidia_dev.c nvidia_i2c.c nvidia_linux.c nvidia_os.c nvidia_os_pci.c nvidia_os_registry.c nvidia_pci.c nvidia_subr.c nvidia_sysctl.c
SRCS+=		device_if.h bus_if.h pci_if.h vnode_if.h
CFLAGS+=	-I. -DNV_VERSION_STRING=\"304.137\"
CFLAGS+=	-D__KERNEL__ -DNVRM  -Wno-unused-function -Wuninitialized -O   -mno-red-zone -mcmodel=kernel -UDEBUG -U_DEBUG -DNDEBUG

OBJS+=		${RMOBJ}
.if ${BSDVER} >= 600000
NO_OBJ=		true
.else
NOOBJ=		true
.endif

stdarg.h:
	@ln -s machine/stdarg.h stdarg.h

*.c: stdarg.h

beforeinstall:	${KMOD}.ko

${OSOBJ}: ${KMOD}.ko
	@ld -r -o $@ ${OBJS:S/${RMOBJ}//}

clean:
	@rm -f ${CLEANFILES:S/${RMOBJ}//}
	@rm -f stdarg.h

.include <bsd.kmod.mk>
