-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathYmakefile
406 lines (360 loc) · 9.69 KB
/
Ymakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
# Master Makefile for the TimberWolf system
# "@(#) Ymakefile (Yale) version 1.27 4/22/92"
#
#include macros
# relative directory to programs
R=./pgms
# relative directory to example files
T=./test
# where the program source resides
PGMSRC=${R}/Ylib/lib \
${R}/draw/src \
${R}/drawnets/src \
${R}/drawTW/src \
${R}/gengraph/src \
${R}/genrows/src \
${R}/makedepend/src \
${R}/mc_compact/src \
${R}/mickey/src \
${R}/mighty/src \
${R}/mincut/src \
${R}/psc/src \
${R}/syntax/src \
${R}/tomus/src \
${R}/twflow/src \
${R}/twmc/src \
${R}/twsc/src
PGMBIN= ${R}/draw/draw \
${R}/drawnets/analyze_nets \
${R}/drawTW/drawTW \
${R}/gengraph/gengraph \
${R}/genrows/genrows \
${R}/makedepend/makedepend \
${R}/mc_compact/mc_compact \
${R}/mickey/Mickey \
${R}/mighty/TimberWolfDR \
${R}/mincut/Mincut \
${R}/psc/psc \
${R}/syntax/syntax \
${R}/tomus/Tomus \
${R}/twflow/twflow \
${R}/twmc/TimberWolfMC \
${R}/twsc/TimberWolfSC
# example file directories
TESTSRC=${T}/macro \
${T}/mixed \
${T}/part \
${T}/stdcell \
${T}/stdcell2
ARCHIVE=${R}/Ylib/lib/libycad.mem.a \
${R}/Ylib/lib/libycad.sys.a
# auxillary code compiled only at Yale
AUXSRC= ${R}/mcc/src \
${R}/date/src \
${R}/condraw/src \
${R}/convert/src \
${R}/utils/src \
${R}/ymake/src
# auxillary code compiled only at Yale
AUXBIN=${R}/condraw/condraw \
${R}/convert/convert \
${R}/date/getdate \
${R}/mcc/mcc \
${R}/sc_route/sc_route \
${R}/utils/build_menu \
${R}/utils/net_util \
${R}/ymake/makehelper
SRC = .twrc Ymakefile maketape DISCLAIMER README
info: ;
-@${ECHO} " "
-@${ECHO} "Master makefile for the TimberWolf system"
-@${ECHO} " "
-@${ECHO} "Non-yale users should first set the TimberWolf"
-@${ECHO} " environment variables TWDIR and DATADIR."
-@${ECHO} " TWDIR is the pathname of the TimberWolf directory."
-@${ECHO} " DATADIR is the pathname of the directory where"
-@${ECHO} " graphics dumps are stored. TWDIR and DATADIR"
-@${ECHO} " can be set to their default settings by typing"
-@${ECHO} " 'source .twrc' <CR>"
-@${ECHO} " "
-@${ECHO} "Next users should set compile switches in "
-@${ECHO} " ./pgms/ymake/Ymake.macro file"
-@${ECHO} " "
-@${ECHO} "Then return to this directory and type "
-@${ECHO} " 'ymake' <CR>"
-@${ECHO} "This will reset the top level Makefile"
-@${ECHO} "Next type:"
-@${ECHO} " 'make Makefiles' <CR>"
-@${ECHO} "This will make the machine dependent makefiles"
-@${ECHO} " "
-@${ECHO} "Now type"
-@${ECHO} " 'make install_non_yale' <CR>"
-@${ECHO} " to build system"
-@${ECHO} " "
-@${ECHO} "Use 'make production' to strip all programs "
-@${ECHO} " "
init:
-@defaults/inittw
install:
@for i in $(PGMSRC); do \
(cd $$i ;${ECHO} "yale make in $$i..."; \
make install ; ) \
done;
install_non_yale:
for i in $(PGMSRC); do \
(cd $$i ;${ECHO} "non-yale make in $$i..."; \
make install_non_yale CLEANUP=${CLEANUP} \
NOGRAPHICS=${NOGRAPHICS} UNIX=${UNIX} DEBUG=${DEBUG} \
YALECAD=${YALECAD} CC=${CC} \
CFLAGS="${CFLAGS} -DSIZEOF_VOID_P=`getconf LONG_BIT`" \
LINKLIB="${LINKLIB}" GETDATE= ; ) \
done;
clean:
@for i in $(PGMSRC); do \
(cd $$i ;${ECHO} "cleaning binary in $$i..."; \
make clean ;) \
done;
veryclean:
@${MAKE} delpgms
@${MAKE} delarchives
@${MAKE} clean
@${RM} DATA/*
@for i in $(TESTSRC); do \
(cd $$i ;${ECHO} "cleaning runtime files in $$i..."; \
.clean ;) \
done;
Makefiles:
( ${R}/ymake/ymake ) ;
# ( cd ${R}/makedepend/src;${YMAKE} nodepend;${MAKE} install_non_yale CC=${CC} ;);
@for i in $(PGMSRC); do \
(cd $$i ;${ECHO} "making makefile in $$i..."; \
${YMAKE} ${YMAKEARGS};) \
done;
production:
@for i in $(PGMBIN); do \
(${ECHO} "striping program $$i..."; \
${STRIP} $$i ;) \
done;
delpgms:
@for i in $(PGMBIN); do \
(${ECHO} "removing program $$i..."; \
${RM} $$i ;) \
done;
delarchives:
@${ECHO} "removing archives"
@${RM} ${ARCHIVE}
yacc:
${RM} doc/tar.yacc doc/tar.yacc.Z
tar cvf doc/tar.yacc `find ${PGMSRC} ${AUXSRC} -name '*.[ly]' -print | /bin/grep -v SCCS`
compress doc/tar.yacc
depend: ;
#default sccs operation is get
SCCS_OP=get
#current release
REL=
# how to get sources from sccs
sources : ${SRC}
${SRC}:
${SCCS} ${SCCS_OP} ${REL} $@
util:
@for i in $(PGMSRC); do \
(cd $$i ;${ECHO} "execing utility - ${UTIL} in $$i..."; \
${UTIL} ;) \
done;
sccsclean:
@for i in $(PGMSRC); do \
(cd $$i ;${ECHO} "cleaning sccs source in $$i..."; \
${SCCS} clean; ) \
done;
sccsutil:
@for i in $(PGMSRC); do \
(cd $$i ;${ECHO} "preforming sccs utility - ${UTIL} in $$i..."; \
${SCCS} ${UTIL}; ) \
done;
transport:
@${ECHO} "Ymake.macro file should be correct at this point."
@${ECHO} "In addition, 'make clean' and 'make cleanaux' should have been run"
@${ECHO} "You have 10 seconds to kill job"
sleep 10
@for i in $(PGMSRC); do \
(cd $$i ;${ECHO} "readying files in $$i..."; \
trap "" 1 ; \
${SCCS} get Ymakefile ; \
${YMAKE} nodepend ; \
${MAKE} sources ; \
trap 1 ; ) ; \
done;
@for i in $(AUXSRC); do \
(cd $$i ;${ECHO} "readying files in $$i..."; \
trap "" 1 ; \
${SCCS} get Ymakefile ; \
${SCCS} get Ymakefile ; \
${YMAKE} nodepend ; \
${MAKE} sources ; \
trap 1 ; ) ; \
done;
${ECHO} "build utilities...";
${MAKE} -i aux
${MAKE} -i install
${MAKE} Makefiles
auxinfo:
-@${ECHO} " "
-@${ECHO} "Master makefile for the TimberWolf system"
-@${ECHO} "Auxillary utilities"
-@${ECHO} "Use 'ymakeaux' to make aux Makefiles"
-@${ECHO} "Use 'cleanaux' to make clean aux objects"
-@${ECHO} "Use 'aux' to make aux programs"
-@${ECHO} "Use 'delaux' to remove aux programs"
-@${ECHO} "Use 'sccscleanaux' to remove aux sccs sources"
-@${ECHO} "Use 'sccsutilaux' to perform sccs util in aux sources"
-@${ECHO} "Use 'utilaux' to perform any util in aux directories"
-@${ECHO} "Use 'utilaux UTIL="make sources"' to get all sccs sources"
-@${ECHO} " "
ymakeaux:
@for i in $(AUXSRC); do \
(cd $$i ;${ECHO} "making makefile in $$i..."; \
${YMAKE} ${YMAKEARGS};) \
done;
cleanaux:
@for i in $(AUXSRC); do \
(cd $$i ;${ECHO} "cleaning binary in $$i..."; \
make clean ;) \
done;
aux:
@for i in $(AUXSRC); do \
(cd $$i ;${ECHO} "yale make in $$i..."; \
make install ; ) \
done;
delaux:
@for i in $(AUXBIN); do \
(${ECHO} "removing program $$i..."; \
${RM} $$i ;) \
done;
sccscleanaux:
@for i in $(AUXSRC); do \
(cd $$i ;${ECHO} "cleaning sccs source in $$i..."; \
${SCCS} clean; ) \
done;
sccsutilaux:
@for i in $(AUXSRC); do \
(cd $$i ;${ECHO} "preforming sccs utility - ${UTIL} in $$i..."; \
${SCCS} ${UTIL}; ) \
done;
utilaux:
@for i in $(AUXSRC); do \
(cd $$i ;${ECHO} "execing utility - ${UTIL} in $$i..."; \
${UTIL} ;) \
done;
sccsinfo: ;
sccs info ;
(cd ${R}/Ylib/include; sccs info ; ) ;
(cd ${R}/Ylib/lib; sccs info ; ) ;
find . -name src -print -exec sccs -d {} info \;
clean_data: ;
(cd ; find . -name cell.bin.\* -print -exec rm {} \; )
(cd ; find . -name pin.bin.\* -print -exec rm {} \; )
(cd ; find . -name net.bin.\* -print -exec rm {} \; )
(cd ; find . -name symb.bin.\* -print -exec rm {} \; )
# start off with the directories originally set for 68k
setup_apollo: ;
for i in $(PGMSRC); do \
( if( test $$i = ${R}/Ylib/lib ) then \
make delarchives ; \
(cd $$i ; make clean ; \
ar r libycad.mem.a.68k ; \
ar r libycad.sys.a.68k ; \
ar r libycad.mem.a.88k ; \
ar r libycad.sys.a.88k ; ) ; \
fi ; \
${ECHO} "setting up object directories in $$i" ; \
( cd $$i ; \
${MV} ../obj ../obj.68k ; \
mkdir ../obj.88k ; \
ln -s ./obj.68k ../obj ; \
) ; \
) ; \
done;
clean_apollo: ;
for i in $(PGMSRC); do \
( if( test $$i = ${R}/Ylib/lib ) then \
make delarchives ; \
(cd $$i ; make clean ; \
${RM} libycad.mem.a.68k ; \
${RM} libycad.sys.a.68k ; \
${RM} libycad.mem.a.88k ; \
${RM} libycad.sys.a.88k ; ) ; \
fi ; \
${ECHO} "Removing apollo object directories in $$i" ; \
( cd $$i ; \
/bin/rm -rf ../obj.68k ; \
/bin/rm -rf ../obj.88k ; \
/bin/rm -rf ../obj ; \
mkdir ../obj ; \
) ; \
) ; \
done;
apollo: ;
for i in $(PGMSRC); do \
( if( test $$i = ${R}/Ylib/lib ) then \
${ECHO} "setting up library archives in $$i" ; \
(cd $$i; \
${RM} libycad.mem.a ; \
ln -s libycad.mem.a.68k libycad.mem.a ; \
${RM} libycad.sys.a ; \
ln -s libycad.sys.a.68k libycad.sys.a ; ) ; \
fi ; \
${ECHO} "setting up object directories in $$i" ; \
( cd $$i ; \
${RM} ../obj ; \
ln -s ./obj.68k ../obj ; \
) ; \
) ; \
done;
make install_non_yale
dn10000: ;
${ECHO} "You should be logged onto a DN10000"
${ECHO} "You have 10 seconds to kill make"
sleep 10
( trap "" 1 ; \
for i in $(PGMBIN); do \
if( test -f $$i.68k ) then \
${ECHO} "moving $$i back to correct place..."; \
${MV} $$i.68k $$i; \
fi ; \
done; \
trap 1 ; \
) ;
for i in $(PGMSRC); do \
( if( test $$i = ${R}/Ylib/lib ) then \
${ECHO} "setting up library archives in $$i" ; \
(cd $$i; \
${RM} libycad.mem.a ; \
ln -s libycad.mem.a.88k libycad.mem.a ; \
${RM} libycad.sys.a ; \
ln -s libycad.sys.a.88k libycad.sys.a ; ) ; \
fi ; \
${ECHO} "setting up object directories in $$i" ; \
( cd $$i ; \
${RM} ../obj ; \
ln -s ./obj.88k ../obj ; \
) ; \
) ; \
done;
for i in $(PGMBIN); do \
( if( test -f $$i ) then \
${ECHO} "moving 68k version of $$i..."; \
${MV} $$i $$i.68k; \
fi ; \
) ; \
done;
make install_non_yale CC=${CC} GETDATE=getdate.prism CFLAGS="-O" \
YACC=echo LEX=echo YACCMV=echo LEXMV=echo
for i in $(PGMBIN); do \
( ${MV} $$i $$i.prism; \
if( test -f $$i.68k ) then \
${ECHO} "moving $$i back..."; \
${MV} $$i.68k $$i; \
fi ; \
) ; \
done;
#end of makefile