本帖最后由 vip-weiwei 于 2014-3-25 15:26 编辑
为什么DEBUG = y好像不起作用?必须要加#define SCULL_DEBUG 才编译调试代码,是怎么回事呀?谢谢!
DEBUG = y
# Add your debugging flag (or not) to ccflags-y
ifeq ($(DEBUG),y)
DEBFLAGS = -O -g -DSCULL_DEBUG # "-O" is needed to expand inlines
else
DEBFLAGS = -O2
endif
EXTRA_CFLAGS += $(DEBFLAGS)
EXTRA_CFLAGS += -I$(LDDINC)
ARCH=arm
CROSS_COMPILE=arm-none-linux-gnueabi-
ifneq ($(KERNELRELEASE),)
# call from kernel build system
scull-objs := main.o #pipe.o access.o
obj-m := scull.o
else
KERNELDIR ?= /home/linux-3.4.1/
PWD := $(shell pwd)
modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINC=$(PWD)/../include modules
endif
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
depend .depend dep:
$(CC) $(EXTRA_CFLAGS) -M *.c > .depend
ifeq (.depend,$(wildcard .depend))
include .depend
endif
此帖出自
Linux与安卓论坛
一周热门 更多>