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

📄 makefile

📁 Linux内核源代码 为压缩文件 是<<Linux内核>>一书中的源代码
💻
字号:
## arch/ppc/boot/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) 1994 by Linus Torvalds# Adapted for PowerPC by Gary Thomas# modified by Cort (cort@cs.nmt.edu)#.c.s:	$(CC) $(CFLAGS) -S -o $*.s $<.s.o:	$(AS) -o $*.o $<.c.o:	$(CC) $(CFLAGS)  -DINITRD_OFFSET=$(IOFF) -DINITRD_SIZE=$(ISZ) -DZIMAGE_OFFSET=$(ZOFF) -DZIMAGE_SIZE=$(ZSZ) -D__BOOTER__ -c -o $*.o $<.S.s:	$(CPP) $(AFLAGS) -traditional -o $*.o $<.S.o:	$(CC) $(AFLAGS) -traditional -c -o $*.o $<ZOFF = 0ZSZ = 0IOFF = 0ISZ = 0ifeq ($(CONFIG_ALL_PPC),y)CONFIG_PREP=yendififeq ($(CONFIG_SMP),y)TFTPIMAGE=/tftpboot/zImage.prep.smp$(MSIZE)elseTFTPIMAGE=/tftpboot/zImage.prep$(MSIZE)endififeq ($(CONFIG_SMP),y)TFTPSIMAGE=/tftpboot/sImage.smpelseTFTPSIMAGE=/tftpboot/sImageendififeq ($(CONFIG_PPC64BRIDGE),y)MSIZE=.64elseMSIZE=endifZLINKFLAGS = -T ../vmlinux.lds -Ttext 0x00800000GZIP_FLAGS = -v9fOBJECTS := head.o misc.o ../coffboot/zlib.oCFLAGS = $(CPPFLAGS) -O2 -DSTDC_HEADERS -fno-builtinOBJCOPY_ARGS = -O elf32-powerpcOBJECTS += vreset.o kbd.o of1275.oifeq ($(CONFIG_SERIAL_CONSOLE),y)OBJECTS += ns16550.oendifall:	zImagezvmlinux.initrd: zvmlinux	$(LD) $(ZLINKFLAGS) -o zvmlinux.initrd.tmp $(OBJECTS)	$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \		--add-section=initrd=ramdisk.image.gz \		--add-section=image=../coffboot/vmlinux.gz \		zvmlinux.initrd.tmp zvmlinux.initrd	$(CC) $(CFLAGS) -DINITRD_OFFSET=`sh offset $(OBJDUMP) zvmlinux.initrd initrd` \		-DINITRD_SIZE=`sh size $(OBJDUMP) zvmlinux.initrd initrd` \		-DZIMAGE_OFFSET=`sh offset $(OBJDUMP) zvmlinux.initrd image` \		-DZIMAGE_SIZE=`sh size $(OBJDUMP) zvmlinux.initrd image` \		-D__BOOTER__ \		-c -o misc.o misc.c	$(LD) $(ZLINKFLAGS) -o zvmlinux.initrd.tmp $(OBJECTS)	$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \		--add-section=initrd=ramdisk.image.gz \		--add-section=image=../coffboot/vmlinux.gz \		zvmlinux.initrd.tmp $@	rm zvmlinux.initrd.tmpzImage: zvmlinux mkprep sImageifdef CONFIG_PREP	./mkprep -pbp zvmlinux zImageendififdef CONFIG_APUS	$(STRIP) ../../../vmlinux -o vmapus	gzip $(GZIP_FLAGS) vmapusendifsImage: ../../../vmlinuxifdef CONFIG_GEMINI	$(OBJCOPY) -I elf32-powerpc -O binary ../../../vmlinux sImageendifzImage.initrd: zvmlinux.initrd mkprepifdef CONFIG_PREP	./mkprep -pbp zvmlinux.initrd zImage.initrdendifzvmlinux: $(OBJECTS) ../coffboot/vmlinux.gz## build the boot loader image and then compute the offset into it# for the kernel image#	$(LD) $(ZLINKFLAGS) -o zvmlinux.tmp $(OBJECTS)	$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment --add-section=image=../coffboot/vmlinux.gz \		zvmlinux.tmp $@## then with the offset rebuild the bootloader so we know where the kernel is#	$(CC) $(CFLAGS) -DINITRD_OFFSET=0 -DINITRD_SIZE=0 \		-DZIMAGE_OFFSET=`sh offset $(OBJDUMP) zvmlinux image` \		-DZIMAGE_SIZE=`sh size $(OBJDUMP) zvmlinux image` \		-D__BOOTER__ \		-c -o misc.o misc.c	$(LD) $(ZLINKFLAGS) -o zvmlinux.tmp $(OBJECTS)	$(OBJCOPY) $(OBJCOPY_ARGS) -R .comment --add-section=image=../coffboot/vmlinux.gz \		zvmlinux.tmp $@	rm zvmlinux.tmpfloppy: $(TOPDIR)/vmlinux zImage	dd if=zImage of=/dev/fd0H1440 bs=64bmkprep : mkprep.c	$(HOSTCC) -o mkprep mkprep.cznetboot : zImageifdef CONFIG_PREP	cp zImage $(TFTPIMAGE)endififdef CONFIG_GEMINI	cp sImage $(TFTPSIMAGE)endifznetboot.initrd : zImage.initrd	cp zImage.initrd $(TFTPIMAGE)clean:	rm -f vmlinux* zvmlinux* mkprep zImage* sImage*fastdep:	$(TOPDIR)/scripts/mkdep *.[Sch] > .dependdep:	$(CPP) $(CPPFLAGS) -M *.S *.c > .depend# just here to match coffboot/Makefilevmlinux.coff:vmlinux.coff.initrd:

⌨️ 快捷键说明

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