# Makefile2.6
ifneq ($(KERNELRELEASE),)
#kbuild syntax. dependency relationshsip of files and target modules are listed here.
mymodule-objs := memdev.o
obj-m := memdev.o
else
PWD := $(shell pwd)
KVER ?= $(shell uname -r)
KDIR := /home/pg02/lichee/linux-4.4 /*内核的路径*/
all:
$(MAKE) -C $(KDIR) M=$(PWD) modules ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
clean:
rm -rf .*.cmd *.o *.mod.c *.ko .tmp_
endif
编写ko编译的Makefile
最新推荐文章于 2023-10-27 09:16:32 发布