Add copyright
[unix-history] / usr / src / usr.bin / pascal / pdx / Makefile
CommitLineData
7f76fc89
KM
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.
b130d2a8 4#
7f76fc89 5# @(#)Makefile 1.14 (Berkeley) %G%
b130d2a8
ML
6#
7# make file for pdx
8#
839217eb
ML
9# For best results edit this file in vi with tabstop=4.
10#
b130d2a8
ML
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#
0e937cd7
ML
15# The file "library.c" contains routines which are generally useful
16# and are independent from pdx.
b130d2a8 17#
0e937cd7 18# N.B.: My version of cerror in "cerror.s" automatically catches certain errors
b130d2a8
ML
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#
c9aaddc5 22# Also, this makefile contains almost NO HEADER DEPENDENCIES. So
b130d2a8
ML
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
ce6f4703 27DESTDIR =
1eb4d9f9 28HOME = /usr/src/ucb/pdx
0e937cd7 29LIB = library.o cerror.o
ef31bdc1 30SRCDIR = ../src/
ce6f4703 31INSTALL = ${DESTDIR}/usr/ucb/pdx
b130d2a8 32
eb5844bd 33RM = /bin/rm -f
ef31bdc1 34CFLAGS = -Disvaxpx -I.. -I../${SRCDIR} -DOBJ -DADDR32 -O
0e937cd7 35LDFLAGS = # -i for pdp-11
b130d2a8 36
b130d2a8
ML
37.c.o:
38 @echo "compiling $*.c"
b45c3677
ML
39 @csh -f -c ' \
40 set a=$*.c; \
41 if ($$a:h != $$a) chdir $$a:h; \
42 ${CC} ${CFLAGS} -c $$a:t \
43 '
b130d2a8 44
0e937cd7
ML
45.s.o:
46 @echo "assembling $*.s"
47 @cc -c $*.s
48
b130d2a8
ML
49#
50# source directory specifications
51#
52
53MAIN = main/
54SYMTAB = symtab/
55SOURCE = source/
56COMMAND = command/
57TREE = tree/
0e937cd7 58SYM = sym/
b130d2a8
ML
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
0e937cd7 152a.out: ${OBJS} ${LIB}
b130d2a8
ML
153 @echo "linking"
154 @cc ${LDFLAGS} ${OBJS} ${LIB}
155
156profile: ${OBJS}
157 @echo "linking with -p"
158 @cc ${LDFLAGS} -p ${OBJS} ${LIB}
159
b130d2a8
ML
160${COMMAND}y.tab.o: ${COMMAND}grammar.yacc
161 chdir ${COMMAND}; yacc -d grammar.yacc; cc -c ${CFLAGS} y.tab.c
eb5844bd 162 ${RM} ${COMMAND}y.tab.c
b130d2a8 163
839217eb
ML
164${COMMAND}lex.yy.o: ${COMMAND}token.lex ${COMMAND}y.tab.h
165 chdir ${COMMAND}; lex token.lex; cc -c ${CFLAGS} lex.yy.c
eb5844bd 166 ${RM} ${COMMAND}lex.yy.c
839217eb 167
b130d2a8
ML
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
ef31bdc1 174${OBJECT}readobj.o ${OBJECT}readsym.o: ${SRCDIR}objfmt.h
b130d2a8 175
754042a4 176install: a.out
839217eb 177 mv a.out ${INSTALL}
754042a4
ML
178
179clean:
eb5844bd 180 ${RM} a.out */*.o
754042a4
ML
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:
844b1e5f 188 pr *.h [a-z]*/*.{h,rep,yacc,lex,c}