add depend label
[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#
1c615025 5# @(#)Makefile 1.19 (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
35bf0218
KM
34CFLAGS = -I.. -I../${SRCDIR} -DOBJ -DADDR32 -O
35LINTFLAGS= -I. -I${SRCDIR} -DOBJ -DADDR32
0e937cd7 36LDFLAGS = # -i for pdp-11
b130d2a8 37
b130d2a8
ML
38.c.o:
39 @echo "compiling $*.c"
b45c3677
ML
40 @csh -f -c ' \
41 set a=$*.c; \
709e6869 42 if ($$a:h != $$a) cd $$a:h; \
b45c3677
ML
43 ${CC} ${CFLAGS} -c $$a:t \
44 '
b130d2a8
ML
45
46#
47# source directory specifications
48#
49
50MAIN = main/
51SYMTAB = symtab/
52SOURCE = source/
53COMMAND = command/
54TREE = tree/
0e937cd7 55SYM = sym/
b130d2a8
ML
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\
35bf0218 103 ${MACHINE}printinst.o
b130d2a8
ML
104
105PROCOBJ =\
106 ${PROCESS}runcont.o\
107 ${PROCESS}pstatus.o\
108 ${PROCESS}rdwr.o\
109 ${PROCESS}resume.o\
110 ${PROCESS}start.o\
111 ${PROCESS}step.o\
112 ${PROCESS}ptrace.o
113
114SYMOBJ =\
115 ${SYM}predicates.o\
116 ${SYM}attributes.o\
117 ${SYM}printdecl.o\
118 ${SYM}which.o\
119 ${SYM}print.o\
120 ${SYM}printval.o\
121 ${SYM}tree.o
122
123TREEOBJ =\
124 ${TREE}build.o\
125 ${TREE}eval.o\
126 ${TREE}opinfo.o\
127 ${TREE}prtree.o\
128 ${TREE}tfree.o\
129 ${TREE}tr_equal.o\
130 ${TREE}tracestop.o\
131 ${TREE}misc.o\
132 ${TREE}assign.o
133
134OBJS =\
135 ${MAIN}main.o\
136 ${SYMTAB}symtab.o\
137 ${SOURCE}source.o\
138 ${CMDOBJ}\
139 ${TREEOBJ}\
140 ${SYMOBJ}\
141 ${BPOBJ}\
142 ${RUNTIMEOBJ}\
143 ${OBJOBJ}\
144 ${MAPOBJ}\
145 ${PROCOBJ}\
146 ${MACHOBJ}
147
0e937cd7 148a.out: ${OBJS} ${LIB}
b130d2a8
ML
149 @echo "linking"
150 @cc ${LDFLAGS} ${OBJS} ${LIB}
151
152profile: ${OBJS}
153 @echo "linking with -p"
154 @cc ${LDFLAGS} -p ${OBJS} ${LIB}
155
35bf0218
KM
156lint:
157 @cd ${COMMAND}; yacc -d grammar.yacc; lex token.lex
158 -@lint ${LINTFLAGS} `echo ${OBJS} library.c | sed 's/\.o/.c/g'`
159 @${RM} ${COMMAND}lex.yy.c ${COMMAND}y.tab.c
160
161cerror.o:
162 @echo "assembling `machine`/$*.s"
163 @cc -c `machine`/$*.s
164
b130d2a8 165${COMMAND}y.tab.o: ${COMMAND}grammar.yacc
709e6869 166 cd ${COMMAND}; yacc -d grammar.yacc; cc -c ${CFLAGS} y.tab.c
eb5844bd 167 ${RM} ${COMMAND}y.tab.c
b130d2a8 168
839217eb 169${COMMAND}lex.yy.o: ${COMMAND}token.lex ${COMMAND}y.tab.h
709e6869 170 cd ${COMMAND}; lex token.lex; cc -c ${CFLAGS} lex.yy.c
eb5844bd 171 ${RM} ${COMMAND}lex.yy.c
839217eb 172
b130d2a8
ML
173${BPOBJ}: ${BREAKPOINT}bp.rep
174${RUNTIMEOBJ}: ${RUNTIME}frame.rep
175${PROCOBJ}: ${PROCESS}process.rep
176${SYMOBJ}: ${SYM}sym.rep
177${TREEOBJ}: ${TREE}tree.rep
178${OBJOBJ}: ${OBJECT}objsym.rep
ef31bdc1 179${OBJECT}readobj.o ${OBJECT}readsym.o: ${SRCDIR}objfmt.h
b130d2a8 180
754042a4 181install: a.out
ff7744b4 182 install -s a.out ${INSTALL}
754042a4
ML
183
184clean:
3a981d6b 185 ${RM} a.out *.o */*.o
754042a4 186
1c615025
KB
187depend:
188
754042a4
ML
189#
190# Warning: This will produce a very long listing. You would be better
191# off just looking at things on-line.
192#
193
194print:
844b1e5f 195 pr *.h [a-z]*/*.{h,rep,yacc,lex,c}