date and time created 88/03/30 15:58:41 by bostic
[unix-history] / usr / src / old / dbx / Makefile
CommitLineData
2a24676e
DF
1#
2# Copyright (c) 1983 Regents of the University of California.
3# All rights reserved. The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
adbf81b2 6# @(#)Makefile 5.11 (Berkeley) %G%
723343f2
SL
7#
8# make file for debugger "dbx"
9#
10# The file "defs.h" is included by all.
11#
723343f2
SL
12
13.SUFFIXES:
14.SUFFIXES: .h .c .s .o
15
0022c355 16AOUT = tdbx
17b4042d 17DESTDIR =
0022c355
ML
18DEST = /usr/ucb/dbx
19
20CC = cc
adbf81b2
DS
21AS = as
22#
23# if you want gripes
24# CFLAGS = -g '-DMAINTAINER="linton@shasta.stanford.edu"'
25#
26CFLAGS = -O # -g
0022c355
ML
27
28LD = cc
adbf81b2
DS
29LDFLAGS = # -g
30LIBRARIES = # -lPW for IRIS (System V)
0022c355
ML
31
32OBJ = \
33 y.tab.o \
34 asm.o \
35 events.o \
36 c.o \
37 cerror.o \
38 check.o \
39 coredump.o \
40 debug.o \
41 eval.o \
42 fortran.o \
43 keywords.o \
44 languages.o \
45 library.o \
46 lists.o \
47 machine.o \
48 main.o \
49 mappings.o \
50 modula-2.o \
51 names.o \
52 object.o \
53 operators.o \
54 pascal.o \
55 printsym.o \
56 process.o \
57 runtime.o \
58 scanner.o \
59 source.o \
60 stabstring.o \
61 symbols.o \
62 tree.o \
63 ops.o
64
65HDR = \
66 asm.h \
67 events.h \
68 c.h \
69 check.h \
70 coredump.h \
71 debug.h \
72 eval.h \
73 fortran.h \
74 keywords.h \
75 languages.h \
76 lists.h \
77 machine.h \
78 main.h \
79 mappings.h \
80 modula-2.h \
81 names.h \
82 object.h \
83 operators.h \
84 pascal.h \
85 printsym.h \
86 process.h \
87 runtime.h \
88 scanner.h \
89 source.h \
90 stabstring.h \
91 symbols.h \
92 tree.h \
93 ops.h
94
95SRC = \
96 defs.h \
97 commands.y \
98 asm.c \
99 events.c \
100 c.c \
fb427eb7 101 cerror.${MACHINE}.s \
0022c355
ML
102 check.c \
103 coredump.c \
104 debug.c \
105 eval.c \
106 fortran.c \
107 keywords.c \
108 languages.c \
109 library.c \
110 lists.c \
0022c355
ML
111 main.c \
112 mappings.c \
113 modula-2.c \
114 names.c \
115 object.c \
116 operators.c \
117 pascal.c \
118 printsym.c \
119 process.c \
0022c355
ML
120 scanner.c \
121 source.c \
122 stabstring.c \
123 symbols.c \
124 tree.c \
fb427eb7
SL
125 ${MACHINE}.c \
126 runtime.${MACHINE}.c \
127 ops.${MACHINE}.c
0022c355 128
723343f2 129.c.o:
0022c355
ML
130 @echo "compiling $*.c"
131 @${CC} ${CFLAGS} -c $*.c
723343f2
SL
132
133.s.o:
0022c355 134 @echo "assembling $*.s"
adbf81b2
DS
135 @rm -f tmp
136 @/lib/cpp $*.s | grep -v "^#" > tmp
137 @${AS} -o $*.o tmp
138 @rm -f tmp
723343f2
SL
139
140.c.h:
0022c355 141 ./makedefs -f $*.c $*.h
723343f2 142
0022c355 143${AOUT}: makedefs mkdate ${HDR} ${OBJ}
1c39daec
ML
144 @rm -f date.c
145 @./mkdate > date.c
723343f2 146 @echo "linking"
0022c355
ML
147 @${CC} ${CFLAGS} -c date.c
148 @${LD} ${LDFLAGS} date.o ${OBJ} ${LIBRARIES} -o ${AOUT}
723343f2 149
0022c355 150profile: ${HDR} ${OBJ}
1c39daec
ML
151 @rm -f date.c
152 @./mkdate > date.c
723343f2 153 @echo "linking with -p"
0022c355 154 @${CC} ${LDFLAGS} -p date.c ${OBJ} ${LIBRARIES} -o ${AOUT}
723343f2
SL
155
156y.tab.c: commands.y
2fd0f574 157 @echo "expect 2 shift/reduce conflicts"
0022c355 158 yacc -d commands.y
723343f2 159
fb427eb7
SL
160cerror.s: cerror.${MACHINE}.s
161 @rm -f cerror.s
162 @ln -s cerror.${MACHINE}.s cerror.s
163
164machine.c: ${MACHINE}.c
165 @rm -f machine.c
166 @ln -s ${MACHINE}.c machine.c
167
168ops.c: ops.${MACHINE}.c
169 @rm -f ops.c
170 @ln -s ops.${MACHINE}.c ops.c
171
172runtime.c: runtime.${MACHINE}.c
173 @rm -f runtime.c
174 @ln -s runtime.${MACHINE}.c runtime.c
175
723343f2 176makedefs: makedefs.c library.o cerror.o
adbf81b2 177 ${CC} -g makedefs.c library.o cerror.o -o makedefs
723343f2 178
1c39daec 179mkdate: mkdate.c
adbf81b2 180 ${CC} -g ${CFLAGS} mkdate.c -o mkdate
1c39daec 181
723343f2
SL
182print:
183 @echo "don't print it, it's too long"
184
300a5f74
KB
185depend:
186
723343f2
SL
187#
188# Don't worry about the removal of header files, they're created from
189# the source files.
190#
0022c355 191
723343f2 192clean:
0022c355 193 rm -f ${HDR} ${OBJ} y.tab.c y.tab.h ${AOUT} mkdate mkdate.o \
fb427eb7 194 makedefs makedefs.o date.c core mon.out prof.out make.out \
8d27e971 195 cerror.s ops.c machine.c runtime.c date.o
9489dbbe 196 @chdir tests; make clean
0022c355
ML
197
198cleandefs:
199 rm -f ${HDR} y.tab.h
723343f2 200
2fd0f574
SL
201testinstall: ${AOUT} test install
202
203test:
adbf81b2 204 @cd tests; make
2fd0f574
SL
205
206install: ${AOUT}
adbf81b2 207 install -s ${AOUT} ${DESTDIR}${DEST}
723343f2 208
0022c355
ML
209#
210# Create a tar file called "tape" containing relevant files.
211#
212
adbf81b2 213TAPE = f tape
0022c355
ML
214
215tape:
adbf81b2
DS
216 @tar c${TAPE} Makefile History READ_ME ${SRC} \
217 makedefs.c mkdate.c tests pc0mods dbx.1 newdbx.1 dbxstab.5
218
219#
220# without tests subdirectory
221#
222srconlytape:
223 @tar c${TAPE} Makefile History READ_ME ${SRC} \
224 makedefs.c mkdate.c dbx.1 newdbx.1 dbxstab.5
c64c6a16 225
723343f2
SL
226#
227# Header dependencies are purposely incomplete since header files
228# are "written" every time the accompanying source file changes even if
229# the resulting contents of the header don't change. The alternative is
230# to force a "makedefs" to be invoked for every header file each time dbx
231# is made.
232#
233# Also, there should be a dependency of scanner.o and keywords.o on y.tab.h
234# but misfortunately silly make does a "makedefs y.tab.c y.tab.h" which
235# destroys y.tab.h.
236#
0022c355 237
723343f2 238symbols.o tree.o check.o eval.o events.o: operators.h