xref: /original-bsd/old/dbx/Makefile (revision 92d3de31)
1#	@(#)Makefile	4.3 (Berkeley) 03/31/83
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
17DESTDIR =
18DEST	= ${DESTDIR}/usr/ucb/dbx
19
20LIBRARIES =
21
22CC	= cc
23CFLAGS	= # -g
24LDFLAGS	= -g
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 mkdate ${HDR} ${OBJ}
93	@rm -f date.c
94	@./mkdate > date.c
95	@echo "linking"
96	@${CC} ${LDFLAGS} date.c ${OBJ} ${LIBRARIES} -o ${AOUT}
97
98profile: ${HDR} ${OBJ}
99	@rm -f date.c
100	@./mkdate > date.c
101	@echo "linking with -p"
102	@${CC} ${LDFLAGS} -p date.c ${OBJ} ${LIBRARIES} -o ${AOUT}
103
104y.tab.c: commands.y
105	yacc -d commands.y
106
107makedefs: makedefs.c library.o cerror.o
108	${CC} makedefs.c library.o cerror.o -o makedefs
109
110mkdate: mkdate.c
111	${CC} mkdate.c -o mkdate
112
113print:
114	@echo "don't print it, it's too long"
115
116#
117# Don't worry about the removal of header files, they're created from
118# the source files.
119#
120
121clean:
122	rm -f ${HDR} ${OBJ} y.tab.c y.tab.h ${AOUT} core
123
124install:
125	install -s ${AOUT} ${DEST}
126
127#
128# Header dependencies are purposely incomplete since header files
129# are "written" every time the accompanying source file changes even if
130# the resulting contents of the header don't change.  The alternative is
131# to force a "makedefs" to be invoked for every header file each time dbx
132# is made.
133#
134# Also, there should be a dependency of scanner.o and keywords.o on y.tab.h
135# but misfortunately silly make does a "makedefs y.tab.c y.tab.h" which
136# destroys y.tab.h.
137#
138
139symbols.o tree.o check.o eval.o events.o: operators.h
140