欢迎来到天天文库
浏览记录
ID:38411986
大小:59.50 KB
页数:29页
时间:2019-06-12
《2.6.18内核Makefile文档》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、2.6.18内核Makefile文档来源:ChinaUnix博客 日期:2007.08.0920:16 (共有0条评论)我要评论 kernel-source/Documentation/kbuild/LinuxKernelMakefilesThisdocumentdescribestheLinuxkernelMakefiles.===TableofContents ===1Overview ===2Whodoeswhat ===3Thekbuildfiles ---3.1Goaldefinitions ---3.2Bu
2、ilt-inobjectgoals-obj-y ---3.3Loadablemodulegoals-obj-m ---3.4Objectswhichexportsymbols ---3.5Libraryfilegoals-lib-y ---3.6Descendingdownindirectories ---3.7Compilationflags ---3.8Commandlinedependency ---3.9Dependencytracking ---3.10SpecialRules
3、 ---3.11$(CC)supportfunctions ===4HostProgramsupport ---4.1SimpleHostProgram ---4.2CompositeHostPrograms ---4.3Definingsharedlibraries ---4.4UsingC++forhostprograms ---4.5Controllingcompileroptionsforhostprograms ---4.6Whenhostprogramsareactuallybuil
4、t ---4.7Usinghostprogs-$(CONFIG_FOO) ===5Kbuildcleaninfrastructure ===6ArchitectureMakefiles ---6.1Setvariablestotweakthebuildtothearchitecture ---6.2Addprerequisitestoarchprepare: ---6.3Listdirectoriestovisitwhendescending ---6.4Architecture-specificboo
5、timages ---6.5Buildingnon-kbuildtargets ---6.6Commandsusefulforbuildingabootimage ---6.7Customkbuildcommands ---6.8Preprocessinglinkerscripts ===7KbuildVariables ===8Makefilelanguage ===9Credits ===10TODO===1OverviewTheMakefileshavefiveparts: Makefile
6、 thetopMakefile. .config thekernelconfigurationfile. arch/$(ARCH)/Makefile thearchMakefile. scripts/Makefile.* commonrulesetc.forallkbuildMakefiles. kbuildMakefiles thereareabout500ofthese.ThetopMakefilereadsthe.configfile,whichcomesfromthekernelconfigura
7、tionprocess.ThetopMakefileisresponsibleforbuildingtwomajorproducts:vmlinux(theresidentkernelimage)andmodules(anymodulefiles).Itbuildsthesegoalsbyrecursivelydescendingintothesubdirectoriesofthekernelsourcetree.Thelistofsubdirectorieswhicharevisiteddependsuponthekernelconf
8、iguration.ThetopMakefiletextuallyincludesanarchMakefilewiththenamearch/$(ARCH)/Makefile.ThearchMakefile
此文档下载收益归作者所有