GNU ARM汇编--(十七)u-boot的makefile和mkconfig解读
时间:11-26
来源:互联网
点击:
- /lib$(BOARD).o
- LIBBOARD:=$(addprefix$(obj),$(LIBBOARD))
- ###########################################
- #为LIBBOARD增加前缀,LIBBOARD就是board/samsung/smdk2410/libsmdk2410.o
- ###########################################
- #AddGCClib
- ifdefUSE_PRIVATE_LIBGCC
- ifeq("$(USE_PRIVATE_LIBGCC)","yes")
- PLATFORM_LIBGCC=$(OBJTREE)/arch/$(ARCH)/lib/libgcc.o
- else
- PLATFORM_LIBGCC=-L$(USE_PRIVATE_LIBGCC)-lgcc
- endif
- else
- PLATFORM_LIBGCC:=-L$(shelldirname`$(CC)$(CFLAGS)-print-libgcc-file-name`)-lgcc
- endif
- PLATFORM_LIBS+=$(PLATFORM_LIBGCC)
- exportPLATFORM_LIBS
- #SpecialflagsforCPPwhenprocessingthelinkerscript.
- #Passtheversiondownsowecanhandlebackwardscompatibility
- #onthefly.
- LDPPFLAGS+=
- -include$(TOPDIR)/include/u-boot/u-boot.lds.h
- -DCPUDIR=$(CPUDIR)
- $(shell$(LD)--version|
- sed-nes/GNUldversion
. .*/-DLD_MAJOR=1-DLD_MINOR=2/p) - __OBJS:=$(subst$(obj),,$(OBJS))
- __LIBS:=$(subst$(obj),,$(LIBS))$(subst$(obj),,$(LIBBOARD))
- #########################################################################
- #########################################################################
- ifneq($(CONFIG_BOARD_SIZE_LIMIT),)
- BOARD_SIZE_CHECK=
- @actual=`wc-c$@|awk{print$$1}`;
- limit=$(CONFIG_BOARD_SIZE_LIMIT);
- iftest
limit;then - echo"$@exceedsfilesizelimit:";
- echo"limit:$$limitbytes";
- echo"actual:$$actualbytes";
- echo"excess:$$((actual-limit))bytes";
- exit1;
- fi
- else
- BOARD_SIZE_CHECK=
- endif
这里也给出顶层目录下的config.mk文件的注释:
[cpp]view plaincopy
- #
- #(C)Copyright2000-2006
- #WolfgangDenk,DENXSoftwareEngineering,wd@denx.de.
- #
- #SeefileCREDITSforlistofpeoplewhocontributedtothis
- #project.
- #
- #Thisprogramisfreesoftware;youcanredistributeitand/or
- #modifyitunderthetermsoftheGNUGeneralPublicLicenseas
- #publishedbytheFreeSoftwareFoundation;eitherversion2of
- #theLicense,or(atyouroption)anylaterversion.
- #
- #Thisprogramisdistributedinthehopethatitwillbeuseful,
- #butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyof
- #MERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.Seethe
- #GNUGeneralPublicLicenseformoredetails.
- #
- #YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense
- #alongwiththisprogram;ifnot,writetotheFreeSoftware
- #Foundation,Inc.,59TemplePlace,Suite330,Boston,
- #MA02111-1307USA
- #
- #########################################################################
- ifeq($(CURDIR),$(SRCTREE))
- dir:=
- else
- dir:=$(subst$(SRCTREE)/,,$(CURDIR))
- endif
- ###########################################################################
- #在顶层makefile中已经分析了CURDIR和SRCTREE都是当前目录,所以这里dir暂时为空
- ###########################################################################
- ifneq($(OBJTREE),$(SRCTREE))
- #CreateobjectfilesforSPLinaseparatedirectory
- ifeq($(CONFIG_SPL_BUILD),y)
- obj:=$(if$(dir),$(SPLTREE)/$(dir)/,$(SPLTREE)/)
- else
- obj:=$(if$(dir),$(OBJTREE)/$(dir)/,$(OBJTREE)/)
- endif
- src:=$(if$(dir),$(SRCTREE)/$(dir)/,$(SRCTREE)/)
- $(shellmkdir-p$(obj))
- else
- #CreateobjectfilesforSPLinaseparatedirectory
- ifeq($(CONFIG_SPL_BUILD),y)
- obj:=$(if$(dir),$(SPLTREE)/$(dir)/,$(SPLTREE)/)
- $(shellmkdir-p$(obj))
- else
- obj:=
- endif
- src:=
- endif
- ########################################################################################
- #首先OBJTREE和SRCTREE都是当前目录,所以执行else
- #查找CONFIG_SPL_BUILD是否定义为y,在autoconf.mk中,并没有这个定义,所以obj和src暂时也为空
- ########################################################################################
- #cleantheslate...
- PLATFORM_RELFLAGS=
- PLATFORM_CPPFLAGS=
- PLATFORM_LDFLAGS=
- #########################################################################
- HOSTCFLAGS=-Wall-Wstrict-prototypes-O2-fomit-frame-pointer
- $(HOSTCPPFLAGS)
- HOSTSTRIP=strip
- #
- #MacOSX/DarwinsCpreprocessorisApplespecific.It
- #generatesnumerouserrorsandwarnings.Wewanttobypassit
- #anduseGNUCscpp.Todothiswepassthe-traditional-cpp
- #optiontothecompiler.Noteth
ARM汇编u-bootmakefilemkconfi 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)