KVERSION := $(shell uname -r)
TARGET := ipu_driver
PWD := $(shell pwd)
BUILD_DIRECTORY := /lib/modules/$(KVERSION)/build

# ccflags-y is the variable to set flags in kernel modules. This line is
# necessary because you can't set ccflags-y on the command line because it
# contains a dash.
ccflags-y := $(CCFLAGS_Y)

obj-m += $(TARGET).o

$(TARGET)-objs := driver.o chrdev.o ipu_arch_map.o pci.o sysfs.o

all:
	@$(MAKE) -C $(BUILD_DIRECTORY) M=$(PWD) modules

clean:
	@$(MAKE) -C $(BUILD_DIRECTORY) M=$(PWD) clean
