objfmt.h dependency
[unix-history] / usr / src / usr.bin / pascal / pdx / Makefile
CommitLineData
b130d2a8
ML
1#/* Copyright (c) 1982 Regents of the University of California */
2#
c9aaddc5 3# static char sccsid[] = "@(#)Makefile 1.3 %G%";
b130d2a8
ML
4#
5# make file for pdx
6#
839217eb
ML
7# For best results edit this file in vi with tabstop=4.
8#
b130d2a8
ML
9# The file "defs.h" is included by all, it has most of the type
10# declarations (since you can't have forward type references in C).
11# It also defines various things of general use and includes <stdio.h>.
12#
839217eb
ML
13# The subdirectory "library" contains routines which are generally useful
14# and are independent from pdx. These are compiled into a separate archive
15# and they must be made independently from pdx.
b130d2a8
ML
16#
17# N.B.: My version of cerror automatically catches certain erros
18# such as out of memory, I/O error. If you re-make pdx with
19# the standard cerror, the program could fault unexpectedly.
20#
c9aaddc5 21# Also, this makefile contains almost NO HEADER DEPENDENCIES. So
b130d2a8
ML
22# if you modify a header file in a non-trivial way, you need
23# to touch the C files that include it.
24#
25
839217eb
ML
26HOME = /usr/src/cmd/pdx
27LIB = ${HOME}/library/pdxlib
c9aaddc5 28PASCAL = /usr/src/cmd/pascal/
839217eb 29INSTALL = /usr/ucb/pdx
b130d2a8
ML
30
31#
32# LDFLAGS should be -i for pdp-11
33#
34
c9aaddc5 35CFLAGS = -Disvaxpx -I.. -I${PASCAL} -DOBJ -O
b130d2a8
ML
36LDFLAGS =
37
38#
39# Regardless of what CFLAGS is, the file "compile.csh" controls
40# how compilation is done for the majority of the source files.
41#
42
43.c.o:
44 @echo "compiling $*.c"
45 @csh -f compile.csh $*.c
46
47#
48# source directory specifications
49#
50
51MAIN = main/
52SYMTAB = symtab/
53SOURCE = source/
54COMMAND = command/
55TREE = tree/
839217eb 56SYM = sym/
b130d2a8
ML
57BREAKPOINT = breakpoint/
58RUNTIME = runtime/
59OBJECT = object/
60MAPPINGS = mappings/
61PROCESS = process/
62MACHINE = machine/
63
64BPOBJ =\
65 ${BREAKPOINT}bp.o\
66 ${BREAKPOINT}bpact.o\
67 ${BREAKPOINT}fixbps.o\
68 ${BREAKPOINT}status.o\
69 ${BREAKPOINT}printnews.o\
70 ${BREAKPOINT}setbps.o\
71 ${BREAKPOINT}trinfo.o\
72 ${BREAKPOINT}trcond.o
73
74OBJOBJ =\
75 ${OBJECT}readobj.o\
76 ${OBJECT}readsym.o\
77 ${OBJECT}maketypes.o
78
79MAPOBJ =\
80 ${MAPPINGS}functab.o\
81 ${MAPPINGS}objaddr.o\
82 ${MAPPINGS}srcfile.o\
83 ${MAPPINGS}srcline.o
84
85CMDOBJ =\
86 ${COMMAND}y.tab.o\
87 ${COMMAND}lex.yy.o\
88 ${COMMAND}remake.o
89
90RUNTIMEOBJ =\
91 ${RUNTIME}frame.o\
92 ${RUNTIME}wheredump.o\
93 ${RUNTIME}isactive.o\
94 ${RUNTIME}address.o\
95 ${RUNTIME}callproc.o\
96 ${RUNTIME}entry.o
97
98MACHOBJ =\
99 ${MACHINE}nextaddr.o\
100 ${MACHINE}setbp.o\
101 ${MACHINE}optab.o\
102 ${MACHINE}printdata.o\
103 ${MACHINE}printerror.o\
104 ${MACHINE}printinst.o\
105 ${MACHINE}pxerrors.o
106
107PROCOBJ =\
108 ${PROCESS}runcont.o\
109 ${PROCESS}pstatus.o\
110 ${PROCESS}rdwr.o\
111 ${PROCESS}resume.o\
112 ${PROCESS}start.o\
113 ${PROCESS}step.o\
114 ${PROCESS}ptrace.o
115
116SYMOBJ =\
117 ${SYM}predicates.o\
118 ${SYM}attributes.o\
119 ${SYM}printdecl.o\
120 ${SYM}which.o\
121 ${SYM}print.o\
122 ${SYM}printval.o\
123 ${SYM}tree.o
124
125TREEOBJ =\
126 ${TREE}build.o\
127 ${TREE}eval.o\
128 ${TREE}opinfo.o\
129 ${TREE}prtree.o\
130 ${TREE}tfree.o\
131 ${TREE}tr_equal.o\
132 ${TREE}tracestop.o\
133 ${TREE}misc.o\
134 ${TREE}assign.o
135
136OBJS =\
137 ${MAIN}main.o\
138 ${SYMTAB}symtab.o\
139 ${SOURCE}source.o\
140 ${CMDOBJ}\
141 ${TREEOBJ}\
142 ${SYMOBJ}\
143 ${BPOBJ}\
144 ${RUNTIMEOBJ}\
145 ${OBJOBJ}\
146 ${MAPOBJ}\
147 ${PROCOBJ}\
148 ${MACHOBJ}
149
150a.out: ${OBJS}
151 @echo "linking"
152 @cc ${LDFLAGS} ${OBJS} ${LIB}
153
154profile: ${OBJS}
155 @echo "linking with -p"
156 @cc ${LDFLAGS} -p ${OBJS} ${LIB}
157
b130d2a8
ML
158${COMMAND}y.tab.o: ${COMMAND}grammar.yacc
159 chdir ${COMMAND}; yacc -d grammar.yacc; cc -c ${CFLAGS} y.tab.c
160 rm ${COMMAND}y.tab.c
161
839217eb
ML
162${COMMAND}lex.yy.o: ${COMMAND}token.lex ${COMMAND}y.tab.h
163 chdir ${COMMAND}; lex token.lex; cc -c ${CFLAGS} lex.yy.c
164 rm ${COMMAND}lex.yy.c
165
b130d2a8
ML
166${BPOBJ}: ${BREAKPOINT}bp.rep
167${RUNTIMEOBJ}: ${RUNTIME}frame.rep
168${PROCOBJ}: ${PROCESS}process.rep
169${SYMOBJ}: ${SYM}sym.rep
170${TREEOBJ}: ${TREE}tree.rep
171${OBJOBJ}: ${OBJECT}objsym.rep
c9aaddc5 172${OBJECT}readobj.o ${OBJECT}readsym.o: ${PASCAL}objfmt.h
b130d2a8
ML
173
174install:
839217eb 175 mv a.out ${INSTALL}