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

📄 makefile

📁 MIPS下的boottloader yamon 的源代码
💻
📖 第 1 页 / 共 2 页
字号:
#########################################################################
#
# Makefile used for building YAMON.
# 
# After adapting the "Environment specifics" section of this makefile
# (see below), the makefile may be used in the specific build 
# environment.
#
# Note, that this makefile uses forward slashes '/' for directory
# references.
#
# The default target (all) builds YAMON in two formats :
#
# yamon-<rev>.fl :  The YAMON image used for loading YAMON to a
#		    target board using the parallel port.
#
# yamon-<rev>.bin : The YAMON image (binary) used for programming
#		    an (E)PROM.
#
# Other targets are : 
#
# install :	    Creates the necessary directories and
#		    builds the tools needed for the main build.
# clean :   	    Deletes all files generated by makefile.
# depend :  	    Builds dependency files.
# release : 	    First deletes all files generated by makefile (make clean).
#  		    Then builds YAMON images (make all).
#		    Then generates disassembly files.
#
#########################################################################
#
# Copyright (c) 1999-2000 MIPS Technologies, Inc. All rights reserved. 
# 
# Unpublished rights reserved under the Copyright Laws of the United States of 
# America. 
# 
# This document contains information that is proprietary to MIPS Technologies, 
# Inc. ("MIPS Technologies"). Any copying, modifying or use of this information 
# (in whole or in part) which is not expressly permitted in writing by MIPS 
# Technologies or a contractually-authorized third party is strictly prohibited. 
# At a minimum, this information is protected under unfair competition laws and 
# the expression of the information contained herein is protected under federal 
# copyright laws. Violations thereof may result in criminal penalties and fines. 
# MIPS Technologies or any contractually-authorized third party reserves the 
# right to change the information contained in this document to improve 
# function, design or otherwise. MIPS Technologies does not assume any liability 
# arising out of the application or use of this information. Any license under 
# patent rights or any other intellectual property rights owned by MIPS 
# Technologies or third parties shall be conveyed by MIPS Technologies or any 
# contractually-authorized third party in a separate license agreement between 
# the parties. 
# The information contained in this document constitutes one or more of the 
# following: commercial computer software, commercial computer software 
# documentation or other commercial items. If the user of this information, or 
# any related documentation of any kind, including related technical data or 
# manuals, is an agency, department, or other entity of the United States 
# government ("Government"), the use, duplication, reproduction, release, 
# modification, disclosure, or transfer of this information, or any related 
# documentation of any kind, is restricted in accordance with Federal 
# Acquisition Regulation 12.212 for civilian agencies and Defense Federal 
# Acquisition Regulation Supplement 227.7202 for military agencies. The use of 
# this information by the Government is further restricted in accordance with 
# the terms of the license agreement(s) and/or applicable contract terms and 
# conditions covering this information from MIPS Technologies or any 
# contractually-authorized third party. 
#
#########################################################################



# **********************************************
# Environment specifics
#
# These are the only things, you have to adapt
# to your specific environment.
# **********************************************

# Tool-chain used for compilation of target code (gnu or sde).
#TOOLCHAIN = linux
TOOLCHAIN = gnu
#TOOLCHAIN = sde
#TOOLCHAIN = macosx

#
# Platform to build: NOTE: Must be upper case
#

#BUILDTYPE = PB1000
#BUILDTYPE = PB1500
#BUILDTYPE = PB1100
#BUILDTYPE = PB1550
#BUILDTYPE = PB1200
#BUILDTYPE = DB1500
#BUILDTYPE = DB1000
#BUILDTYPE = DB1100
#BUILDTYPE = DB1550
BUILDTYPE = DB1200
#BUILDTYPE = BE1000
#BUILDTYPE = HYDROGEN
#BUILDTYPE = HYD1100
#BUILDTYPE = H3
#BUILDTYPE = TI1500
#BUILDTYPE = BOSPORUS
#BUILDTYPE = MIRAGE
#BUILDTYPE = WIDGET
#BUILDTYPE = SDV2
#BUILDTYPE = FICMMP

ifeq ($(TOOLCHAIN),linux)
CC        = mips_fp_le-gcc
LD        = mips_fp_le-ld
OBJCOPY   = mips_fp_le-objcopy
OBJDUMP   = mips_fp_le-objdump
endif

ifeq ($(TOOLCHAIN),macosx)
CC        = mips-elf-gcc
LD        = mips-elf-ld
OBJCOPY   = mips-elf-objcopy
OBJDUMP   = mips-elf-objdump
endif

ifeq ($(TOOLCHAIN),gnu)
TOOLROOT  = /usr/local/comp/mips-elf/gcc-3.3.2
CC        = $(TOOLROOT)/bin/mips-elf-gcc -fno-builtin
LD        = $(TOOLROOT)/bin/mips-elf-ld
OBJCOPY   = $(TOOLROOT)/bin/mips-elf-objcopy
OBJDUMP   = $(TOOLROOT)/bin/mips-elf-objdump
endif

ifeq ($(TOOLCHAIN),sde)
CC        = C:/sde4/bin/sde-gcc
LD        = C:/sde4/bin/sde-ld
OBJCOPY   = C:/sde4/bin/sde-objcopy
OBJDUMP   = C:/sde4/bin/sde-objdump
endif

# Perl interpreter Unix
PERL      = perl

# Perl interpreter windows
#PERL      =C:/Perl/bin/perl.exe

# Shell commands
RM        = rm
CD	  = cd
MKDIR     = mkdir
ECHO	  = echo
CAT       = cat

# **********************************************
# Revision
# *********************************************
#
# NOTE: Odd numbers denote a release...there should also
# be a corresponding CVS tag, e.g. YAMON_0209, and even
# number represent development versions. So in other words,
# after a release is made (an odd REVMIN), the REVMIN is
# bumped to an even number so we can tell releases apart
# from development versions.
#
REVMAJ    = 02
REVMIN    = 27G$(BUILDTYPE)

# **********************************************
# Target prefix.
# **********************************************

IMAGE_BASENAME = yamon
IMAGENAME      = $(IMAGE_BASENAME)-$(REVMAJ).$(REVMIN)
RESET	       = reset-$(REVMAJ).$(REVMIN)

# **********************************************
# Make calls itself recursively in order to build
# the little- and big-endian images.
# If ENDIAN is defined, this is such a recursive
# call.
# **********************************************

ifdef ENDIAN

# Setup the definitions required to build the little- or
# big-endian image (from directory bin/EL or bin/EB).

# Root directory of YAMON source code.
ROOT      = ./../..

# Directory where make is supposed to be invoked.
MAKEDIR   = ./..

# Directory where linker scripts reside.
LINKDIR   = $(MAKEDIR)/link

# Directories holding the source files.
SRCDIR    = \
	    $(ROOT)/init \
	    $(ROOT)/exception \
            $(ROOT)/io \
            $(ROOT)/load \
            $(ROOT)/shell \
            $(ROOT)/sysenv \
            $(ROOT)/env \
            $(ROOT)/lib \
            $(ROOT)/sys \
	    $(ROOT)/sys/cpu \
            $(ROOT)/syscon \
		$(ROOT)/net \
\
            $(ROOT)/drivers/serial \
            $(ROOT)/drivers/flash \
		    $(ROOT)/drivers/lan \
		    $(ROOT)/drivers/rtc \
\
	    $(ROOT)/arch/env/platform \
	    $(ROOT)/arch/exception/platform \
	    $(ROOT)/arch/isa/platform \
	    $(ROOT)/arch/shell/platform \
	    $(ROOT)/arch/sys/platform \
	    $(ROOT)/arch/pci \
\
	    $(ROOT)/arch/syscon/platform \
	    $(ROOT)/arch/syscon/platform/core \
	    $(ROOT)/arch/freq/platform \
	    $(ROOT)/arch/freq/platform/core \
	    $(ROOT)/arch/init/platform \
	    $(ROOT)/arch/init/platform/core \
\
	    $(ROOT)/arch/init/cpu \
	    $(ROOT)/arch/sys/cpu \
	    $(ROOT)/arch/syscon/cpu


ifeq ($(ENDIAN),EB)

# Linker script.
ifdef SIMULATE
LD_SCRIPT    = $(LINKDIR)/link_eb_sim.xn
else
LD_SCRIPT    = $(LINKDIR)/link_eb.xn
endif

# Various filenames.
IMAGE_ELF    = ./$(IMAGENAME)_eb.elf
IMAGE_SREC   = ./$(IMAGENAME)_eb.rec
IMAGE_MAP    = ./$(IMAGENAME)_eb.map

else # EL

# Linker script.
ifdef SIMULATE
LD_SCRIPT    = $(LINKDIR)/link_el_sim.xn
else
LD_SCRIPT    = $(LINKDIR)/link_el.xn
endif

# Various filenames.
IMAGE_ELF    = ./$(IMAGENAME)_el.elf
IMAGE_SREC   = ./$(IMAGENAME)_el.rec
IMAGE_MAP    = ./$(IMAGENAME)_el.map

endif # ifeq ($(ENDIAN,EB))


else  # ifdef ENDIAN

⌨️ 快捷键说明

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