PWD    := $(shell pwd)
KSRC   ?= /lib/modules/$(shell uname -r)/build
KBUILD := $(KSRC)

obj-m        += ngcp.o
ngcp-y       += ngcp_bin.o ngcp_mod.o

.PHONY:		modules clean full fullclean

modules:
		$(MAKE) -C $(KBUILD) M=$(PWD) O=$(KBUILD) modules
		strip --strip-unneeded *.ko

full:		modules

$(obj)/ngcp_bin.o:	$(obj)/ngcp.bin
		cat $(obj)/ngcp.bin | gunzip | tar -C $(obj) -x
