|
|
1.1 root 1: # @(#)Make.cdb 2.5
2: # this file contains MAKE information for making CDB
3: # this file is a System III style makefile.
4:
5: # change this to the name of the directory where you want CDB to live
6:
7: MAKEPARAM = AS=${AS} CC=${CC} LD=${LD} INCLDIR=${INCLDIR} LIBDIR=${LIBDIR} ULIBDIR=${ULIBDIR} DESTDIR=${DESTDIR}
8: INSDIR = ${DESTDIR}/usr/bin
9:
10: .SUFFIXES: .o .s .a .c
11: SHELL = ${DESTDIR}/bin/sh
12: # the following are the compile and load flags for different versions.
13: # set CFLAGS and LDFLAGS to the appropriate values.
14:
15: # if ONYXDEBUG, then also un-comment the ".c.o" rule below
16: ONYXLD = -i
17: ONYX = -DONYX -DSYSIII -O
18: ONYXDEBUG = -DONYX -DSYSIII -DDEBUG -Dregister= -S
19:
20: # if PLEXUSDEBUG, then also un-comment the ".c.o" rule below
21: PLEXUSLD = -i
22: PLEXUS = -DPLEXUS -Dz8000 -DONYX -DSYSIII -O
23: PLEXUSDEBUG = -DPLEXUS -Dz8000 -DONYX -DSYSIII -DDEBUG -Dregister= -S
24:
25: # if regulus, uncomment the CC and AS definitions below
26: # if REGDEBUG, then also un-comment the ".c.o" rule below
27: #CC = c68
28: #AS = as68
29: REGLD = -L -f
30: REG = -DM68000 -DREGULUS -DSYSIII -L -f -O
31: REGDEBUG = -DM68000 -DREGULUS -DSYSIII -DDEBUG -L -f -Dregister= -S
32:
33: # TAHOE 4.1 BSD
34: TAHOE41LD =
35: TAHOE41 = -DTAHOE -DBSD41 -O
36: TAHOE41DEBUG = -DTAHOE -DBSD41 -DDEBUG -Dregister= -g
37:
38: # TAHOE 4.2 BSD
39: TAHOE42LD =
40: TAHOE42 = -DTAHOE -DBSD41 -DBSD42 -O
41: TAHOE42DEBUG = -DTAHOE -DBSD41 -DBSD42 -DDEBUG -Dregister= -g
42:
43: # VAX 4.1 BSD
44: VAX41LD =
45: VAX41 = -DVAX -DBSD41 -O
46: VAX41DEBUG = -DVAX -DBSD41 -DDEBUG -Dregister= -g
47:
48: # VAX 4.2 BSD (and 4.1c BSD)
49: VAX42LD =
50: VAX42 = -DVAX -DBSD41 -DBSD42 -O
51: VAX42DEBUG = -DVAX -DBSD41 -DBSD42 -DDEBUG -Dregister= -g
52:
53: # SUN 4.2 BSD (and 4.1c BSD)
54: SUN42LD =
55: SUN42 = -DSUN -DM68000 -DBSD41 -DBSD42 -O
56: SUN42DEBUG = -DSUN -DM68000 -DBSD41 -DBSD42 -DDEBUG -Dregister= -g
57:
58: CFLAGS = $(TAHOE42) -c
59: LDFLAGS = $(TAHOE42LD)
60:
61: .c.o:
62: $(CC) $(CFLAGS) $*.c
63: # un-comment the following for debugging CDB on NON-BSD systems
64: # @symln <$*.s >$*.a ; as -u -o $*.o $*.a ; rm -f $*.a $*.s
65: # this is a variation on the above for REGULUS
66: # symln <$*.s >$*.a ; mv $*.a $*.s ; as68 -u -L $*.s ; rm -f $*.s
67:
68: .c:
69: $(CC) $(CFLAGS) $*.c
70: # un-comment the following for debugging CDB on NON-BSD systems
71: # @symln <$*.s >$*.a ; as -u -o $*.o $*.a ; rm -f $*.a $*.s
72: $(CC) -o $* $*.o end.o
73:
74:
75: Hfiles = cdb.h macdefs.h sym.h tk.h ty.h basic.h
76: Cfiles = main.c access.c bp.c cmd.c cmdline.c expr.c files.c format.c \
77: help.c init.c initcore.c initsym.c list.c proc.c pt.c \
78: single.c sym.c tk.c ty.c var.c end.c
79: Ofiles = main.o access.o bp.o cmd.o cmdline.o expr.o files.o format.o \
80: help.o init.o initcore.o initsym.o list.o proc.o pt.o \
81: single.o sym.o tk.o ty.o var.o end.o
82: # NOTE: 'end.o' MUST be the last file in the Ofiles list!
83:
84: # these are the documentation files (and other random stuff) for the debugger
85: DOCfiles = cdb.1 names.ms help.text\
86: Install READ_ME PLEXUS.FIX\
87: t.c ext.sed tags.awk\
88: Make.example Make.cdb
89:
90: # un-comment these for NON-BSD systems
91: # SUPPORT = symln symfix nmnew
92: # SUPPORTCfiles = symln.c symfix.c nmnew.c
93:
94: ALLFILES = $(Hfiles) $(Cfiles) $(SUPPORTCfiles) $(DOCfiles)
95:
96: cdb: $(Ofiles) makefile
97: $(CC) $(LDFLAGS) -o cdb $(Ofiles)
98:
99: install: ext.h $(SUPPORT) cdb
100: # strip cdb $(SUPPORT)
101: mv cdb $(SUPPORT) $(INSDIR)
102:
103: # t is a toy file used for testing/play with cdb
104: t: t.o end.o
105: $(CC) $(LDFLAGS) -o t t.o end.o
106:
107: # the next three are for NON-BSD systems
108: symln:
109: $(CC) $(LDFLAGS) -o symln symln.c
110:
111: symfix:
112: $(CC) $(LDFLAGS) -o symfix symfix.c
113:
114: nmnew:
115: $(CC) $(LDFLAGS) -o nmnew nmnew.c
116:
117: # this will rebuild the tags file for working with cdb.
118: tags: $(Cfiles)
119: awk -f tags.awk $(Cfiles) | sort - > tags
120:
121: # if you modify (or add) any procedure formals, execute this rule.
122: ext.h: $(Cfiles)
123: grep '^export' $(Cfiles) | sed -f ext.sed > ext.h
124:
125: clean:
126: mv end.o keep
127: rm -f $(Ofiles)
128: mv keep end.o
129:
130: cleansrc:
131: rm -f *.[ch] makefile cdb
132:
133: save: $(ALLFILES)
134: csh backup $?
135: touch save
136:
137: # this just gives you a file with the names of all the files. useful....
138: allfiles: $(ALLFILES)
139: echo "$(ALLFILES)" >allfiles
140:
141: # the following will create a list of first-level dependecies for cdb
142: # it should be run if you add any non-system include files to cdb
143: depend:
144: echo '#start of automatic dependencies' > d1
145: grep '^#include' $(Cfiles) | grep '"' > d2
146: sed -e 's/#include//' -e 's/"//g' -e 's/\.c/.o/' -e 's/\/\*.*\*\///' <d2 >> d1
147: cp Make.cdb newMake.cdb
148: (echo '/^#start of auto/,$$d'; echo '$$r d1'; echo w; echo q) | /bin/ed - newMake.cdb
149: mv Make.cdb oldMake.cdb
150: mv newMake.cdb Make.cdb
151: rm oldMake.cdb
152: @rm d1 d2
153: @echo DONE with depend
154:
155: end.o: end.c
156: ${CC} -g -c -DTAHOE -DBSD41 -DBSD42 end.c
157: #start of static dependencies
158:
159: # don't put anything below the following line! It is manipulated by above rule.
160: #start of automatic dependencies
161: main.o: cdb.h
162: access.o: macdefs.h
163: access.o: cdb.h
164: bp.o: cdb.h
165: cmd.o: cdb.h
166: cmdline.o: cdb.h
167: expr.o: cdb.h
168: expr.o: macdefs.h
169: files.o: cdb.h
170: files.o: macdefs.h
171: format.o: macdefs.h
172: format.o: cdb.h
173: help.o: cdb.h
174: init.o: cdb.h
175: init.o: macdefs.h
176: initcore.o: cdb.h
177: initcore.o: basic.h
178: initcore.o: sym.h
179: initcore.o: macdefs.h
180: initsym.o: cdb.h
181: list.o: cdb.h
182: proc.o: macdefs.h
183: proc.o: cdb.h
184: pt.o: cdb.h
185: single.o: cdb.h
186: sym.o: cdb.h
187: tk.o: cdb.h
188: ty.o: cdb.h
189: ty.o: macdefs.h
190: var.o: macdefs.h
191: var.o: cdb.h
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.