makefile

来自「LINUX设备驱动程序第二版配套源码 ldd2-samples-1.0.1」· 代码 · 共 39 行

TXT
39
字号
# 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.makeCFLAGS += -O2 -I..# To please automatic compilation, no TARGET is there, only OBJSOBJS = pcidata.o pciregions.oSRC = $(OBJS:.o=.c)EXE    = pcidumpEXESRC = pcidump.call: .depend $(EXE) $(OBJS)clean:	rm -f *.o *~ $(EXE) .depend# Compile pcidump without kernel-related headers (it will break)# (for user space we want use `cc')pcidump: pcidump.c	cc $^ -o $@# in make depend make the same split# (for user space we want use `cc')depend .depend dep:	$(CC) $(CFLAGS) -M $(SRC) > $@	cc -M $(EXESRC) >> $@ifeq (.depend,$(wildcard .depend))include .dependendif

⌨️ 快捷键说明

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