1# Copyright (c) 1982 Regents of the University of California. 2# All rights reserved. The Berkeley software License Agreement 3# specifies the terms and conditions for redistribution. 4# 5# @(#)Makefile 1.14 (Berkeley) 06/07/85 6# 7# make file for pdx 8# 9# For best results edit this file in vi with tabstop=4. 10# 11# The file "defs.h" is included by all, it has most of the type 12# declarations (since you can't have forward type references in C). 13# It also defines various things of general use and includes <stdio.h>. 14# 15# The file "library.c" contains routines which are generally useful 16# and are independent from pdx. 17# 18# N.B.: My version of cerror in "cerror.s" automatically catches certain errors 19# such as out of memory, I/O error. If you re-make pdx with 20# the standard cerror, the program could fault unexpectedly. 21# 22# Also, this makefile contains almost NO HEADER DEPENDENCIES. So 23# if you modify a header file in a non-trivial way, you need 24# to touch the C files that include it. 25# 26 27DESTDIR = 28HOME = /usr/src/ucb/pdx 29LIB = library.o cerror.o 30SRCDIR = ../src/ 31INSTALL = ${DESTDIR}/usr/ucb/pdx 32 33RM = /bin/rm -f 34CFLAGS = -Disvaxpx -I.. -I../${SRCDIR} -DOBJ -DADDR32 -O 35LDFLAGS = # -i for pdp-11 36 37.c.o: 38 @echo "compiling $*.c" 39 @csh -f -c ' \ 40 set a=$*.c; \ 41 if ($$a:h != $$a) chdir $$a:h; \ 42 ${CC} ${CFLAGS} -c $$a:t \ 43 ' 44 45.s.o: 46 @echo "assembling $*.s" 47 @cc -c $*.s 48 49# 50# source directory specifications 51# 52 53MAIN = main/ 54SYMTAB = symtab/ 55SOURCE = source/ 56COMMAND = command/ 57TREE = tree/ 58SYM = sym/ 59BREAKPOINT = breakpoint/ 60RUNTIME = runtime/ 61OBJECT = object/ 62MAPPINGS = mappings/ 63PROCESS = process/ 64MACHINE = machine/ 65 66BPOBJ =\ 67 ${BREAKPOINT}bp.o\ 68 ${BREAKPOINT}bpact.o\ 69 ${BREAKPOINT}fixbps.o\ 70 ${BREAKPOINT}status.o\ 71 ${BREAKPOINT}printnews.o\ 72 ${BREAKPOINT}setbps.o\ 73 ${BREAKPOINT}trinfo.o\ 74 ${BREAKPOINT}trcond.o 75 76OBJOBJ =\ 77 ${OBJECT}readobj.o\ 78 ${OBJECT}readsym.o\ 79 ${OBJECT}maketypes.o 80 81MAPOBJ =\ 82 ${MAPPINGS}functab.o\ 83 ${MAPPINGS}objaddr.o\ 84 ${MAPPINGS}srcfile.o\ 85 ${MAPPINGS}srcline.o 86 87CMDOBJ =\ 88 ${COMMAND}y.tab.o\ 89 ${COMMAND}lex.yy.o\ 90 ${COMMAND}remake.o 91 92RUNTIMEOBJ =\ 93 ${RUNTIME}frame.o\ 94 ${RUNTIME}wheredump.o\ 95 ${RUNTIME}isactive.o\ 96 ${RUNTIME}address.o\ 97 ${RUNTIME}callproc.o\ 98 ${RUNTIME}entry.o 99 100MACHOBJ =\ 101 ${MACHINE}nextaddr.o\ 102 ${MACHINE}setbp.o\ 103 ${MACHINE}optab.o\ 104 ${MACHINE}printdata.o\ 105 ${MACHINE}printerror.o\ 106 ${MACHINE}printinst.o\ 107 ${MACHINE}pxerrors.o 108 109PROCOBJ =\ 110 ${PROCESS}runcont.o\ 111 ${PROCESS}pstatus.o\ 112 ${PROCESS}rdwr.o\ 113 ${PROCESS}resume.o\ 114 ${PROCESS}start.o\ 115 ${PROCESS}step.o\ 116 ${PROCESS}ptrace.o 117 118SYMOBJ =\ 119 ${SYM}predicates.o\ 120 ${SYM}attributes.o\ 121 ${SYM}printdecl.o\ 122 ${SYM}which.o\ 123 ${SYM}print.o\ 124 ${SYM}printval.o\ 125 ${SYM}tree.o 126 127TREEOBJ =\ 128 ${TREE}build.o\ 129 ${TREE}eval.o\ 130 ${TREE}opinfo.o\ 131 ${TREE}prtree.o\ 132 ${TREE}tfree.o\ 133 ${TREE}tr_equal.o\ 134 ${TREE}tracestop.o\ 135 ${TREE}misc.o\ 136 ${TREE}assign.o 137 138OBJS =\ 139 ${MAIN}main.o\ 140 ${SYMTAB}symtab.o\ 141 ${SOURCE}source.o\ 142 ${CMDOBJ}\ 143 ${TREEOBJ}\ 144 ${SYMOBJ}\ 145 ${BPOBJ}\ 146 ${RUNTIMEOBJ}\ 147 ${OBJOBJ}\ 148 ${MAPOBJ}\ 149 ${PROCOBJ}\ 150 ${MACHOBJ} 151 152a.out: ${OBJS} ${LIB} 153 @echo "linking" 154 @cc ${LDFLAGS} ${OBJS} ${LIB} 155 156profile: ${OBJS} 157 @echo "linking with -p" 158 @cc ${LDFLAGS} -p ${OBJS} ${LIB} 159 160${COMMAND}y.tab.o: ${COMMAND}grammar.yacc 161 chdir ${COMMAND}; yacc -d grammar.yacc; cc -c ${CFLAGS} y.tab.c 162 ${RM} ${COMMAND}y.tab.c 163 164${COMMAND}lex.yy.o: ${COMMAND}token.lex ${COMMAND}y.tab.h 165 chdir ${COMMAND}; lex token.lex; cc -c ${CFLAGS} lex.yy.c 166 ${RM} ${COMMAND}lex.yy.c 167 168${BPOBJ}: ${BREAKPOINT}bp.rep 169${RUNTIMEOBJ}: ${RUNTIME}frame.rep 170${PROCOBJ}: ${PROCESS}process.rep 171${SYMOBJ}: ${SYM}sym.rep 172${TREEOBJ}: ${TREE}tree.rep 173${OBJOBJ}: ${OBJECT}objsym.rep 174${OBJECT}readobj.o ${OBJECT}readsym.o: ${SRCDIR}objfmt.h 175 176install: a.out 177 mv a.out ${INSTALL} 178 179clean: 180 ${RM} a.out */*.o 181 182# 183# Warning: This will produce a very long listing. You would be better 184# off just looking at things on-line. 185# 186 187print: 188 pr *.h [a-z]*/*.{h,rep,yacc,lex,c} 189