<nav id="gb9pn"></nav>

  1. <form id="gb9pn"><legend id="gb9pn"></legend></form>

    <form id="gb9pn"><legend id="gb9pn"><video id="gb9pn"></video></legend></form>
  2. HiӭǶʽѵ߶Ʒ - Զ<ܲ>רעǶʽʦ15
    ǰλ: > Զ > Ƕʽѧϰ > ʦ > Makefile
    Makefile
    ʱ䣺2017-01-05ߣԶ

    ȿһ´

    ifeq ($(KERNELRELEASE),)
            KERNELDIR ?= /home/linux/linux-2.6.22.6
            PWD := $(shell pwd)
            modules:
                    $(MAKE) -C $(KERNELDIR) M=$(PWD) modules
            modules_install:
                    $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
            clean:
                    rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions
            .PHONY: modules modules_install clean
            else
                    obj-m := myhello.o
            endif

    һЩdzǼһifeq ($(KERNELRELEASE),)ĿǰôָLinuxԴĿ¼µMakefileںʱKERNELRELEASEᱻôǴԴĿ¼ʼmakemyhello.oں

    KERNELDIR ?= /home/linux/linux-2.6.22.6ǶKERNELDIRиֵǺõָںԴĿ¼õ

    PWD := $(shell pwd)ǶPWDиֵǽ$(shell pwd)ķؽõǰĿ¼·ֵPWDںָҪڵλ

    modules:
            $(MAKE) -C $(KERNELDIR) M=$(PWD) modules

    MakefileĹ$(MAKE)make-C ѡָǰĿ¼תƵָλ“M=”ѡûҪijںΪһⲿĻҪmake modules м“M=dir”ԶָdirĿ¼вԴKOļ

    modules_install:
                    $(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install

    İװMakefile“lib\/modules”ԿͨĶ㲻ҵ“MODLIB”ôָװ·“INSTALL_MOD_PATH”Ϊ

    MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
            Export MODLIB

    .PHONY: modules modules_install clean

    仰ǵDZ֤modules,modules_install,clean.PHONY һĿ磺

    .SUFFIXES.DEFAULT.PRECIOUS.INTERMEDIATE.SECONDARY.SECONDEXPANSION.DELETE_ON_ERROR.IGNORE .LOW_RESOLUTION_TIME .SILENT .EXPORT_ALL_VARIABLES .NOTPARALLEL

    ǵľ÷ԲοGNUֲеSpecial Built-in Target Names½

    .PHONYĿľ˼MakefileĹĿ¼磺modules,modules_install,cleanļʱǷֹķʽ

    б۽ѱ˿վͬ۵֤ʵ
    welcome