add machine-specific code from other files
[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#
acb2acd8 6# @(#)Makefile 5.4 (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 \
103 cerror.s \
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 \
113 machine.c \
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 \
123 runtime.c \
124 scanner.c \
125 source.c \
126 stabstring.c \
127 symbols.c \
128 tree.c \
129 ops.c
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
SL
158
159makedefs: makedefs.c library.o cerror.o
7666df26 160 ${CC} -O makedefs.c library.o cerror.o -o makedefs
723343f2 161
1c39daec 162mkdate: mkdate.c
7666df26 163 ${CC} -O mkdate.c -o mkdate
1c39daec 164
723343f2
SL
165print:
166 @echo "don't print it, it's too long"
167
168#
169# Don't worry about the removal of header files, they're created from
170# the source files.
171#
0022c355 172
723343f2 173clean:
0022c355
ML
174 rm -f ${HDR} ${OBJ} y.tab.c y.tab.h ${AOUT} mkdate mkdate.o \
175 makedefs makedefs.o date.c core mon.out prof.out make.out
176
177cleandefs:
178 rm -f ${HDR} y.tab.h
723343f2 179
2fd0f574
SL
180testinstall: ${AOUT} test install
181
182test:
183 @chdir tests; make
184
185install: ${AOUT}
17b4042d 186 install -s ${AOUT} ${DESTDIR}/${DEST}
723343f2 187
0022c355
ML
188#
189# Create a tar file called "tape" containing relevant files.
190#
191
192TAPE = tape
193
194tape:
195 @tar cf ${TAPE} \
196 Makefile History version READ_ME ${SRC} \
197 makedefs.c mkdate.c tests pchanges ptests
c64c6a16 198
723343f2
SL
199#
200# Header dependencies are purposely incomplete since header files
201# are "written" every time the accompanying source file changes even if
202# the resulting contents of the header don't change. The alternative is
203# to force a "makedefs" to be invoked for every header file each time dbx
204# is made.
205#
206# Also, there should be a dependency of scanner.o and keywords.o on y.tab.h
207# but misfortunately silly make does a "makedefs y.tab.c y.tab.h" which
208# destroys y.tab.h.
209#
0022c355 210
723343f2 211symbols.o tree.o check.o eval.o events.o: operators.h