date and time created 82/01/18 19:20:54 by linton
[unix-history] / usr / src / usr.bin / pascal / pdx / Makefile
CommitLineData
b130d2a8
ML
1#/* Copyright (c) 1982 Regents of the University of California */
2#
3# static char sccsid[] = "@(#)Makefile 1.1 %G%";
4#
5# make file for pdx
6#
7# The file "defs.h" is included by all, it has most of the type
8# declarations (since you can't have forward type references in C).
9# It also defines various things of general use and includes <stdio.h>.
10#
11# Library files:
12#
13# error.c, erecover.c - error handling
14# pwait.c - wait for a specific process
15# syserr.c, cerror.s - low level error handling
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#
21# Also, this makefile contains NO HEADER DEPENDENCIES. So
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
26HOME = /vb/arpa/linton
27LIB = ${HOME}/lib/libc.a
28INSTALL = ${HOME}/bin/pdx
29
30#
31# LDFLAGS should be -i for pdp-11
32#
33
34CFLAGS = -Disvaxpx -I.. -O
35LDFLAGS =
36
37#
38# Regardless of what CFLAGS is, the file "compile.csh" controls
39# how compilation is done for the majority of the source files.
40#
41
42.c.o:
43 @echo "compiling $*.c"
44 @csh -f compile.csh $*.c
45
46#
47# source directory specifications
48#
49
50MAIN = main/
51SYMTAB = symtab/
52SOURCE = source/
53COMMAND = command/
54TREE = tree/
55SYM = sym/
56BREAKPOINT = breakpoint/
57RUNTIME = runtime/
58OBJECT = object/
59MAPPINGS = mappings/
60PROCESS = process/
61MACHINE = machine/
62
63BPOBJ =\
64 ${BREAKPOINT}bp.o\
65 ${BREAKPOINT}bpact.o\
66 ${BREAKPOINT}fixbps.o\
67 ${BREAKPOINT}status.o\
68 ${BREAKPOINT}printnews.o\
69 ${BREAKPOINT}setbps.o\
70 ${BREAKPOINT}trinfo.o\
71 ${BREAKPOINT}trcond.o
72
73OBJOBJ =\
74 ${OBJECT}readobj.o\
75 ${OBJECT}readsym.o\
76 ${OBJECT}maketypes.o
77
78MAPOBJ =\
79 ${MAPPINGS}functab.o\
80 ${MAPPINGS}objaddr.o\
81 ${MAPPINGS}srcfile.o\
82 ${MAPPINGS}srcline.o
83
84CMDOBJ =\
85 ${COMMAND}y.tab.o\
86 ${COMMAND}lex.yy.o\
87 ${COMMAND}remake.o
88
89RUNTIMEOBJ =\
90 ${RUNTIME}frame.o\
91 ${RUNTIME}wheredump.o\
92 ${RUNTIME}isactive.o\
93 ${RUNTIME}address.o\
94 ${RUNTIME}callproc.o\
95 ${RUNTIME}entry.o
96
97MACHOBJ =\
98 ${MACHINE}nextaddr.o\
99 ${MACHINE}setbp.o\
100 ${MACHINE}optab.o\
101 ${MACHINE}printdata.o\
102 ${MACHINE}printerror.o\
103 ${MACHINE}printinst.o\
104 ${MACHINE}pxerrors.o
105
106PROCOBJ =\
107 ${PROCESS}runcont.o\
108 ${PROCESS}pstatus.o\
109 ${PROCESS}rdwr.o\
110 ${PROCESS}resume.o\
111 ${PROCESS}start.o\
112 ${PROCESS}step.o\
113 ${PROCESS}ptrace.o
114
115SYMOBJ =\
116 ${SYM}predicates.o\
117 ${SYM}attributes.o\
118 ${SYM}printdecl.o\
119 ${SYM}which.o\
120 ${SYM}print.o\
121 ${SYM}printval.o\
122 ${SYM}tree.o
123
124TREEOBJ =\
125 ${TREE}build.o\
126 ${TREE}eval.o\
127 ${TREE}opinfo.o\
128 ${TREE}prtree.o\
129 ${TREE}tfree.o\
130 ${TREE}tr_equal.o\
131 ${TREE}tracestop.o\
132 ${TREE}misc.o\
133 ${TREE}assign.o
134
135OBJS =\
136 ${MAIN}main.o\
137 ${SYMTAB}symtab.o\
138 ${SOURCE}source.o\
139 ${CMDOBJ}\
140 ${TREEOBJ}\
141 ${SYMOBJ}\
142 ${BPOBJ}\
143 ${RUNTIMEOBJ}\
144 ${OBJOBJ}\
145 ${MAPOBJ}\
146 ${PROCOBJ}\
147 ${MACHOBJ}
148
149a.out: ${OBJS}
150 @echo "linking"
151 @cc ${LDFLAGS} ${OBJS} ${LIB}
152
153profile: ${OBJS}
154 @echo "linking with -p"
155 @cc ${LDFLAGS} -p ${OBJS} ${LIB}
156
157${COMMAND}lex.yy.o: ${COMMAND}token.lex ${COMMAND}y.tab.h
158 chdir ${COMMAND}; lex token.lex; cc -c ${CFLAGS} lex.yy.c
159 rm ${COMMAND}lex.yy.c
160
161${COMMAND}y.tab.o: ${COMMAND}grammar.yacc
162 chdir ${COMMAND}; yacc -d grammar.yacc; cc -c ${CFLAGS} y.tab.c
163 rm ${COMMAND}y.tab.c
164
165${BPOBJ}: ${BREAKPOINT}bp.rep
166${RUNTIMEOBJ}: ${RUNTIME}frame.rep
167${PROCOBJ}: ${PROCESS}process.rep
168${SYMOBJ}: ${SYM}sym.rep
169${TREEOBJ}: ${TREE}tree.rep
170${OBJOBJ}: ${OBJECT}objsym.rep
171
172install:
173 cp a.out ${INSTALL}
174 strip ${INSTALL}