ifneq ($(KERNELRELEASE),)
obj-m:=homebrew_ir.o

else
KDIR:=/lib/modules/$(shell uname -r)/build
PWD:=$(shell pwd)

default:
	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
	$(CC) $(CFLAGS) -o test test.c
endif

clean:
	$(shell rm -f *.ko *.o .*.cmd *mod.[co] test)
	$(shell rm -r .tmp_versions/)
