makefile

来自「Linux Kernel 2.6.9 for OMAP1710」· 代码 · 共 137 行

TXT
137
字号
# This file is included by the global makefile so that you can add your own# architecture-specific flags and dependencies.## 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) 1994 by Linus Torvalds# Changes for PPC by Gary Thomas# Rewritten by Cort Dougan and Paul Mackerras## This must match PAGE_OFFSET in include/asm-ppc/page.h.KERNELLOAD	:= $(CONFIG_KERNEL_START)HAS_BIARCH	:= $(call cc-option-yn, -m32)ifeq ($(HAS_BIARCH),y)AS		:= $(AS) -a32LD		:= $(LD) -m elf32ppcCC		:= $(CC) -m32endifLDFLAGS_vmlinux	:= -Ttext $(KERNELLOAD) -BstaticCPPFLAGS	+= -Iarch/$(ARCH)AFLAGS		+= -Iarch/$(ARCH)CFLAGS		+= -Iarch/$(ARCH) -msoft-float -pipe \		-ffixed-r2 -mmultipleCPP		= $(CC) -E $(CFLAGS)CHECKFLAGS	+= -D__powerpc__ifndef CONFIG_E500CFLAGS		+= -mstringendifcpu-as-$(CONFIG_PPC64BRIDGE)	+= -Wa,-mppc64bridgecpu-as-$(CONFIG_4xx)		+= -Wa,-m405cpu-as-$(CONFIG_6xx)		+= -Wa,-maltiveccpu-as-$(CONFIG_POWER4)		+= -Wa,-maltiveccpu-as-$(CONFIG_E500)		+= -Wa,-me500AFLAGS += $(cpu-as-y)CFLAGS += $(cpu-as-y)head-y				:= arch/ppc/kernel/head.ohead-$(CONFIG_8xx)		:= arch/ppc/kernel/head_8xx.ohead-$(CONFIG_4xx)		:= arch/ppc/kernel/head_4xx.ohead-$(CONFIG_44x)		:= arch/ppc/kernel/head_44x.ohead-$(CONFIG_E500)		:= arch/ppc/kernel/head_e500.ohead-$(CONFIG_6xx)		+= arch/ppc/kernel/idle_6xx.ohead-$(CONFIG_POWER4)		+= arch/ppc/kernel/idle_power4.ocore-y				+= arch/ppc/kernel/ arch/ppc/platforms/ \				   arch/ppc/mm/ arch/ppc/lib/ arch/ppc/syslib/core-$(CONFIG_4xx)		+= arch/ppc/platforms/4xx/core-$(CONFIG_85xx)		+= arch/ppc/platforms/85xx/core-$(CONFIG_MATH_EMULATION)	+= arch/ppc/math-emu/core-$(CONFIG_XMON)		+= arch/ppc/xmon/core-$(CONFIG_APUS)		+= arch/ppc/amiga/drivers-$(CONFIG_8xx)		+= arch/ppc/8xx_io/drivers-$(CONFIG_4xx)		+= arch/ppc/4xx_io/drivers-$(CONFIG_CPM2)		+= arch/ppc/8260_io/drivers-$(CONFIG_OPROFILE)	+= arch/ppc/oprofile/BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm.PHONY: $(BOOT_TARGETS)all: zImageCPPFLAGS_vmlinux.lds	:= -Upowerpc# All the instructions talk about "make bzImage".bzImage: zImageboot := arch/$(ARCH)/boot$(BOOT_TARGETS): vmlinux	$(Q)$(MAKE) $(build)=$(boot) $@uImage: vmlinux	$(Q)$(MAKE) $(build)=$(boot)/images $(boot)/images/$@define archhelp  @echo '* zImage          - Compressed kernel image (arch/$(ARCH)/boot/images/zImage.*)'  @echo '  uImage          - Create a bootable image for U-Boot / PPCBoot'  @echo '  install         - Install kernel using'  @echo '                    (your) ~/bin/installkernel or'  @echo '                    (distribution) /sbin/installkernel or'  @echo '                    install to $$(INSTALL_PATH) and run lilo'  @echo '  *_defconfig     - Select default config from arch/$(ARCH)/ppc/configs'endefarchclean:	$(Q)$(MAKE) $(clean)=arch/ppc/bootprepare: include/asm-$(ARCH)/offsets.h checkbinarch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \				   include/config/MARKERinclude/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s	$(call filechk,gen-asm-offsets)# Use the file '.tmp_gas_check' for binutils tests, as gas won't output# to stdout and these checks are run even on install targets.TOUT	:= .tmp_gas_check# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec# instructions.AS_ALTIVEC	:= $(shell echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; echo $$?)# gcc-3.4 and binutils-2.14 are a fatal combination.GCC_VERSION	:= $(call cc-version)BAD_GCC_AS	:= $(shell echo mftb 5 | $(AS) -mppc -many -o $(TOUT) >/dev/null 2>&1 && echo 0 || echo 1)checkbin:ifeq ($(GCC_VERSION)$(BAD_GCC_AS),03041)	@echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '	@echo 'correctly with gcc-3.4 and your version of binutils.'	@echo '*** Please upgrade your binutils or downgrade your gcc'	@falseendififneq ($(AS_ALTIVEC),0)	echo $(AS_ALTIVEC)	@echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '	@echo 'correctly with old versions of binutils.'	@echo '*** Please upgrade your binutils to 2.12.1 or newer'	@falseendif	@trueCLEAN_FILES +=	include/asm-$(ARCH)/offsets.h \		arch/$(ARCH)/kernel/asm-offsets.s \		$(TOUT)

⌨️ 快捷键说明

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