1# 2# Copyright (c) 1983 The Regents of the University of California. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms are permitted 6# provided that the above copyright notice and this paragraph are 7# duplicated in all such forms and that any documentation, 8# advertising materials, and other materials related to such 9# distribution and use acknowledge that the software was developed 10# by the University of California, Berkeley. The name of the 11# University may not be used to endorse or promote products derived 12# from this software without specific prior written permission. 13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16# 17# @(#)Makefile 5.16 (Berkeley) 07/21/89 18# 19 20# The file "defs.h" is included by all. 21 22.SUFFIXES: 23.SUFFIXES: .h .c .s .o .1 .0 24 25AOUT = tdbx 26DESTDIR = 27DEST = /usr/bin/dbx 28 29CC = cc 30AS = as 31# 32# if you want gripes 33# CFLAGS = -g '-DMAINTAINER="linton@shasta.stanford.edu"' 34# 35CFLAGS = -O # -g 36 37LD = cc 38LDFLAGS = # -g 39LIBRARIES = # -lPW for IRIS (System V) 40 41OBJ = \ 42 y.tab.o \ 43 asm.o \ 44 events.o \ 45 c.o \ 46 cerror.o \ 47 check.o \ 48 coredump.o \ 49 debug.o \ 50 eval.o \ 51 fortran.o \ 52 keywords.o \ 53 languages.o \ 54 library.o \ 55 lists.o \ 56 machine.o \ 57 main.o \ 58 mappings.o \ 59 modula-2.o \ 60 names.o \ 61 object.o \ 62 operators.o \ 63 pascal.o \ 64 printsym.o \ 65 process.o \ 66 runtime.o \ 67 scanner.o \ 68 source.o \ 69 stabstring.o \ 70 symbols.o \ 71 tree.o \ 72 ops.o 73 74HDR = \ 75 asm.h \ 76 events.h \ 77 c.h \ 78 check.h \ 79 coredump.h \ 80 debug.h \ 81 eval.h \ 82 fortran.h \ 83 keywords.h \ 84 languages.h \ 85 lists.h \ 86 machine.h \ 87 main.h \ 88 mappings.h \ 89 modula-2.h \ 90 names.h \ 91 object.h \ 92 operators.h \ 93 pascal.h \ 94 printsym.h \ 95 process.h \ 96 runtime.h \ 97 scanner.h \ 98 source.h \ 99 stabstring.h \ 100 symbols.h \ 101 tree.h \ 102 ops.h 103 104SRC = \ 105 defs.h \ 106 commands.y \ 107 asm.c \ 108 events.c \ 109 c.c \ 110 cerror.${MACHINE}.s \ 111 check.c \ 112 coredump.c \ 113 debug.c \ 114 eval.c \ 115 fortran.c \ 116 keywords.c \ 117 languages.c \ 118 library.c \ 119 lists.c \ 120 main.c \ 121 mappings.c \ 122 modula-2.c \ 123 names.c \ 124 object.c \ 125 operators.c \ 126 pascal.c \ 127 printsym.c \ 128 process.c \ 129 scanner.c \ 130 source.c \ 131 stabstring.c \ 132 symbols.c \ 133 tree.c \ 134 ${MACHINE}.c \ 135 runtime.${MACHINE}.c \ 136 ops.${MACHINE}.c 137 138.c.o: 139 @echo "compiling $*.c" 140 @${CC} ${CFLAGS} -c $*.c 141 142.s.o: 143 @echo "assembling $*.s" 144 @rm -f tmp 145 @cpp $*.s | egrep -v "^#" > tmp 146 @${AS} -o $*.o tmp 147 @rm -f tmp 148 149.c.h: 150 ./makedefs -f $*.c $*.h 151 152all ${AOUT}: makedefs mkdate ${HDR} ${OBJ} 153 @rm -f date.c 154 @./mkdate > date.c 155 @echo "linking" 156 @${CC} ${CFLAGS} -c date.c 157 @${LD} ${LDFLAGS} date.o ${OBJ} ${LIBRARIES} -o ${AOUT} 158 159profile: ${HDR} ${OBJ} 160 @rm -f date.c 161 @./mkdate > date.c 162 @echo "linking with -p" 163 @${CC} ${LDFLAGS} -p date.c ${OBJ} ${LIBRARIES} -o ${AOUT} 164 165y.tab.c: commands.y 166 @echo "expect 2 shift/reduce conflicts" 167 yacc -d commands.y 168 169cerror.s: cerror.${MACHINE}.s 170 @rm -f cerror.s 171 @ln -s cerror.${MACHINE}.s cerror.s 172 173machine.c: ${MACHINE}.c 174 @rm -f machine.c 175 @ln -s ${MACHINE}.c machine.c 176 177ops.c: ops.${MACHINE}.c 178 @rm -f ops.c 179 @ln -s ops.${MACHINE}.c ops.c 180 181runtime.c: runtime.${MACHINE}.c 182 @rm -f runtime.c 183 @ln -s runtime.${MACHINE}.c runtime.c 184 185makedefs: makedefs.c library.o cerror.o 186 ${CC} -g makedefs.c library.o cerror.o -o makedefs 187 188mkdate: mkdate.c 189 ${CC} -g ${CFLAGS} mkdate.c -o mkdate 190 191print: 192 @echo "don't print it, it's too long" 193 194depend: 195 196# 197# Don't worry about the removal of header files, they're created from 198# the source files. 199# 200 201clean: 202 rm -f ${HDR} ${OBJ} y.tab.c y.tab.h ${AOUT} mkdate mkdate.o \ 203 makedefs makedefs.o date.c core mon.out prof.out make.out \ 204 cerror.s ops.c machine.c runtime.c date.o 205 @chdir tests; make clean 206 207cleandir: clean 208 rm -f dbx.0 tags .depend 209 210cleandefs: 211 rm -f ${HDR} y.tab.h 212 213testinstall: ${AOUT} test install 214 215test: 216 @cd tests; make 217 218install: ${AOUT} dbx.0 219 install -s -o bin -g bin -m 755 ${AOUT} ${DESTDIR}${DEST} 220 install -c -o bin -g bin -m 444 dbx.0 ${DESTDIR}/usr/man/cat1 221 222# 223# Create a tar file called "tape" containing relevant files. 224# 225 226TAPE = f tape 227 228tape: 229 @tar c${TAPE} Makefile History READ_ME ${SRC} \ 230 makedefs.c mkdate.c tests pc0mods dbx.1 newdbx.1 dbxstab.5 231 232# 233# without tests subdirectory 234# 235srconlytape: 236 @tar c${TAPE} Makefile History READ_ME ${SRC} \ 237 makedefs.c mkdate.c dbx.1 newdbx.1 dbxstab.5 238 239# 240# Header dependencies are purposely incomplete since header files 241# are "written" every time the accompanying source file changes even if 242# the resulting contents of the header don't change. The alternative is 243# to force a "makedefs" to be invoked for every header file each time dbx 244# is made. 245# 246# Also, there should be a dependency of scanner.o and keywords.o on y.tab.h 247# but misfortunately silly make does a "makedefs y.tab.c y.tab.h" which 248# destroys y.tab.h. 249# 250 251symbols.o tree.o check.o eval.o events.o: operators.h 252