KERNEL?=$(shell uname -r)
ifeq ($(GPUDIRECT), 1)
	# Old way to set CFLAGS, stopped working with newer kernels
	# Kept for compatibility with older kernels
	EXTRA_CFLAGS=-DHAVE_GPUDIRECT
	# Current way to set CFLAGS
	CFLAGS_ximea_cam_pcie.o=-DHAVE_GPUDIRECT
endif
modname=ximea_cam_pcie
obj-m := $(modname).o
all:
	make -C /lib/modules/$(KERNEL)/build M=$(PWD) modules
install:
	make -C /lib/modules/$(KERNEL)/build M=$(PWD) modules_install
clean:
	rm -fR .*.cmd *.o *.ko .tmp_versions Module.symvers modules.order *.mod.c
