ifneq ($(KERNELRELEASE),)

obj-m := kernelcapi.o
kernelcapi-y := kcapi.o capiutil.o capi.o
kernelcapi-$(CONFIG_PROC_FS) += kcapi_proc.o

else

KDIR ?= /lib/modules/$(shell uname -r)/build

all:
$(MAKE) -C $(KDIR) M=$(CURDIR) modules

clean:
$(MAKE) -C $(KDIR) M=$(CURDIR) clean

install:
$(MAKE) -C $(KDIR) M=$(CURDIR) modules_install

endif
