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

📄 imakefile

📁 用汇编语言编程源代码
💻
字号:
# SPIM S20 MIPS Simulator.# Imakefile for SPIM.## Copyright (C) 1992-2000 by James Larus (larus@cs.wisc.edu).# ALL RIGHTS RESERVED.## SPIM is distributed under the following conditions:##   You may make copies of SPIM for your own use and modify those copies.##   All copies of SPIM must retain my name and copyright notice.##   You may not sell SPIM or distributed SPIM in conjunction with a commerical#   product or service without the expressed written consent of James Larus.## THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR# PURPOSE.## $Header: $## To make spim, type:##   make spim## To make xpsim, type:##   make xspim### To verify spim works, type:##   make test### The following parameters must be set for the target machine on which SPIM# or XSPIM is compiled:## Full path for directory that will hold the trap handler file:TRAP_DIR = .# Full path for the directory that will hold the executable files:BIN_DIR = /usr/unsup/bin# Full path for the directory that will hold the man files:MAN_DIR = /var/unsup/man# If you have flex, use it instead of lex.  If you use flex, define this# variable and set LEXFLAGS.LEX = flex# SPIM needs flex's -I flag since the scanner is used interactively.# You can set the -8 flag so that funny characters do not hang the scanner.LEXFLAGS = -I -8# If you use lex, set the variables this way:#LEX = lex#LEXFLAGS =# Size of the segments when spim starts up (data segment must be >= 64K).# (These sizes are fine for most users since SPIM dynamically expands# the memory as necessary.)MEM_SIZES = -DTEXT_SIZE=65536 -DDATA_SIZE=131072 -DK_TEXT_SIZE=65536## END OF PARAMETERS#BASE_OBJS = spim-utils.o run.o mem.o inst.o data.o sym-tbl.o y.tab.o lex.yy.o mips-syscall.o display-utils.oOBJS = spim.o $(BASE_OBJS)BASE_XOBJS = xspim.o windows.o buttons.oXOBJS = $(BASE_OBJS) $(BASE_XOBJS)TRAP_PATH = \"$(TRAP_DIR)/trap.handler\"ENDIAN=`cat configuration`# lex.yy.c is usually compiled with -O to speed it up.LEXCFLAGS = -OYFLAGS = -dDEPLIBS = XawClientDepLibsLOCALLIBS = XawClientLibsCDEBUGFLAGS = -gDEFINES = $(ENDIAN) $(MEM_SIZES) -DDEFAULT_TRAP_HANDLER=$(TRAP_PATH) -DSPIM_VERSION="\"`cat VERSION`\""SYS_LIBRARIES = -lm# Use csh, tcsh, or bash, but not sh:CSH = csh###  Program dependencies:#AllTarget(spim)spim:	force	@touch .spim-made	@make spim_sub	mv spim_sub spimxspim:	force	@touch .spim-made	@make xspim_sub	mv xspim_sub xspimforce:  configurationconfiguration:	ConfigureNormalProgramTarget(spim_sub,$(OBJS),,,)NormalProgramTarget(xspim_sub,$(XOBJS),$(DEPLIBS),$(LOCALLIBS),$(SYSLIBS))InstallProgram(spim,$(BIN_DIR))InstallProgram(xspim,$(BIN_DIR))InstallManPage(spim,$(MAN_DIR))InstallManPage(xspim,$(MAN_DIR))InstallNonExec(trap.handler,$(TRAP_DIR))y.tab.h: y.tab.cy.tab.c: parser.y	$(YACC) $(YFLAGS) parser.yy.tab.o: y.tab.c	$(CC) $(IFLAGS) $(CFLAGS) $(YCFLAGS) -c y.tab.clex.yy.o:	scanner.llex.yy.c:	scanner.l	$(LEX) $(LEXFLAGS) scanner.llex.yy.o: lex.yy.c	$(CC) $(IFLAGS) $(CFLAGS) $(LEXCFLAGS) -c lex.yy.c### Test spim with a torture test:#test:	spim	/bin/rm -f Tests/tt.out std_out new_out	@echo	$(CSH) -c "./spim -bare -notrap -file Tests/tt.bare.s >& Tests/tt.out"	tail +6 Tests/tt.bare.OK > std_out	tail +6 Tests/tt.out > new_out	@echo The next command should not produce any output:	diff std_out new_out	@echo	@echo	/bin/rm -f Tests/tt.out std_out new_out	@if [ ! -f $(TRAP_DIR)/trap.handler ]; then echo "trap_handler not installed. Type: make install"; exit 1; else true; fi	@if diff trap.handler $(TRAP_DIR)/trap.handler > /dev/null ; then true ; else echo "Old trap_handler installed.  Type: make install" ; exit 1; fi	$(CSH) -c "./spim -file Tests/tt.s < Tests/tt.in >& Tests/tt.out"	tail +6 Tests/tt.OK > std_out	tail +6 Tests/tt.out > new_out	@echo The next command should not produce any output:	diff std_out new_out	@echo	@echo	/bin/rm -f Tests/tt.out std_out new_out# This test currently only works for little-endian machines.  The file# tt.alu.bare.s needs to be converted in places for big-endian machines.test_bare:	$(CSH) -c "./spim -bare -notrap -file Tests/tt.alu.bare.s >& Tests/tt.out"	tail +6 Tests/tt.alu.bare.OK > std_out	tail +6 Tests/tt.out > new_out	@echo The next command should not produce any output:	diff std_out new_out	@echo	@echo	/bin/rm -f Tests/tt.out std_out new_out	$(CSH) -c "./spim -bare -notrap -file Tests/tt.fpu.bare.s >& Tests/tt.out"	tail +6 Tests/tt.fpu.bare.OK > std_out	tail +6 Tests/tt.out > new_out	@echo The next command should not produce any output:	diff std_out new_out	@echo	/bin/rm -f Tests/tt.out std_out new_out#TAGS:	*.c *.h *.l *.y	etags *.l *.y *.c *.hclean::	rm -f spim xspim *.o y.output core a.out TAGS \	  .spim-made spim.tar.*very-clean: clean	rm -f y.tab.h y.tab.c lex.yy.c spim.tar* spim.shar* \	Documentation/spim.ps, Documentation/spim.aux Documentation/spim.log \	Documentation/spim.dvi Tests/tt.s Tests/tt.OK configuration#TAR_FILES = Configure BLURB README Imakefile Makefile.std *.c *.h *.y *.l \	    trap.handler Tests/tt.* VERSION Documentation spim.man xspim.manDocumentation/spim.ps: Documentation/spim.tex	cd Documentation; latex spim.tex; latex spim.tex; dvips -D 300 spim.dvi; \	rm -f spim.aux spim.log spim.dvitar:	Documentation/spim.ps	mkdir Hide	mv Tests/tt.s Tests/tt.OK configuration Hide	chmod 644 Imakefile Makefile.std	tar cvf spim.tar $(TAR_FILES)	mv Hide/tt.* Tests	mv Hide/configuration .	rm -fr Hidetar.Z:	tar	compress spim.tarshar:	mv -f y.tab.c y.tab.c.xx	mv -f lex.yy.c lex.yy.c.xx	rm -f spim.shar spim.shar0?	makekit -n spim.shar $(FILES)	mv -f y.tab.c.xx y.tab.c	mv -f lex.yy.c.xx lex.yy.cdepend::	makedepend -w10 *.c## DO NOT DELETE THIS LINE -- make depend depends on it.buttons.o: spim.hbuttons.o: spim-utils.hbuttons.o: xspim.hbuttons.o: inst.hbuttons.o: mem.hbuttons.o: reg.hbuttons.o: scanner.hbuttons.o: sym-tbl.hbuttons.o: buttons.hdata.o: spim.hdata.o: spim-utils.hdata.o: inst.hdata.o: mem.hdata.o: reg.hdata.o: sym-tbl.hdata.o: parser.hdata.o: run.hdata.o: data.hinst.o: spim.hinst.o: spim-utils.hinst.o: inst.hinst.o: mem.hinst.o: reg.hinst.o: sym-tbl.hinst.o: y.tab.hinst.o: parser.hinst.o: scanner.hinst.o: data.hinst.o: op.hlex.yy.o: spim.hlex.yy.o: spim-utils.hlex.yy.o: inst.hlex.yy.o: sym-tbl.hlex.yy.o: y.tab.hlex.yy.o: parser.hlex.yy.o: scanner.hlex.yy.o: op.hmem.o: spim.hmem.o: spim-utils.hmem.o: inst.hmem.o: mem.hmem.o: reg.hmips-syscall.o: spim.hmips-syscall.o: inst.hmips-syscall.o: mem.hmips-syscall.o: reg.hmips-syscall.o: sym-tbl.hmips-syscall.o: spim-syscall.hmips-syscall.o: mips-syscall.hrun.o: spim.hrun.o: spim-utils.hrun.o: inst.hrun.o: mem.hrun.o: reg.hrun.o: sym-tbl.hrun.o: y.tab.hrun.o: mips-syscall.hrun.o: run.hspim-utils.o: spim.hspim-utils.o: spim-utils.hspim-utils.o: inst.hspim-utils.o: data.hspim-utils.o: mem.hspim-utils.o: reg.hspim-utils.o: scanner.hspim-utils.o: parser.hspim-utils.o: y.tab.hspim-utils.o: run.hspim-utils.o: sym-tbl.hspim.o: spim.hspim.o: spim-utils.hspim.o: inst.hspim.o: mem.hspim.o: reg.hspim.o: parser.hspim.o: sym-tbl.hspim.o: scanner.hspim.o: y.tab.hsym-tbl.o: spim.hsym-tbl.o: spim-utils.hsym-tbl.o: inst.hsym-tbl.o: mem.hsym-tbl.o: data.hsym-tbl.o: parser.hsym-tbl.o: sym-tbl.hwindows.o: spim.hwindows.o: spim-utils.hwindows.o: buttons.hwindows.o: xspim.hwindows.o: windows.hxspim.o: spim.hxspim.o: spim-utils.hxspim.o: inst.hxspim.o: mem.hxspim.o: reg.hxspim.o: y.tab.hxspim.o: buttons.hxspim.o: windows.hxspim.o: xspim.hy.tab.o: spim.hy.tab.o: spim-utils.hy.tab.o: inst.hy.tab.o: mem.hy.tab.o: reg.hy.tab.o: sym-tbl.hy.tab.o: data.hy.tab.o: scanner.hy.tab.o: parser.hparser.o: spim.hparser.o: spim-utils.hparser.o: inst.hparser.o: mem.hparser.o: reg.hparser.o: sym-tbl.hparser.o: data.hparser.o: scanner.hparser.o: parser.hscanner.o: spim.hscanner.o: spim-utils.hscanner.o: inst.hscanner.o: sym-tbl.hscanner.o: y.tab.hscanner.o: parser.hscanner.o: scanner.hscanner.o: op.h

⌨️ 快捷键说明

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