ifeq ($(KERNELRELEASE),)

#KERNELDIR ?= /your/target/source/directory/
KERNELDIR ?= /home/xiaomeige/linux-socfpga
PWD := $(shell pwd)
ARM ?=arm
CROSSS_COMPILE ?=arm-linux-gnueabihf-

modules:
	$(MAKE) -C $(KERNELDIR)  M=$(PWD) modules

modules_install:
	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install

clean:
	rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions *odule*

.PHONY: modules modules_install clean

else
    obj-m := lab2_axi.o
endif

