首页 > 代码库 > 驱动笔记 - Makefile

驱动笔记 - Makefile

ifneq ($(KERNELRELEASE),)

obj-m := hello.o
hello-objs := main.o add.o

else

KDIR := /lib/modules/2.6.18-53.el5/build

all:
make -C $(KDIR) M=$(PWD) modules ARCH=arm CROSS_COMPILE=/usr/local/arm/4.4.1/bin/arm-linux-

clean:
rm -f *.ko *.o *.mod.o *.mod.c *.symvers

endif

modprobe --force-modversion

驱动笔记 - Makefile