📄 makefile
字号:
## Makefile - simulator suite make file## This file is an adaptation of the software in the SimpleScalar tool suite# originally written by Todd M. Austin for the Multiscalar Research Project# at the University of Wisconsin-Madison.## The modifications were made by Naraig Manjikian at Queen's University,# Kingston, Ontario, Canada.## The remainder of this header comment is unchanged from the original text.##..........................................................................## Copyright (C) 1994, 1995, 1996, 1997 by Todd M. Austin## This source file is distributed "as is" in the hope that it will be# useful. It is distributed with no warranty, and no author or# distributor accepts any responsibility for the consequences of its# use. ## Everyone is granted permission to copy, modify and redistribute# this source file under the following conditions:## This tool set is distributed for non-commercial use only. # Please contact the maintainer for restrictions applying to # commercial use of these tools.## Permission is granted to anyone to make or distribute copies# of this source code, either as received or modified, in any# medium, provided that all copyright notices, permission and# nonwarranty notices are preserved, and that the distributor# grants the recipient permission for further redistribution as# permitted by this document.## Permission is granted to distribute this file in compiled# or executable form under the same conditions that apply for# source code, provided that either:## A. it is accompanied by the corresponding machine-readable# source code,# B. it is accompanied by a written offer, with no time limit,# to give anyone a machine-readable copy of the corresponding# source code in return for reimbursement of the cost of# distribution. This written offer must permit verbatim# duplication by anyone, or# C. it is distributed by someone who received only the# executable form, and is accompanied by a copy of the# written offer of source code that they received concurrently.## In other words, you are welcome to use, share and improve this# source file. You are forbidden to forbid anyone else to use, share# and improve what you give them.## INTERNET: dburger@cs.wisc.edu# US Mail: 1210 W. Dayton Street, Madison, WI 53706## $Id: Makefile,v 1.6 1997/04/16 22:08:40 taustin Exp taustin $## $Log: Makefile,v $# Revision 1.6 1997/04/16 22:08:40 taustin# added standalone loader support## Revision 1.5 1997/03/11 01:04:13 taustin# updated copyright# CC target now supported# RANLIB target now supported# MAKE target now supported# CFLAGS reorganized# MFLAGS and MLIBS to improve portability## Revision 1.1 1996/12/05 18:56:09 taustin# Initial revision## #################################################################### Modify the following definitions to suit your build environment,# NOTE: most platforms should not require any changes##################################################################### Insert your favorite C compiler, here. NOTE: the SimpleScalar simulators# must be compiled with an ANSI C compatible compiler.#CC = gcc## Insert the name of RANLIB tool here, most machines can simply use "ranlib"# machines that do not use RANLIB, should put "true" here#RANLIB = ranlib## Insert the name of library archive tool here##ARRANLIB = ranlib## Insert the name of library archive tool here##ARRANLIB = ranlib## Insert your favorite make tool, here. Most anything should work.#MAKE = make## Compilation-specific feature flags## -DDEBUG - turns on debugging features# -DBFD_LOADER - use libbfd.a to load programs (also required BINUTILS_INC# and BINUTILS_LIB to be defined, see below)#FFLAGS = -DDEBUG -DGRAPHICS## Choose your optimization level here## for optimization: OFLAGS = -O2 -g -finline-functions -funroll-loops# for debug: OFLAGS = -g -Wall#OFLAGS = -O3## Point the Makefile to your Simplescalar-based bunutils, these definitions# should indicate where the include and library directories reside.# NOTE: these definitions are only required if BFD_LOADER is defined.##BINUTILS_INC = -I../include#BINUTILS_LIB = -L../lib## Point the Makefile to your SimpleScalar compiler/assembler #SS_BIN_PATH = /software/SIMPLE_SCALAR/ssbig-na-sstrix/bin#################################################################### YOU SHOULD NOT NEED TO MODIFY ANYTHING BELOW THIS COMMENT##################################################################### Machine-specific flags and libraries, generated by sysprobe#MFLAGS = `./sysprobe -flags`MLIBS = `./sysprobe -libs`## complete flags#CFLAGS = $(MFLAGS) $(FFLAGS) $(OFLAGS) $(BINUTILS_INC) $(BINUTILS_LIB)## all the sources#SIM_SRC = main.c sim-mpfast.c sim-mpcache.c mpcache.c graphics.c \ syscall.c memory.c regs.c loader.c symbol.c \ eval.c options.c range.c stats.c ss.c endian.c misc.cSIM_HDR = mpcache.h graphics.h \ syscall.h memory.h regs.h sim.h loader.h symbol.h eval.h options.h \ range.h version.h stats.h ss.h ss.def endian.h ecoff.h misc.h \ ssmp.h## common objects#SIM_OBJ = main.o syscall.o memory.o regs.o loader.o ss.o endian.o \ symbol.o eval.o options.o stats.o range.o misc.o## external libraries required for build#SIM_LIB = -lm -lX11## all targets#all: sim-mpfast sim-mpcache libssmp.a @echo "my work is done here..."sysprobe: sysprobe.c $(CC) $(FFLAGS) -o sysprobe sysprobe.c @echo endian probe results: `./sysprobe -s` @echo probe flags: `./sysprobe -flags` @echo probe libs: `./sysprobe -libs`sim-mpfast: sysprobe sim-mpfast.o $(SIM_OBJ) @echo "#-----------------------------------------------------" @echo "#" @echo "# Linking objects to produce 'sim-mpfast' simulator" @echo "#" @echo "#-----------------------------------------------------" $(CC) -o sim-mpfast $(CFLAGS) sim-mpfast.o \ $(SIM_OBJ) $(SIM_LIB) $(MLIBS)sim-mpcache: sysprobe sim-mpcache.o mpcache.o graphics.o $(SIM_OBJ) @echo "#-----------------------------------------------------" @echo "#" @echo "# Linking objects to produce 'sim-mpcache' simulator" @echo "#" @echo "#-----------------------------------------------------" $(CC) -o sim-mpcache $(CFLAGS) sim-mpcache.o mpcache.o graphics.o \ $(SIM_OBJ) $(SIM_LIB) $(MLIBS)libssmp.a: @echo "#-----------------------------------------------------" @echo "#" @echo "# Invoking separate Makefile to build runtime library" @echo "#" @echo "#-----------------------------------------------------" $(MAKE) "MAKE=$(MAKE)" "SS_BIN_PATH=$(SS_BIN_PATH)" \ -f Makefile.runtimelib.c.o: $(CC) $(CFLAGS) -c $*.cfilelist: @echo $(SIM_SRC) $(SIM_HDR) Makefilediffs: -rcsdiff RCS/*sim-tests: sysprobe sim-mpfast libssmp.a @echo "#-----------------------------------------------------" @echo "#" @echo "# Invoking separate Makefile to generate and simulate" @echo "# simple test programs for multiprocessing" @echo "#" @echo "#-----------------------------------------------------" cd tests; $(MAKE) "MAKE=$(MAKE)" "SIM_DIR=.." "SIM_BIN=sim-mpfast" \ "SS_BIN_PATH=$(SS_BIN_PATH)" testsclean: @echo "#-----------------------------------------------------" @echo "#" @echo "# Cleaning up simulator-related files" @echo "#" @echo "#-----------------------------------------------------" rm -f *.o *.exe core *~ Makefile.bak sim-mpfast sim-mpcache sysprobeveryclean: clean @echo "#-----------------------------------------------------" @echo "#" @echo "# Cleaning up runtime library files" @echo "#" @echo "#-----------------------------------------------------" $(MAKE) -f Makefile.runtimelib clean @echo "#-----------------------------------------------------" @echo "#" @echo "# Cleaning up test code in separate directory" @echo "#" @echo "#-----------------------------------------------------" cd tests; $(MAKE) cleandepend: makedepend -Y $(BINUTILS_INC) $(SIM_SRC)# DO NOT DELETEmain.o: misc.h regs.h ss.h ss.def memory.h endian.h options.h stats.h eval.hmain.o: loader.h version.h sim.hsim-mpfast.o: misc.h ss.h ss.def regs.h memory.h endian.h options.h stats.hsim-mpfast.o: eval.h loader.h syscall.h mpsyscall.h sim.hsim-mpcache.o: misc.h ss.h ss.def regs.h memory.h endian.h options.h stats.hsim-mpcache.o: eval.h loader.h syscall.h mpsyscall.h sim.h mpcache.hmpcache.o: ss.h ss.def sim.h options.h stats.h eval.h misc.hgraphics.o: graphics.hsyscall.o: misc.h ss.h ss.def regs.h memory.h endian.h options.h stats.hsyscall.o: eval.h loader.h sim.h syscall.h mpsyscall.hmemory.o: misc.h ss.h ss.def loader.h memory.h endian.h options.h stats.hmemory.o: eval.h regs.hregs.o: misc.h ss.h ss.def loader.h memory.h endian.h options.h stats.hregs.o: eval.h regs.hloader.o: ecoff.h misc.h ss.h ss.def regs.h memory.h endian.h options.hloader.o: stats.h eval.h sim.h loader.hsymbol.o: ecoff.h misc.h loader.h ss.h ss.def memory.h endian.h options.hsymbol.o: stats.h eval.h symbol.heval.o: misc.h eval.hoptions.o: misc.h options.hrange.o: misc.h ss.h ss.def symbol.h loader.h memory.h endian.h options.hrange.o: stats.h eval.h range.hstats.o: misc.h eval.h stats.hss.o: misc.h ss.h ss.defendian.o: loader.h ss.h ss.def memory.h endian.h options.h stats.h eval.hmisc.o: misc.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -