makefile
来自「A standard Makefile for I2C Driver modul」· 代码 · 共 45 行
TXT
45 行
# Comment/uncomment the following line to disable/enable debuggingDEBUG = y# Add your debugging flag (or not) to CFLAGSifeq ($(DEBUG),y) DEBFLAGS = -O -g #-DSBULL_DEBUG # "-O" is needed to expand inlineselse DEBFLAGS = -O2endifEXTRA_CFLAGS += $(DEBFLAGS)EXTRA_CFLAGS += -I..EXTRA_CFLAGS += -I/lib/modules/$(shell uname -r)/build/include/ -I/usr/includeifneq ($(KERNELRELEASE),)# call from kernel build systemobj-m := tiny_i2c_adap.oelseKERNELDIR ?= /lib/modules/$(shell uname -r)/buildPWD := $(shell pwd)default: $(MAKE) -C $(KERNELDIR) M=$(PWD) modulesendifclean: rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versionsdepend .depend dep: $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -M *.c > .dependifeq (.depend,$(wildcard .depend))include .dependendif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?