资源描述:
《makefile源码分析》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、#(C)Copyright(版权)2000-2006#WolfgangDenk(人名),DENXSoftwareEngineering(denx软件工程师),wd@denx.de.(邮箱)#SeefileCREDITSforlistofpeoplewhocontributedtothisproject.#在文件中查看对项目有贡献的人人的名单#Thisprogramisfreesoftware;youcanredistribute(重新分配)itand/ormodify(修改)itundertheterm
2、s(条款)oftheGNUGeneral(通用的)PublicLicense(许可)aspublished(已出版的)bytheFreeSoftwareFoundatio(基金会);eitherversion(版本)2oftheLicense,or(atyouroption)anylaterversion.##Thisprogramisdistributedinthehopethatitwillbeuseful,#butWITHOUTANYWARRANTY(保证);withouteventheimpli
3、ed(暗示、默认)warrantyof#MERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.(merchantability(商业性的)orfitnessforaparticular(特别)poupose)SeetheGNUGeneralPublicLicenseformoredetails.##YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense#alongwiththisprogram;ifnot,wri
4、tetotheFreeSoftwareFoundation(自由软件基金会),Inc.,59TemplePlace,Suite330,Boston,#MA02111-1307USA#//上面的是版本信息VERSION=1PATCHLEVEL=1SUBLEVEL=6EXTRAVERSION=U_BOOT_VERSION=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)//VERSION_FILE=$(obj)include/version_autoge
5、nerated.hHOSTARCH:=$(shelluname-m
6、sed-es/i.86/i386/-es/sun4u/sparc64/-es/arm.*/arm/-es/sa110/arm/-es/powerpc/ppc/-es/macppc/ppc/)HOSTOS:=$(shelluname-s
7、tr'[:upper:]''[:lower:]'
8、sed-e's/(cygwin).*/cygwin/')exportHOSTARCHHOSTOS#Dealwithcollidingde
9、finitionsfromtcshetc.VENDOR=###########################################################################U-bootbuildsupportsproducingaobjectfilestotheseparateexternal#directory.Twousecasesaresupported:##1)AddO=tothemakecommandline#'makeO=/tmp/buildall'##2)
10、SetenvironementvariableBUILD_DIRtopointtothedesiredlocation#'exportBUILD_DIR=/tmp/build'#'make'##ThesecondapproachcanalsobeusedwithaMAKEALLscript#'exportBUILD_DIR=/tmp/build'#'./MAKEALL'##Commandline'O='settingoverridesBUILD_DIRenvironentvariable.##Whenn
11、oneoftheabovemethodsisusedthelocalbuildisperformedand#theobjectfilesareplacedinthesourcedirectory.#ifdefOifeq("$(originO)","commandline")BUILD_DIR:=$(O)endifendififneq($(BUILD_DIR),)saved-output:=$(BUILD_DIR)#Attempttocrea