编译基于ARM LINUX的驱动模块的Makefile

KERNELDIR = /home/wenhao/platform/linux-2.6.34
PWD := $(shell pwd)
CROSS_COMPILE = /usr/local/arm/4.3.2/bin/arm-linux-
CC    = $(CROSS_COMPILE)gcc

obj-m := key.o

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

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

.PHONY: modules clean


你可能感兴趣的:(makefile)