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