?? makefile
字號:
## arch/arm/Makefile## This file is subject to the terms and conditions of the GNU General Public# License. See the file "COPYING" in the main directory of this archive# for more details.## Copyright (C) 1995-2001 by Russell KingLINKFLAGS :=-p -X -T arch/arm/vmlinux.ldsGZFLAGS :=-9CFLAGS +=-fno-common -pipeifeq ($(CONFIG_FRAME_POINTER),y)CFLAGS :=$(CFLAGS:-fomit-frame-pointer=-mapcs)endifCFLAGS :=$(CFLAGS:-O2=-Os)ifeq ($(CONFIG_DEBUG_INFO),y)CFLAGS +=-gendif# Select CPU dependent flags. Note that order of declaration is important;# the options further down the list override previous items.## Note! For APCS-26 YOU MUST HAVE AN APCS-26 LIBGCC.A#apcs-y :=-mapcs-32apcs-$(CONFIG_CPU_26) :=-mapcs-26 -mcpu=arm3 -Os# This selects which instruction set is used.arch-y :=arch-$(CONFIG_CPU_32v3) :=-march=armv3arch-$(CONFIG_CPU_32v4) :=-march=armv4arch-$(CONFIG_CPU_32v5) :=-march=armv5arch-$(CONFIG_CPU_XSCALE) :=-march=armv4 -Wa,#-mxscale #-march=armv5tearch-$(CONFIG_CPU_XSCALE) +=-specs=$(TOPDIR)/xscale.specs# This selects how we optimise for the processor.tune-y :=tune-$(CONFIG_CPU_ARM610) :=-mtune=arm610tune-$(CONFIG_CPU_ARM710) :=-mtune=arm710tune-$(CONFIG_CPU_ARM720T) :=-mtune=arm7tdmitune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmitune-$(CONFIG_CPU_ARM922T) :=-mtune=arm9tdmitune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmitune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100tune-$(CONFIG_CPU_XSCALE) :=-mtune=strongarm #-mtune=xscaleCFLAGS_BOOT :=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-floatCFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-floatAFLAGS +=$(apcs-y) $(arch-y) -mno-fpu -msoft-floatifeq ($(CONFIG_CPU_26),y)PROCESSOR = armo ifeq ($(CONFIG_ROM_KERNEL),y) DATAADDR = 0x02080000 TEXTADDR = 0x03800000 LDSCRIPT = arch/arm/vmlinux-armo-rom.lds.in else TEXTADDR = 0x02080000 LDSCRIPT = arch/arm/vmlinux-armo.lds.in endifendififeq ($(CONFIG_CPU_32),y)PROCESSOR = armvTEXTADDR = 0xC0008000LDSCRIPT = arch/arm/vmlinux-armv.lds.inendififeq ($(CONFIG_ARCH_ARCA5K),y)MACHINE = arcendififeq ($(CONFIG_ARCH_RPC),y)MACHINE = rpcendififeq ($(CONFIG_ARCH_EBSA110),y)MACHINE = ebsa110CFLAGS_3c589_cs :=-DISA_SIXTEEN_BIT_PERIPHERALexport CFLAGS_3c589_csendififeq ($(CONFIG_ARCH_CLPS7500),y)MACHINE = clps7500INCDIR = cl7500endififeq ($(CONFIG_FOOTBRIDGE),y)MACHINE = footbridgeINCDIR = ebsa285endififeq ($(CONFIG_ARCH_CO285),y)TEXTADDR = 0x60008000MACHINE = footbridgeINCDIR = ebsa285endififeq ($(CONFIG_ARCH_FTVPCI),y)MACHINE = ftvpciINCDIR = nexuspciendififeq ($(CONFIG_ARCH_TBOX),y)MACHINE = tboxendififeq ($(CONFIG_ARCH_SHARK),y)MACHINE = sharkendififeq ($(CONFIG_ARCH_SA1100),y)ifeq ($(CONFIG_SA1111),y)# SA1111 DMA bug: we don't want the kernel to live in precious DMA-able memoryTEXTADDR = 0xc0208000endifMACHINE = sa1100endififeq ($(CONFIG_ARCH_PXA),y)MACHINE = pxaendififeq ($(CONFIG_ARCH_L7200),y)MACHINE = l7200endififeq ($(CONFIG_ARCH_INTEGRATOR),y)MACHINE = integratorendififeq ($(CONFIG_ARCH_MX1ADS),y)MACHINE = mx1adsendififeq ($(CONFIG_ARCH_CAMELOT),y)MACHINE = epxa10dbendififeq ($(CONFIG_ARCH_CLPS711X),y)TEXTADDR = 0xc0028000MACHINE = clps711xendififeq ($(CONFIG_ARCH_FORTUNET),y)TEXTADDR = 0xc0208000endififeq ($(CONFIG_ARCH_ANAKIN),y)MACHINE = anakinendififeq ($(CONFIG_ARCH_S3C2400),y)TEXTADDR = 0xC0808000MACHINE = s3c2400endififeq ($(CONFIG_ARCH_S3C2410),y)TEXTADDR = 0xC0008000MACHINE = s3c2410endifexport MACHINE PROCESSOR TEXTADDR GZFLAGS CFLAGS_BOOT# Only set INCDIR if its not already defined above# Grr, ?= doesn't work as all the other assignment operators do. Make bug?ifeq ($(origin INCDIR), undefined)INCDIR := $(MACHINE)endififeq ($(origin DATAADDR), undefined)DATAADDR := .endif# If we have a machine-specific directory, then include it in the build.MACHDIR := arch/arm/mach-$(MACHINE)ifeq ($(MACHDIR),$(wildcard $(MACHDIR)))SUBDIRS += $(MACHDIR)CORE_FILES := $(MACHDIR)/$(MACHINE).o $(CORE_FILES)endifHEAD := arch/arm/kernel/head-$(PROCESSOR).o \ arch/arm/kernel/init_task.oSUBDIRS += arch/arm/kernel arch/arm/mm arch/arm/lib arch/arm/nwfpeCORE_FILES := arch/arm/kernel/kernel.o arch/arm/mm/mm.o $(CORE_FILES)LIBS := arch/arm/lib/lib.a $(LIBS)ifeq ($(CONFIG_FPE_NWFPE),y)LIBS := arch/arm/nwfpe/math-emu.o $(LIBS)endif# Only include fastfpe if it is part of the kernel tree.FASTFPE := arch/arm/fastfpeifeq ($(FASTFPE),$(wildcard $(FASTFPE)))SUBDIRS += $(FASTFPE)ifeq ($(CONFIG_FPE_FASTFPE),y)LIBS := arch/arm/fastfpe/fast-math-emu.o $(LIBS)endifendififeq ($(findstring y,$(CONFIG_ARCH_CLPS7500) $(CONFIG_ARCH_L7200)),y)SUBDIRS += drivers/acorn/charDRIVERS += drivers/acorn/char/acorn-char.oendifMAKEBOOT = $(MAKE) -C arch/$(ARCH)/bootMAKETOOLS = $(MAKE) -C arch/$(ARCH)/tools# The following is a hack to get 'constants.h' up# to date before starting compilation$(patsubst %,_dir_%, $(SUBDIRS)): maketools$(patsubst %,_modsubdir_%,$(MOD_DIRS)): maketoolssymlinks: archsymlinksarchsymlinks: $(RM) include/asm-arm/arch include/asm-arm/proc (cd include/asm-arm; ln -sf arch-$(INCDIR) arch; ln -sf proc-$(PROCESSOR) proc)vmlinux: arch/arm/vmlinux.ldsarch/arm/vmlinux.lds: $(LDSCRIPT) dummy @sed 's/TEXTADDR/$(TEXTADDR)/;s/DATAADDR/$(DATAADDR)/' $(LDSCRIPT) >$@arch/arm/kernel arch/arm/mm arch/arm/lib: dummy $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)bzImage zImage zinstall Image bootpImage install: vmlinux @$(MAKEBOOT) $@CLEAN_FILES += \ arch/arm/vmlinux.ldsMRPROPER_FILES += \ arch/arm/tools/constants.h* \ include/asm-arm/arch \ include/asm-arm/proc \ include/asm-arm/constants.h* \ include/asm-arm/mach-types.h# We use MRPROPER_FILES and CLEAN_FILES nowarchmrproper: @/bin/truearchclean: @$(MAKEBOOT) cleanarchdep: scripts/mkdep archsymlinks @$(MAKETOOLS) dep @$(MAKEBOOT) dep# we need version.hmaketools: checkbin include/linux/version.h @$(MAKETOOLS) all# Ensure this is ld "2.9.4" or laterNEW_LINKER := $(shell $(LD) --gc-sections --version >/dev/null 2>&1; echo $$?)ifneq ($(NEW_LINKER),0)checkbin: @echo '*** ${VERSION}.${PATCHLEVEL} kernels no longer build correctly with old versions of binutils.' @echo '*** Please upgrade your binutils to 2.9.5.' @falseelsecheckbin: @trueendif# My testing targets (that short circuit a few dependencies)zImg:; @$(MAKEBOOT) zImageImg:; @$(MAKEBOOT) Imagei:; @$(MAKEBOOT) installzi:; @$(MAKEBOOT) zinstallbp:; @$(MAKEBOOT) bootpImage## Configuration targets. Use these to select a# configuration for your architecture%_config: @( \ CFG=$(@:_config=); \ if [ -f arch/arm/def-configs/$$CFG ]; then \ [ -f .config ] && mv -f .config .config.old; \ cp arch/arm/def-configs/$$CFG .config; \ echo "*** Default configuration for $$CFG installed"; \ echo "*** Next, you may run 'make oldconfig'"; \ else \ echo "$$CFG does not exist"; \ fi; \ )
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -