Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1216492
  • 博文数量: 404
  • 博客积分: 10011
  • 博客等级: 上将
  • 技术积分: 5382
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-03 16:29
文章存档

2010年(40)

2009年(140)

2008年(224)

我的朋友

分类: LINUX

2009-07-09 17:08:58

# Comment/uncomment the following line to enable/disable debugging
#DEBUG = y

ifeq ($(DEBUG),y)
  DEBFLAGS = -O -g -DSCULLC_DEBUG # "-O" is needed to expand inlines
else
  DEBFLAGS = -O2
endif
 
###############################################  add for my linux cross-complete enviroment start yc
CROSS=arm-uclibc-linux-
CC  = $(CROSS)gcc
AR := $(CROSS)ar -rv
###############################################  add for my linux cross-complete enviroment over yc
 
CFLAGS += $(DEBFLAGS) -I$(LDDINC)

#modify with your project
TARGET = scullc
#modify with your project

ifneq ($(KERNELRELEASE),)

###############################################  modify with your project
scullc-objs := main.o
obj-m := scullc.o
###############################################  modify with your project

else
 

###############################################  modify the kernel for my enviromentstart yc
KERNELDIR ?= /home/yc/workspace/dev/linux/kernel/linux-2.6.14
###############################################  modify the kernel for my enviromentstart yc
 

PWD       := $(shell pwd)
modules:
 $(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINC=$(PWD) modules
endif

install:
 install -d $(INSTALLDIR)
 install -c $(TARGET).o $(INSTALLDIR)
clean:
 rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions

depend .depend dep:
 $(CC) $(CFLAGS) -M *.c > .depend
ifeq (.depend,$(wildcard .depend))
include .depend
endif
阅读(750) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~