ARM Linux驱动的makefile
时间:2009-07-31 来源:gmting
#
# Description:
# Makefile for 2.6 device drivers
# # Comment/uncomment the following line to disable/enable debugging
#DEBUG = y # Add your debugging flag (or not) to CFLAGS
ifeq ($(DEBUG),y)
DEBFLAGS = -O -g -DCAN_DEBUG
# "-O" is needed to expand inlines
else
DEBFLAGS = -O2
endif #CFLAGS += $(DEBFLAGS) //i am not sure how to use this line ifneq ($(KERNELRELEASE),)
# call from kernel build system obj-m := hello.o //编译模块的名称 else KERNELDIR ?= /home/boboo/Tools/hfrk/linux-2.6.14 //你所使用内核的目录
PWD := $(shell pwd) CC := arm-linux-gcc
HOSTCC := gcc export CC HOSTCC default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules endif clean:
rm -rf *.o *.ko
# Description:
# Makefile for 2.6 device drivers
# # Comment/uncomment the following line to disable/enable debugging
#DEBUG = y # Add your debugging flag (or not) to CFLAGS
ifeq ($(DEBUG),y)
DEBFLAGS = -O -g -DCAN_DEBUG
# "-O" is needed to expand inlines
else
DEBFLAGS = -O2
endif #CFLAGS += $(DEBFLAGS) //i am not sure how to use this line ifneq ($(KERNELRELEASE),)
# call from kernel build system obj-m := hello.o //编译模块的名称 else KERNELDIR ?= /home/boboo/Tools/hfrk/linux-2.6.14 //你所使用内核的目录
PWD := $(shell pwd) CC := arm-linux-gcc
HOSTCC := gcc export CC HOSTCC default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules endif clean:
rm -rf *.o *.ko
相关阅读 更多 +