?? makefile
字號:
# This should be defined if the modules from pcmcia-cs are used.# Leave it blank if you have PCMCIA support in the kernel.PCMCIA_PATH =KERNEL_VERSION = $(shell uname -r)KERNEL_PATH = /lib/modules/$(KERNEL_VERSION)/buildMODULE_DIR_TOP = /lib/modules/$(KERNEL_VERSION)MODULE_DIR_PCMCIA = $(MODULE_DIR_TOP)/pcmcia# if Rules.make exists in the kernel tree, we assume 2.4 style modules# if it doesn't assume 2.6 styleOLDMAKE = $(wildcard $(KERNEL_PATH)/Rules.make)ifeq (,$(OLDMAKE))ifneq (,$(PCMCIA_PATH))$(error Can't cope with 2.6 and pcmcia-cs together)endifendifMODULES = plx9052.oSRCS = plx9052.c plx9052-24.c plx9052-26.cTAR = tarDEPMOD = /sbin/depmodOUR_DIR = $(shell pwd)ifndef VERSIONVERSION = $(shell sed -n -e 's/^ *Version \([^ ]*\)\..*/\1/p' $(OUR_DIR)/plx9052-26.c)export VERSIONendifDISTFILES = $(SRCS) Makefile readme.plx9052 NEWSDISTNAME = plx9052-$(VERSION)TARBALL = $(DISTNAME).tar.gzMODVERDIR=$(OUR_DIR)/.tmp_versionsall: modulesdist: $(DIST_FILES) rm -rf $(DISTNAME) mkdir -p $(DISTNAME) for f in $(DISTFILES); do \ cp -f $$f $(DISTNAME)/$$f || exit 1; \ done for f in `find patches -type f -name '*.diff'`; do \ dir=`dirname $$f`; \ mkdir -p $(DISTNAME)/$$dir; \ cp -f $$f $(DISTNAME)/$$dir; \ done tar czf $(DISTNAME).tar.gz $(DISTNAME)clean: rm -f core *.o *~ a.out *.d rm -f *.s *.i rm -f *.ko *.mod.c *.mod .*.cmd rm -rf $(MODVERDIR)ifeq (,$(OLDMAKE))# 2.6 style modules, get the kernel makefiles to do the workobj-m := $(MODULES)modules: mkdir -p .tmp_versions -cp $(KERNEL_PATH)/.tmp_versions/*.mod $(MODVERDIR) $(MAKE) -C $(KERNEL_PATH) SUBDIRS=$(OUR_DIR) MODVERDIR=$(MODVERDIR) modulesinstall: all mkdir -p $(MODULE_DIR_PCMCIA) install -m 644 -o 0 -g 0 $(MODULES:%.o=%.ko) $(MODULE_DIR_PCMCIA) $(DEPMOD) -aeelse# 2.4 style modulesKERNEL_HEADERS = -I$(KERNEL_PATH)/includeifdef PCMCIA_PATHPCMCIA_HEADERS = -I$(PCMCIA_PATH)/includeendifCPPFLAGS = -D__KERNEL__ -DPCMCIA_DEBUG=1 \ -DMODULE -DEXPORT_SYMTAB \ $(PCMCIA_HEADERS) $(KERNEL_HEADERS)CFLAGS = -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -fno-common \ -pipe $(EXTRACFLAGS)MODVER = $(shell if cat $(KERNEL_PATH)/include/linux/autoconf.h 2>/dev/null | \grep -q '^[[:space:]]*\#define[[:space:]]*CONFIG_MODVERSIONS[[:space:]]*1'; \then echo 1; else echo 0; fi)ifeq ($(MODVER),1)MFLAG = -DMODVERSIONS -include $(KERNEL_PATH)/include/linux/modversions.hendifmodules: $(MODULES)install: all mkdir -p $(MODULE_DIR_PCMCIA) install -m 644 -o 0 -g 0 $(MODULES) $(MODULE_DIR_PCMCIA) $(DEPMOD) -ae%.o: %.c $(CC) -MD $(CFLAGS) $(CPPFLAGS) $(MFLAG) -c $<%.s: %.c $(CC) -MD $(CFLAGS) $(CPPFLAGS) -S $<%.i: %.c $(CC) -MD $(CPPFLAGS) -E $< -o $@-include $(SRCS:%.c=%.d)endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -