makefile

来自「bootup code for Barebone, it s useful fo」· 代码 · 共 57 行

TXT
57
字号
# A brief explanation.#  # Copyright (C) 2001 MontaVista Software Inc.# Author: Jun Sun, jsun@mvista.com or jsun@junsun.net# # This program is free software; you can redistribute  it and/or modify it# under  the terms of  the GNU General  Public License as published by the# Free Software Foundation;  either version 2 of the  License, or (at your# option) any later version.######## CONFIGURATION #########LOADADDR = 0xa0040000RAMSIZE = 0x00100000		# 1MBCROSS_COMPILE = mipsel-linux-######## END OF CONFIGURATION #########.S.s:	$(CPP) $(CFLAGS) $< -o $*.s.S.o:	$(CC) $(CFLAGS) -c $< -o $*.o.c.o:	$(CC) $(CFLAGS) -c $< -o $*.oCC =       $(CROSS_COMPILE)gccLD =       $(CROSS_COMPILE)ldOBJCOPY =  $(CROSS_COMPILE)objcopyOBJDUMP =  $(CROSS_COMPILE)objdumpCFLAGS = -O -G 0 -mno-abicalls -fno-pic -Wall -DRAMSIZE=${RAMSIZE}# Drop some uninteresting sections in the kernel.# This is only relevant for ELF kernels but doesn't hurt a.outdrop-sections   = .reginfo .mdebugstrip-flags     = $(addprefix --remove-section=,$(drop-sections))all : elf srec binsrec : barebone.srecelf : barebone.elfbin : barebone.binbarebone.elf : start.o main.o uart16550.o print.o printf.o	$(LD) -o barebone.elf -N -Tbarebone.lds -Ttext $(LOADADDR) $^barebone.srec : barebone.elf	$(OBJCOPY) -S -O srec $(strip-flags) barebone.elf barebone.srecbarebone.bin : barebone.elf	$(OBJCOPY) -S -O binary $(strip-flags) barebone.elf barebone.binclean:	rm -f *.o barebone.elf barebone.srec barebone.bin

⌨️ 快捷键说明

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