?? makefile
字號:
# Comment/uncomment the following line to disable/enable debugging#非常標(biāo)準(zhǔn)的Makefile,稍加修改就可以用在很多驅(qū)動上#將這個開關(guān)打開,看proc的輸出。在這個例子分別有二個用于輸出的proc文件。一個是用老方法實現(xiàn)的#/proc/scullmem#新方法 /proc/scullseqDEBUG = y # Add your debugging flag (or not) to CFLAGSifeq ($(DEBUG),y) DEBFLAGS = -O -g -DSCULL_DEBUG # "-O" is needed to expand inlineselse DEBFLAGS = -O2endifCFLAGS += $(DEBFLAGS)CFLAGS += -I$(LDDINC)ifneq ($(KERNELRELEASE),)# call from kernel build systemscull-objs := main.o pipe.o access.oobj-m := scull.oelseKERNELDIR ?= /lib/modules/$(shell uname -r)/buildPWD := $(shell pwd)modules: $(MAKE) -C $(KERNELDIR) M=$(PWD) LDDINC=$(PWD)/../include modulesendifclean: rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versionsdepend .depend dep: $(CC) $(CFLAGS) -M *.c > .dependifeq (.depend,$(wildcard .depend))include .dependendif
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -