📄 makefile.mips
字号:
# %M% %I% %G% %U% # Copyright (c) 1987, Benjamin G. Zorn## Makefile for MPROF data generation#CC = /bin/cc# mips CFLAGS = -I. -g -DDEBUG# sun4 CFLAGS = -I. -g -Dsun4# sun3,vax CFLAGS = -I. -g# sun4 ASFLAGS = -P -Dsun4# sun3,vax,mips ASFLAGS =CFLAGS = -I. -g -DDEBUGASFLAGS = BIN = .MPLIB = $(BIN)/libc_mp.aLINTFLAGS = -bhx# sun4,mips ASM_SRC = md.s# sun4,mips ASM_OBJ = md.o# vax,sun3 ASM_SRC =# vax,sun3 ASM_SRC =ASM_SRC = md.sASM_OBJ = md.oMPROF_MON_SRCS = leak.c malloc.c mpattach.c mprof_mon.c mpstruct.c $(ASM_SRC)MPROF_MON_OBJS = leak.o malloc.o mpattach.o mprof_mon.o mpstruct.o $(ASM_OBJ)MPROF_SRCS = mprof.c mpstruct.c mpgraph.cMPROF_OBJS = mprof.o mpstruct.o mpgraph.oDOC_SRC = mprof.1DOC_OBJS = mprof.manDISTNAME = mprof30TEST_SRCS = test1.c test2.cTEST_OBJS = test1.o test2.oall: mprof $(MPROF_MON_OBJS) $(DOC_OBJS) $(MPLIB)#mips $(MPLIB): $(MPROF_OBJS)# ar cr libc_mp.a $(MPROF_MON_OBJS)# ranlib libc_mp.a# mips $(MPLIB): $(MPROF_MON_OBJS)# ar cr libc_mp.a $(MPROF_MON_OBJS)# ranlib libc_mp.a# sun3, sun4 LIB_REPLACE = memalign.o# vax LIB_REPLACE = exit.o# mips LIB_REPLACE = LIB_REPLACE = $(MPLIB): $(MPROF_MON_OBJS) ar cr libc_mp.a $(MPROF_MON_OBJS) ranlib libc_mp.atest: $(TEST_OBJS) test1-demo test2-demo mprof-mon-lint: lint $(LINTFLAGS) $(MPROF_MON_SRCS) > mprof.lintmprof-lint: lint $(LINTFLAGS) $(MPROF_SRCS) > mprof.lintclean: rm -f *.o mprof.lint mprof-mon.lint \ $(DOC_OBJS) \ $(TEST_OBJS) \ test1 test1.data test1.mprof \ test2 test2.data test2.mprof \ libc_mp.a mprof mprof.dataleak.o: leak.cmprof_mon.o: mprof_mon.cmpstruct.o: mpstruct.cmpgraph.o: mpgraph.cmprof.o: mprof.cmd.o: md.s $(AS) $(ASFLAGS) -o md.o md.smalloc.o: malloc.c $(CC) $(CFLAGS) -Dmalloc=__malloc__ -Dfree=__free__ -Drealloc=__realloc__ malloc.c -cmprof: $(MPROF_OBJS) $(CC) $(CFLAGS) -o mprof $(MPROF_OBJS)mprof.man: mprof.1 nroff -man mprof.1 > mprof.mandist: MANIFEST tar cvf $(DISTNAME).tar `cat MANIFEST` compress $(DISTNAME).tar## Examples to test if MPROF is installed correctly## A very simple test (tests calloc and valloc)test1-demo: test1.data $(BIN)/mprof -normal test1 test1.data > test1.mproftest1.mprof: test1.data $(BIN)/mprof -normal test1 test1.data > test1.mproftest1.data: test1 test1 cp mprof.data test1.datatest1: test1.o $(MPLIB) $(CC) $(CFLAGS) -o test1 test1.o $(MPLIB)test1.o: test1.c# test2 program (example from paper)test2-demo: test2.data $(BIN)/mprof -normal test2 test2.data > test2.mproftest2.mprof: test2.data $(BIN)/mprof -normal test2 test2.data > test2.mproftest2.data: test2 test2 cp mprof.data test2.datatest2: test2.o $(MPLIB) $(CC) $(CFLAGS) -o test2 test2.o $(MPLIB)test2.o: test2.c###leak.o: /usr/include/stdio.h mprof.h /usr/include/sys/types.h \ /usr/include/frame.hmalloc.o: /usr/include/sys/types.h /usr/include/stdio.hmprof.o: /usr/include/stdio.h /usr/include/sys/file.h /usr/include/ctype.h \ /usr/include/a.out.h /usr/include/sys/exec.h /usr/include/stab.h \ mprof.h /usr/include/sys/types.h /usr/include/frame.hmprof_mon.o: /usr/include/stdio.h /usr/include/sys/file.h mprof.h \ /usr/include/sys/types.h /usr/include/frame.hmpstruct.o: /usr/include/stdio.h mprof.h /usr/include/sys/types.h \ /usr/include/frame.hmpgraph.o: /usr/include/stdio.h mprof.h /usr/include/sys/types.h \ /usr/include/frame.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -