驱动笔记 - 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)