do reboot more flexibly
[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#
4e64d26b 6# @(#)Makefile 5.6 (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
9f9d2463 16MACHINE = unknown
0022c355 17AOUT = tdbx
17b4042d 18DESTDIR =
0022c355
ML
19DEST = /usr/ucb/dbx
20
7666df26
JB
21# Install the mail address of the person maintaining dbx below
22# as -DMAINTAINER. A null string disables gripes.
23
0022c355 24CC = cc
7666df26 25CFLAGS = '-DMAINTAINER=""' -O
0022c355
ML
26
27LD = cc
7666df26 28LDFLAGS =
0022c355
ML
29LIBRARIES =
30
31# LD = /bin/oldld
32# LDFLAGS = -X /lib/crt0.o
33# LIBRARIES = -lg -lc
34
35OBJ = \
36 y.tab.o \
37 asm.o \
38 events.o \
39 c.o \
40 cerror.o \
41 check.o \
42 coredump.o \
43 debug.o \
44 eval.o \
45 fortran.o \
46 keywords.o \
47 languages.o \
48 library.o \
49 lists.o \
50 machine.o \
51 main.o \
52 mappings.o \
53 modula-2.o \
54 names.o \
55 object.o \
56 operators.o \
57 pascal.o \
58 printsym.o \
59 process.o \
60 runtime.o \
61 scanner.o \
62 source.o \
63 stabstring.o \
64 symbols.o \
65 tree.o \
66 ops.o
67
68HDR = \
69 asm.h \
70 events.h \
71 c.h \
72 check.h \
73 coredump.h \
74 debug.h \
75 eval.h \
76 fortran.h \
77 keywords.h \
78 languages.h \
79 lists.h \
80 machine.h \
81 main.h \
82 mappings.h \
83 modula-2.h \
84 names.h \
85 object.h \
86 operators.h \
87 pascal.h \
88 printsym.h \
89 process.h \
90 runtime.h \
91 scanner.h \
92 source.h \
93 stabstring.h \
94 symbols.h \
95 tree.h \
96 ops.h
97
98SRC = \
99 defs.h \
100 commands.y \
101 asm.c \
102 events.c \
103 c.c \
fb427eb7 104 cerror.${MACHINE}.s \
0022c355
ML
105 check.c \
106 coredump.c \
107 debug.c \
108 eval.c \
109 fortran.c \
110 keywords.c \
111 languages.c \
112 library.c \
113 lists.c \
0022c355
ML
114 main.c \
115 mappings.c \
116 modula-2.c \
117 names.c \
118 object.c \
119 operators.c \
120 pascal.c \
121 printsym.c \
122 process.c \
0022c355
ML
123 scanner.c \
124 source.c \
125 stabstring.c \
126 symbols.c \
127 tree.c \
fb427eb7
SL
128 ${MACHINE}.c \
129 runtime.${MACHINE}.c \
130 ops.${MACHINE}.c
0022c355 131
723343f2 132.c.o:
0022c355
ML
133 @echo "compiling $*.c"
134 @${CC} ${CFLAGS} -c $*.c
723343f2
SL
135
136.s.o:
0022c355
ML
137 @echo "assembling $*.s"
138 @${CC} -c $*.s
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
7666df26 177 ${CC} -O makedefs.c library.o cerror.o -o makedefs
723343f2 178
1c39daec 179mkdate: mkdate.c
7666df26 180 ${CC} -O mkdate.c -o mkdate
1c39daec 181
723343f2
SL
182print:
183 @echo "don't print it, it's too long"
184
185#
186# Don't worry about the removal of header files, they're created from
187# the source files.
188#
0022c355 189
723343f2 190clean:
0022c355 191 rm -f ${HDR} ${OBJ} y.tab.c y.tab.h ${AOUT} mkdate mkdate.o \
fb427eb7 192 makedefs makedefs.o date.c core mon.out prof.out make.out \
47ef7b77 193 cerror.s ops.c machine.c runtime.c
0022c355
ML
194
195cleandefs:
196 rm -f ${HDR} y.tab.h
723343f2 197
2fd0f574
SL
198testinstall: ${AOUT} test install
199
200test:
201 @chdir tests; make
202
203install: ${AOUT}
17b4042d 204 install -s ${AOUT} ${DESTDIR}/${DEST}
723343f2 205
0022c355
ML
206#
207# Create a tar file called "tape" containing relevant files.
208#
209
210TAPE = tape
211
212tape:
213 @tar cf ${TAPE} \
214 Makefile History version READ_ME ${SRC} \
215 makedefs.c mkdate.c tests pchanges ptests
c64c6a16 216
723343f2
SL
217#
218# Header dependencies are purposely incomplete since header files
219# are "written" every time the accompanying source file changes even if
220# the resulting contents of the header don't change. The alternative is
221# to force a "makedefs" to be invoked for every header file each time dbx
222# is made.
223#
224# Also, there should be a dependency of scanner.o and keywords.o on y.tab.h
225# but misfortunately silly make does a "makedefs y.tab.c y.tab.h" which
226# destroys y.tab.h.
227#
0022c355 228
723343f2 229symbols.o tree.o check.o eval.o events.o: operators.h