makefile

来自「Linux Device Drivers 2nd 经典书籍的配套源码」· 代码 · 共 43 行

TXT
43
字号
# Comment/uncomment the following line to disable/enable debugging#DEBUG = y# This Makefile has been simplified as much as possible, by putting all# generic material, independent of this specific directory, into# ../Rules.make. Read that file for detailsTOPDIR  := $(shell cd ..; pwd)include $(TOPDIR)/Rules.make# Add your debugging flag (or not) to CFLAGSifeq ($(DEBUG),y)  DEBFLAGS = -O -g -DSIMPLE_DEBUG # "-O" is needed to expand inlineselse  DEBFLAGS = -O2endifCFLAGS += $(DEBFLAGS)CFLAGS += -I..TARGET = simpleOBJS = $(TARGET).oSRC = simple.call: .depend $(TARGET).oinstall:	install -d $(INSTALLDIR)	install -c $(TARGET).o $(INSTALLDIR)clean:	rm -f *.o *~ core .dependdepend .depend dep:	$(CC) $(CFLAGS) -M *.c > $@ifeq (.depend,$(wildcard .depend))include .dependendif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?