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