# 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
阅读(789) | 评论(0) | 转发(0) |