现在的位置: 首页 > 综合 > 正文

Makefile最简单写法

2013年10月22日 ⁄ 综合 ⁄ 共 242字 ⁄ 字号 评论关闭

指定linux内核版本,使用arm-linux-gcc交叉编译器

ifneq ($(KERNELRELEASE),)

obj-m := beep.o

else

KDIR := /home/smb/kernel/linux-2.6.38
all:
$(MAKE) -C $(KDIR) M=$(PWD) modules ARCH=arm CROSS_COMPILE=arm-linux-
clean:
rm -f *.ko *.o *.mod.c *.mod.o *.symvers *.order
.PHONY: all clean
endif

抱歉!评论已关闭.