branch delta of linton changes from net.sources
[unix-history] / usr / src / old / dbx / Makefile
CommitLineData
723343f2
SL
1#
2# make file for debugger "dbx"
3#
4# The file "defs.h" is included by all.
5#
723343f2
SL
6
7.SUFFIXES:
8.SUFFIXES: .h .c .s .o
9
10AOUT = tdbx
2fd0f574 11DEST = /usr/local/bin/dbx
723343f2
SL
12
13LIBRARIES =
14
15CC = cc
4c9eaad8 16CFLAGS = -g
5eba90cc 17LDFLAGS = -g
723343f2
SL
18
19OBJ = \
20 y.tab.o \
21 asm.o \
22 events.o \
23 c.o \
24 cerror.o \
25 check.o \
26 coredump.o \
8b890eea 27 debug.o \
723343f2 28 eval.o \
8b890eea 29 fortran.o \
723343f2
SL
30 keywords.o \
31 languages.o \
32 library.o \
33 lists.o \
34 machine.o \
35 main.o \
36 mappings.o \
2fd0f574 37 modula-2.o \
723343f2
SL
38 names.o \
39 object.o \
40 operators.o \
41 pascal.o \
42 printsym.o \
43 process.o \
2b8f421b 44 re.o \
723343f2
SL
45 runtime.o \
46 scanner.o \
47 source.o \
2fd0f574 48 stabstring.o \
723343f2
SL
49 symbols.o \
50 tree.o \
51 ops.o
52
53HDR = \
54 asm.h \
55 events.h \
56 c.h \
57 check.h \
58 coredump.h \
59 eval.h \
8b890eea 60 fortran.h \
723343f2
SL
61 keywords.h \
62 languages.h \
63 lists.h \
64 machine.h \
65 main.h \
66 mappings.h \
2fd0f574 67 modula-2.h \
723343f2
SL
68 names.h \
69 object.h \
70 operators.h \
71 pascal.h \
72 printsym.h \
73 process.h \
2b8f421b 74 re.h \
723343f2 75 runtime.h \
723343f2 76 scanner.h \
2fd0f574
SL
77 source.h \
78 stabstring.h \
723343f2
SL
79 symbols.h \
80 tree.h \
81 ops.h
82
c64c6a16
ML
83SRC = \
84 defs.h \
85 commands.y \
86 asm.c \
87 events.c \
88 c.c \
89 cerror.s \
90 check.c \
91 coredump.c \
92 debug.c \
93 eval.c \
94 fortran.c \
95 keywords.c \
96 languages.c \
97 library.c \
98 lists.c \
99 machine.c \
100 main.c \
101 mappings.c \
2fd0f574 102 modula-2.c \
c64c6a16
ML
103 names.c \
104 object.c \
105 operators.c \
106 pascal.c \
107 printsym.c \
108 process.c \
2b8f421b 109 re.c \
c64c6a16
ML
110 runtime.c \
111 scanner.c \
112 source.c \
113 symbols.c \
114 tree.c \
115 ops.c
116
723343f2
SL
117.c.o:
118 @echo "compiling $*.c"
119 @${CC} ${CFLAGS} -c $*.c
120
121.s.o:
122 @echo "assembling $*.s"
123 @${CC} -c $*.s
124
125.c.h:
126 ./makedefs -f $*.c $*.h
127
1c39daec
ML
128${AOUT}: makedefs mkdate ${HDR} ${OBJ}
129 @rm -f date.c
130 @./mkdate > date.c
723343f2 131 @echo "linking"
1c39daec 132 @${CC} ${LDFLAGS} date.c ${OBJ} ${LIBRARIES} -o ${AOUT}
723343f2
SL
133
134profile: ${HDR} ${OBJ}
1c39daec
ML
135 @rm -f date.c
136 @./mkdate > date.c
723343f2 137 @echo "linking with -p"
1c39daec 138 @${CC} ${LDFLAGS} -p date.c ${OBJ} ${LIBRARIES} -o ${AOUT}
723343f2
SL
139
140y.tab.c: commands.y
2fd0f574 141 @echo "expect 2 shift/reduce conflicts"
723343f2
SL
142 yacc -d commands.y
143
144makedefs: makedefs.c library.o cerror.o
2fd0f574 145 ${CC} -g makedefs.c library.o cerror.o -o makedefs
723343f2 146
1c39daec 147mkdate: mkdate.c
2fd0f574 148 ${CC} -g mkdate.c -o mkdate
1c39daec 149
723343f2
SL
150print:
151 @echo "don't print it, it's too long"
152
153#
154# Don't worry about the removal of header files, they're created from
155# the source files.
156#
157
158clean:
2fd0f574
SL
159 rm -f ${HDR} ${OBJ} y.tab.c y.tab.h ${AOUT} \
160 mkdate mkdate.o makedefs makedefs.o date.c core mon.out prof.out
723343f2 161
2fd0f574
SL
162testinstall: ${AOUT} test install
163
164test:
165 @chdir tests; make
166
167install: ${AOUT}
513d5497 168 install ${AOUT} ${DEST}
723343f2 169
c64c6a16
ML
170#
171# Create a tar file called "tape" containing relevant files.
172#
173
2fd0f574
SL
174TAPE = tape
175
c64c6a16 176tape:
2fd0f574
SL
177 tar cfv ${TAPE} \
178 Makefile ${SRC} makedefs.c mkdate.c tests/ pchanges ptests
c64c6a16 179
723343f2
SL
180#
181# Header dependencies are purposely incomplete since header files
182# are "written" every time the accompanying source file changes even if
183# the resulting contents of the header don't change. The alternative is
184# to force a "makedefs" to be invoked for every header file each time dbx
185# is made.
186#
187# Also, there should be a dependency of scanner.o and keywords.o on y.tab.h
188# but misfortunately silly make does a "makedefs y.tab.c y.tab.h" which
189# destroys y.tab.h.
190#
191
192symbols.o tree.o check.o eval.o events.o: operators.h