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