makefile
来自「Linux下的系统信息获取」· 代码 · 共 44 行
TXT
44 行
# Comment/uncomment the following line to disable/enable debuggingDEBUG = n CC = gccINCLUDEDIR = /usr/includei/linuxifeq ($(DEBUG),y) DEBFLAGS = -O -g -D_DEBUG_ # "-O" is needed to expand inlineselse DEBFLAGS = -O2endifCFLAGS = -D__KERNEL__ -DMODULE -Wall -Wstrict-prototypes -fomit-frame-pointer \ -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 $(DEBFLAGS)CFLAGS += -I$(INCLUDEDIR)# Extract version number from headers.VER = `awk -F\" '/REL/ {print $$2}' $(INCLUDEDIR)/linux/version.h`TARGET = smbiosOBJS = $(TARGET).oSRC = bios.c main.c cooking.call: .depend $(TARGET).o$(TARGET).o: $(SRC:.c=.o) $(LD) -r $^ -o $@install: mkdir -p /lib/modules/$(VER)/misc install -c -m 644 $(TARGET).o /lib/modules/$(VER)/miscclean: rm -f *.o *~ core .dependdepend .depend dep: $(CC) $(CFLAGS) -M *.c > $@ifeq (.depend,$(wildcard .depend))include .dependendif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?