⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 Linux内核源代码 为压缩文件 是<<Linux内核>>一书中的源代码
💻
字号:
## arch/arm/Makefile## This file is included by the global makefile so that you can add your own# architecture-specific flags and dependencies. Remember to do have actions# for "archclean" and "archdep" for cleaning up and making dependencies for# this architecture## 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-2000 by Russell KingOBJCOPY		:= $(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -SCPP		:= $(CC) -ELINKFLAGS	:= -p -X -T arch/arm/vmlinux.ldsARCHCC		:= $(word 1,$(CC))AFLAGS		+= -mno-fpuCFLAGS_PIPE	:= -pipeCFLAGS		:= $(CFLAGS) $(CFLAGS_PIPE) -msoft-floatifdef CONFIG_FRAME_POINTERCFLAGS		:= $(CFLAGS:-fomit-frame-pointer=)endififdef CONFIG_DEBUG_INFOCFLAGS		+= -gendifGZFLAGS		= -9# Ensure this is ld "2.9.4" or laterNEW_LINKER	:= $(shell $(LD) --gc-sections --version >/dev/null 2>&1; echo $$?)ifneq ($(NEW_LINKER),0)dummy:;		@echo '*** ${VERSION}.${PATCHLEVEL} kernels no longer build correctly with old versions of binutils.'		@echo '*** Please upgrade your binutils to 2.9.5.'		@falseendif# GCC 2.7 uses different options to later compilers; sort out which we haveNEW_GCC		:= $(shell $(CC) --version 2>&1 | grep '^2\.7' > /dev/null; echo $$?)## select flags depending on the compiler#ifneq ($(NEW_GCC),0)CFLAGS			+= -mshort-load-bytesCFLAGS_PROC_CPU_26	:= -mcpu=arm3 -mapcs-26 -OsCFLAGS_PROC_CPU_32v3	:= -march=armv3CFLAGS_PROC_CPU_32v4	:= -march=armv4elseCFLAGS			+= -DNO_TEXT_SECTIONSCFLAGS_PROC_CPU_26	:= -m3CFLAGS_PROC_CPU_32v3	:= -m6CFLAGS_PROC_CPU_32v4	:= -m6endif## Select CPU dependent flags#ifeq ($(CONFIG_CPU_26),y) PROCESSOR	 = armo TEXTADDR	 = 0x02080000 CFLAGS		+= $(CFLAGS_PROC_CPU_26) AFLAGS		+= -mapcs-26endififeq ($(CONFIG_CPU_32),y) PROCESSOR	 = armv TEXTADDR	 = 0xC0008000 ifeq ($(CONFIG_CPU_32v4),y)  CFLAGS	+= $(CFLAGS_PROC_CPU_32v4)  AFLAGS	+= -mapcs-32 -marmv4 else  CFLAGS	+= $(CFLAGS_PROC_CPU_32v3)  AFLAGS	+= -mapcs-32 -marmv3m endif opt-$(CONFIG_CPU_ARM6)		:= -mtune=arm6 opt-$(CONFIG_CPU_ARM7)		:= -mtune=arm7 opt-$(CONFIG_CPU_ARM720)	:= -mtune=arm7tdmi opt-$(CONFIG_CPU_ARM920)	:= -mtune=arm9tdmi opt-$(CONFIG_CPU_SA110)	:= -mtune=strongarm110 opt-$(CONFIG_CPU_SA1100)	:= -mtune=strongarm110 ifneq ($(NEW_GCC),0) CFLAGS	+= $(opt-y) endifendifLIBGCC		:= $(shell $(CC) $(CFLAGS) --print-libgcc-file-name)export	LIBGCC MACHINE PROCESSOR TEXTADDR GZFLAGSifeq ($(CONFIG_ARCH_ARCA5K),y)MACHINE		 = arcendififeq ($(CONFIG_ARCH_RPC),y)MACHINE		 = rpcendififeq ($(CONFIG_ARCH_EBSA110),y)MACHINE		 = ebsa110endififeq ($(CONFIG_ARCH_CLPS7500),y)MACHINE		 = clps7500INCDIR		 = cl7500endififeq ($(CONFIG_FOOTBRIDGE),y)MACHINE		 = footbridgeINCDIR		 = ebsa285endififeq ($(CONFIG_ARCH_CO285),y)TEXTADDR	 = 0x60008000MACHINE		 = footbridgeINCDIR		 = ebsa285endififeq ($(CONFIG_ARCH_NEXUSPCI),y)MACHINE		 = nexuspciendififeq ($(CONFIG_ARCH_SHARK),y)MACHINE		 = sharkendififeq ($(CONFIG_ARCH_SA1100),y)MACHINE		 = sa1100endififeq ($(CONFIG_ARCH_L7200),y)MACHINE		 = l7200endififeq ($(CONFIG_ARCH_INTEGRATOR),y)MACHINE		 = integratorendif# 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)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.o arch/arm/lib/lib.a $(LIBS) $(LIBGCC)ifeq ($(CONFIG_NWFPE),y)LIBS		:= arch/arm/nwfpe/math-emu.o $(LIBS)endififeq ($(CONFIG_ARCH_ACORN),y)SUBDIRS		+= drivers/acornDRIVERS		+= drivers/acorn/block/acorn-block.aDRIVERS		+= drivers/acorn/char/acorn-char.oDRIVERS		+= drivers/acorn/net/acorn-net.oDRIVERS		+= drivers/acorn/scsi/acorn-scsi.aendififeq ($(CONFIG_ARCH_CLPS7500),y)SUBDIRS		+= drivers/acorn/charDRIVERS		+= drivers/acorn/char/acorn-char.oendifMAKEBOOT	 = $(MAKE) -C arch/$(ARCH)/boot# The following is a hack to get 'constants.h' up# to date before starting compilation$(patsubst %, _dir_%, $(SUBDIRS)) init/main.o init/version.o : \	include/asm-arm/mach-types.h$(patsubst %, _dir_%, $(SUBDIRS)) : constantsinclude/asm-arm/mach-types.h: arch/arm/tools/mach-types  \			      arch/arm/tools/gen-mach-types	@awk -f arch/arm/tools/gen-mach-types arch/arm/tools/mach-types > $@constants: dummy	@$(MAKE) -C arch/arm/lib constants.hsymlinks: 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: arch/arm/vmlinux-$(PROCESSOR).lds.in dummy	@sed 's/TEXTADDR/$(TEXTADDR)/' <$< >$@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) $@archmrproper:	$(RM) include/asm-arm/arch include/asm-arm/procarchclean:	@$(MAKEBOOT) clean	$(RM) arch/arm/lib/constants.h arch/arm/vmlinux.lds	$(RM) include/asm-arm/mach-types.harchdep: archsymlinks	@$(MAKEBOOT) dep# My testing targets (that short circuit a few dependencies)zImg:;	@$(MAKEBOOT) zImageImg:;	@$(MAKEBOOT) Imagei:;	@$(MAKEBOOT) installzi:;	@$(MAKEBOOT) zinstall## Configuration targets.  Use these to select a# configuration for your architectureCFGS=	a5k_config		ebsa110_config		\	footbridge_config	rpc_config		\	brutus_config		victor_config		\	empeg_config		thinclient_config	\	assabet_config		lart_config		\	cerf_config		lusl7200_config $(CFGS):	@( \	CFG=$(@:_config=); \	if [ -f arch/arm/def-configs/$$CFG ]; then \	  $(RM) arch/arm/defconfig; \	  cp arch/arm/def-configs/$$CFG arch/arm/defconfig; \	  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 + -