date and time created 83/03/09 16:23:11 by ralph
[unix-history] / usr / src / old / dbx / Makefile
CommitLineData
5eba90cc 1# @(#)Makefile 4.2 (Berkeley) %G%
723343f2
SL
2#
3# make file for debugger "dbx"
4#
5# The file "defs.h" is included by all.
6#
7# N.B.:
8# My version of cerror automatically catches certain errors
9# such as out of memory, I/O error. If you re-make this with
10# the standard cerror, the program could fault unexpectedly.
11#
12
13.SUFFIXES:
14.SUFFIXES: .h .c .s .o
15
16AOUT = tdbx
5eba90cc
ML
17DESTDIR =
18DEST = ${DESTDIR}/usr/ucb/dbx
723343f2
SL
19
20LIBRARIES =
21
22CC = cc
23CFLAGS = # -g
5eba90cc 24LDFLAGS = -g
723343f2
SL
25
26OBJ = \
27 y.tab.o \
28 asm.o \
29 events.o \
30 c.o \
31 cerror.o \
32 check.o \
33 coredump.o \
34 eval.o \
35 keywords.o \
36 languages.o \
37 library.o \
38 lists.o \
39 machine.o \
40 main.o \
41 mappings.o \
42 names.o \
43 object.o \
44 operators.o \
45 pascal.o \
46 printsym.o \
47 process.o \
48 runtime.o \
49 scanner.o \
50 source.o \
51 symbols.o \
52 tree.o \
53 ops.o
54
55HDR = \
56 asm.h \
57 events.h \
58 c.h \
59 check.h \
60 coredump.h \
61 eval.h \
62 keywords.h \
63 languages.h \
64 lists.h \
65 machine.h \
66 main.h \
67 mappings.h \
68 names.h \
69 object.h \
70 operators.h \
71 pascal.h \
72 printsym.h \
73 process.h \
74 runtime.h \
75 source.h \
76 scanner.h \
77 symbols.h \
78 tree.h \
79 ops.h
80
81.c.o:
82 @echo "compiling $*.c"
83 @${CC} ${CFLAGS} -c $*.c
84
85.s.o:
86 @echo "assembling $*.s"
87 @${CC} -c $*.s
88
89.c.h:
90 ./makedefs -f $*.c $*.h
91
92${AOUT}: makedefs ${HDR} ${OBJ}
93 @echo "linking"
94 @${CC} ${LDFLAGS} ${OBJ} ${LIBRARIES} -o ${AOUT}
95
96profile: ${HDR} ${OBJ}
97 @echo "linking with -p"
98 @${CC} ${LDFLAGS} -p ${OBJ} ${LIBRARIES} -o ${AOUT}
99
100y.tab.c: commands.y
101 yacc -d commands.y
102
103makedefs: makedefs.c library.o cerror.o
104 ${CC} makedefs.c library.o cerror.o -o makedefs
105
106print:
107 @echo "don't print it, it's too long"
108
109#
110# Don't worry about the removal of header files, they're created from
111# the source files.
112#
113
114clean:
115 rm -f ${HDR} ${OBJ} y.tab.c y.tab.h ${AOUT} core
116
117install:
5eba90cc 118 install -s ${AOUT} ${DEST}
723343f2
SL
119
120#
121# Header dependencies are purposely incomplete since header files
122# are "written" every time the accompanying source file changes even if
123# the resulting contents of the header don't change. The alternative is
124# to force a "makedefs" to be invoked for every header file each time dbx
125# is made.
126#
127# Also, there should be a dependency of scanner.o and keywords.o on y.tab.h
128# but misfortunately silly make does a "makedefs y.tab.c y.tab.h" which
129# destroys y.tab.h.
130#
131
132symbols.o tree.o check.o eval.o events.o: operators.h