📄 makefile
字号:
# $Id: Makefile,v 1.26 2001/11/16 17:42:17 pkj Exp $# cris/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.LD_SCRIPT=$(TOPDIR)/arch/cris/cris.ld# A bug in ld prevents us from having a (constant-value) symbol in a# "ORIGIN =" or "LENGTH =" expression. We fix that by generating a# linker file with the symbolic part of those expressions evaluated.# Unfortunately, there is trouble making vmlinux depend on anything we# generate here, so we *always* regenerate the final linker script and# replace the LD macro to get what we want. Thankfully(?) vmlinux is# always rebuilt (due to calling make recursively and not knowing if# anything was rebuilt).# The shell script to build in some kind of dependency is really not# necessary for reasons of speed. It's there because always# regenerating stuff (even for incremental linking of subsystems!) is# even more nauseating.LD = if [ ! -e $(LD_SCRIPT).tmp -o $(LD_SCRIPT) -nt $(LD_SCRIPT).tmp ]; then \ sed -e s/@CONFIG_ETRAX_DRAM_VIRTUAL_BASE@/0x$(CONFIG_ETRAX_DRAM_VIRTUAL_BASE)/ \ -e s/@CONFIG_ETRAX_DRAM_SIZE_M@/$(CONFIG_ETRAX_DRAM_SIZE)/ \ < $(LD_SCRIPT) > $(LD_SCRIPT).tmp; \ else true; \ fi && $(CROSS_COMPILE)gcc -mlinux -nostdlibLINKFLAGS = -mlinux -T $(LD_SCRIPT).tmp# objcopy is used to make binary images from the resulting linked fileOBJCOPY := $(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S# -mlinux enables -march=v10, -fno-underscores, -D__linux__ among othersCFLAGS := $(CFLAGS) -mlinux -pipeifdef CONFIG_ETRAX_KGDBCFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -gCFLAGS += -fno-omit-frame-pointerendifAFLAGS += -mlinuxHEAD := arch/cris/kernel/head.oSUBDIRS += arch/cris/kernel arch/cris/mm arch/cris/lib arch/cris/driversifdef CONFIG_ETRAX_AXISFLASHMAP# only build this if axis flash map is used, because they depend on# each others config optionsSUBDIRS += arch/cris/boot/rescueendifCORE_FILES += arch/cris/kernel/kernel.o arch/cris/mm/mm.oDRIVERS += arch/cris/drivers/drivers.oLIBGCC = $(shell $(CC) $(CFLAGS) -print-file-name=libgcc.a)LIBS := $(TOPDIR)/arch/cris/lib/lib.a $(LIBS) $(TOPDIR)/arch/cris/lib/lib.a $(LIBGCC)arch/cris/kernel: dummy $(MAKE) linuxsubdirs SUBDIRS=arch/cris/kernelarch/cris/mm: dummy $(MAKE) linuxsubdirs SUBDIRS=arch/cris/mmMAKEBOOT = $(MAKE) -C arch/$(ARCH)/bootvmlinux.bin: vmlinux $(OBJCOPY) vmlinux vmlinux.bintimage: vmlinux.bin cat vmlinux.bin cramfs.img >timagesimimage: timage cp vmlinux.bin simvmlinux.bin# the following will remake timage without compiling the kernel# it does of course require that all object files exist...cramfs:## cramfs - Creates a cramfs image mkcramfs -b 8192 -m romfs_meta.txt root cramfs.img cat vmlinux.bin cramfs.img >timageclinux: vmlinux.bin decompress.bin rescue.bindecompress.bin: dummy @make -C arch/cris/boot/compressed decompress.binrescue.bin: dummy @make -C arch/cris/boot/rescue rescue.binzImage: vmlinux.bin## zImage - Compressed kernel (gzip) @$(MAKEBOOT) zImagecompressed: zImagearchclean: @$(MAKEBOOT) clean rm -f timage vmlinux.bin cramfs.img rm -rf $(LD_SCRIPT).tmparchmrproper:archdep: @$(MAKEBOOT) dep
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -