makefile.templet~

来自「不包含识别算法」· TEMPLET~ 代码 · 共 212 行

TEMPLET~
212
字号
HOSTARCH := $(shell uname -m | \	sed -e s/i.86/i386/ \	    -e s/sun4u/sparc64/ \	    -e s/arm.*/arm/ \	    -e s/sa110/arm/ \	    -e s/powerpc/ppc/ \	    -e s/macppc/ppc/)HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \	    sed -e 's/\(cygwin\).*/cygwin/')export	HOSTARCH HOSTOS# Deal with colliding definitions from tcsh etc.VENDOR=#########################################################################TOPDIR	:= $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)export	TOPDIRifeq (include/config.mk,$(wildcard include/config.mk))# load ARCH, BOARD, and CPU configurationinclude include/config.mkexport	ARCH CPU BOARD VENDOR SOC# load other configurationinclude $(TOPDIR)/config.mkifndef CROSS_COMPILEifeq ($(HOSTARCH),ppc)CROSS_COMPILE =elseifeq ($(ARCH),ppc)CROSS_COMPILE = powerpc-linux-endififeq ($(ARCH),arm)CROSS_COMPILE = arm-linux-endififeq ($(ARCH),i386)ifeq ($(HOSTARCH),i386)CROSS_COMPILE =elseCROSS_COMPILE = i386-linux-endifendififeq ($(ARCH),mips)CROSS_COMPILE = mips_4KC-endififeq ($(ARCH),nios)CROSS_COMPILE = nios-elf-endififeq ($(ARCH),nios2)CROSS_COMPILE = nios2-elf-endififeq ($(ARCH),m68k)CROSS_COMPILE = m68k-elf-endififeq ($(ARCH),microblaze)CROSS_COMPILE = mb-endifendifendifexport	CROSS_COMPILE########################################################################## U-Boot objects....order is important (i.e. start must be first)OBJS  = cpu/$(CPU)/start.oifeq ($(CPU),i386)OBJS += cpu/$(CPU)/start16.oOBJS += cpu/$(CPU)/reset.oendififeq ($(CPU),ppc4xx)OBJS += cpu/$(CPU)/resetvec.oendififeq ($(CPU),mpc83xx)OBJS += cpu/$(CPU)/resetvec.oendififeq ($(CPU),mpc85xx)OBJS += cpu/$(CPU)/resetvec.oendifLIBS  = lib_generic/libgeneric.aLIBS += board/$(BOARDDIR)/lib$(BOARD).aLIBS += cpu/$(CPU)/lib$(CPU).aifdef SOCLIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).aendifLIBS += lib_$(ARCH)/lib$(ARCH).aLIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \	fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.aLIBS += net/libnet.aLIBS += disk/libdisk.aLIBS += rtc/librtc.aLIBS += dtt/libdtt.aLIBS += drivers/libdrivers.aLIBS += drivers/sk98lin/libsk98lin.aLIBS += post/libpost.a post/cpu/libcpu.aLIBS += common/libcommon.a.PHONY : $(LIBS)# Add GCC libPLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc# The "tools" are needed early, so put this first# Don't include stuff already done in $(LIBS)SUBDIRS	= tools \	  examples \	  post \	  post/cpu.PHONY : $(SUBDIRS)##################################################################################################################################################ALL = u-boot.srec u-boot.bin System.mapall:		$(ALL)u-boot.hex:	u-boot		$(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@u-boot.srec:	u-boot		$(OBJCOPY) ${OBJCFLAGS} -O srec $< $@u-boot.bin:	u-boot		$(OBJCOPY) ${OBJCFLAGS} -O binary $< $@u-boot.img:	u-boot.bin		./tools/mkimage -A $(ARCH) -T firmware -C none \		-a $(TEXT_BASE) -e 0 \		-n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' include/version.h | \			sed -e 's/"[	 ]*$$/ for $(BOARD) board"/') \		-d $< $@u-boot.dis:	u-boot		$(OBJDUMP) -d $< > $@u-boot:		depend $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)		UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed  -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\		$(LD) $(LDFLAGS) $$UNDEF_SYM $(OBJS) \			--start-group $(LIBS) --end-group $(PLATFORM_LIBS) \			-Map u-boot.map -o u-boot$(LIBS):		$(MAKE) -C `dirname $@`$(SUBDIRS):		$(MAKE) -C $@ allgdbtools:		$(MAKE) -C tools/gdb || exit 1depend dep:		@for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; donetags:		ctags -w `find $(SUBDIRS) include \				lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \				fs/cramfs fs/fat fs/fdos fs/jffs2 \				net disk rtc dtt drivers drivers/sk98lin common \			\( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`etags:		etags -a `find $(SUBDIRS) include \				lib_generic board/$(BOARDDIR) cpu/$(CPU) lib_$(ARCH) \				fs/cramfs fs/fat fs/fdos fs/jffs2 \				net disk rtc dtt drivers drivers/sk98lin common \			\( -name CVS -prune \) -o \( -name '*.[ch]' -print \)`System.map:	u-boot		@$(NM) $< | \		grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \		sort > System.map#########################################################################elseall install u-boot u-boot.srec depend dep:	@echo "System not configured - see README" >&2	@ exit 1endif#########################################################################unconfig:	@rm -f include/config.h include/config.mk board/*/config.tmp#========================================================================# M68K#========================================================================########################################################################### Coldfire#########################################################################cobra5272_config :		unconfig	@./mkconfig $(@:_config=) m68k mcf52x2 cobra5272M5272C3_config :		unconfig	@./mkconfig $(@:_config=) m68k mcf52x2 m5272c3M5282EVB_config :		unconfig	@./mkconfig $(@:_config=) m68k mcf52x2 m5282evbTASREG_config :		unconfig	@./mkconfig $(@:_config=) m68k mcf52x2 tasreg esd#########################################################################

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?