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

📄 makefile.cygwin

📁 用汇编语言编程源代码
💻 CYGWIN
字号:
## SPIM S20 MIPS Simulator.# Makefile for SPIM.# Compiles under the Cygwin tools running on Windows.## Copyright (C) 1990-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## Cannot make xpsim under windows.  Use PCSpim instead.#### To verify spim works, type:##   make test### The following parameters must be set for the target machine:### 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 = /usr/unsup/man# Full path for the trap handler file:TRAP_PATH = \"$(TRAP_DIR)/trap.handler\"# If you have flex, use it instead of lex.  If you use flex, define this# variable and set LEXFLAGS.MYLEX = 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:#MYLEX = 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#DEFINES = $(ENDIAN) $(MEM_SIZES) -DDEFAULT_TRAP_HANDLER=$(TRAP_PATH) -DSPIM_VERSION="\"`cat VERSION`\""CC = gccCFLAGS = $(DEFINES) -gIFLAGS = -I$(X_INCLUDE_DIR)YFLAGS = -dYCFLAGS =LDFLAGS = -lmXLDFLAGS = -L$(TOPDIR)/lib -lXaw -lXmu -lXt -lXext -lX11CSH = bash# lex.yy.c is usually compiled with -O to speed it up.LEXCFLAGS = -OOBJS = 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.oENDIAN=`cat configuration`spim.exe:   force	@touch .spim-made	make -f Makefile.cygwin spim2.exespim2.exe:	$(OBJS) spim.o	$(CC) -g $(OBJS) spim.o $(LDFLAGS) -o spim -lmforce:	configurationconfiguration:	Configure### Test spim with a torture test:#test:	spim.exe	/bin/rm -f Tests/tt.out std_out new_out	@echo	$(CSH) -c "./spim.exe -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 -w 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; do 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.exe -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 -w 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: spim.exe	$(CSH) -c "./spim.exe -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 -w std_out new_out	@echo	@echo	/bin/rm -f Tests/tt.out std_out new_out	$(CSH) -c "./spim.exe -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 -w 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 *.exe spim  *.o y.output core a.out TAGS \	  .spim-made  \	  spim.tar.* spim.aux spim.log spim.dvi spim.shar*install: spim	install -c -s  spim $(BIN_DIR)	install -c -m 0444 trap.handler $(TRAP_DIR)	install -c -m 0444 spim.man $(MAN_DIR)very-clean: clean	rm -f y.tab.h y.tab.c lex.yy.c spim.tar* Documentation/spim.psSRC = spim-utils.c run.c mem.c inst.c data.c sym-tbl.c y.tab.o lex.yy.o \      mips-syscall.c## Dependences not handled well by makedepend:#y.tab.h: y.tab.cy.tab.c: parser.y	bison $(YFLAGS) parser.yy.tab.o: y.tab.c	$(CC) $(IFLAGS) $(CFLAGS) $(YCFLAGS) -c y.tab.clex.yy.c: scanner.l	$(MYLEX) $(LEXFLAGS) scanner.llex.yy.o: lex.yy.c	$(CC) $(IFLAGS) $(LEXCFLAGS) -c lex.yy.c## DO NOT DELETE THIS LINE -- make depend depends on it.data.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.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 + -