Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / conf / makefiles / sbr
1 ##############################################################################
2 #    Instructions to Make, for compilation of MH modules
3 #
4 #       @(MHWARNING)
5 # @(#)$Id: sbr,v 2.21 1993/02/26 19:01:31 jromine Exp $
6 ##############################################################################
7
8 OPTIONS =       @(MHOPTIONS)
9
10 CC      =       @(MHCOMPILER)
11 @BEGIN: OPTIM
12 CFLAGS  =       $(OPTIONS)
13 @END: OPTIM
14 @BEGIN: DEBUG
15 CFLAGS  =            $(OPTIONS)
16 @END: DEBUG
17 LINT    =       lint
18 LFLAGS  =       -bhu $(OPTIONS)
19 LLIBS   =
20
21
22 @BEGIN: STDLIB
23 LIBS    =       libmh.a
24 @END: STDLIB
25 @BEGIN: SHAREDLIB
26 @BEGIN: SUN4SHLIB
27 LIBSA   =       libmh.sa
28 @END: SUN4SHLIB
29 LIBS     =      shared libmh.a libmh.so $(LIBSA)
30 SLIBVER =       @(SLIBVER)
31 SLIBDIR =       $(DESTDIR)@(SLIBDIR)
32 SLFLAGS=        @(SLFLAGS)
33 @END: SHAREDLIB
34
35 PGMPROT =       0755
36
37 CFILES  =       add.c adios.c admonish.c addrsbr.c advertise.c advise.c \
38                 ambigsw.c atooi.c brkstring.c closefds.c concat.c copy.c \
39                 copyip.c cpydata.c cpydgst.c discard.c done.c fdcompare.c \
40                 gans.c getans.c getanswer.c getcpy.c help.c fmtcompile.c \
41                 formataddr.c formatsbr.c m_atoi.c m_backup.c m_convert.c \
42                 m_delete.c m_draft.c m_find.c m_fmsg.c m_foil.c m_getdefs.c \
43                 m_getfld.c m_getfolder.c m_gmprot.c m_gmsg.c m_maildir.c \
44                 m_name.c m_readefs.c m_remsg.c m_replace.c m_scratch.c \
45                 m_seq.c m_seqbits.c m_seqflag.c m_seqnew.c m_setcur.c \
46                 m_setseq.c m_setvis.c m_sync.c m_tmpfil.c m_update.c \
47                 makedir.c path.c peekc.c pidwait.c pidstatus.c \
48                 printsw.c push.c putenv.c pwd.c refile.c remdir.c r1bindex.c \
49 @BEGIN: NORUSERPASS
50                 ruserpass.c \
51 @END: NORUSERPASS
52                 showfile.c smatch.c sprintb.c ssequal.c strindex.c trimcpy.c \
53                 uleq.c uprf.c vfgets.c formatdef.c m_msgdef.c
54
55
56 OFILES  =       add.o adios.o admonish.o addrsbr.o advertise.o advise.o \
57                 ambigsw.o atooi.o brkstring.o closefds.o concat.o copy.o \
58                 copyip.o cpydata.o cpydgst.o discard.o done.o fdcompare.o \
59                 gans.o getans.o getanswer.o getcpy.o help.o fmtcompile.o \
60                 formataddr.o formatsbr.o m_atoi.o m_backup.o m_convert.o \
61                 m_delete.o m_draft.o m_find.o m_fmsg.o m_foil.o m_getdefs.o \
62                 m_getfld.o m_getfolder.o m_gmprot.o m_gmsg.o m_maildir.o \
63                 m_name.o m_readefs.o m_remsg.o m_replace.o m_scratch.o \
64                 m_seq.o m_seqbits.o m_seqflag.o m_seqnew.o m_setcur.o \
65                 m_setseq.o m_setvis.o m_sync.o m_tmpfil.o m_update.o \
66                 makedir.o path.o peekc.o pidwait.o pidstatus.o \
67                 printsw.o push.o putenv.o pwd.o refile.o remdir.o r1bindex.o \
68 @BEGIN: NORUSERPASS
69                 ruserpass.o \
70 @END: NORUSERPASS
71                 showfile.o smatch.o sprintb.o ssequal.o strindex.o trimcpy.o \
72                 uleq.o uprf.o vfgets.o formatdef.o m_msgdef.o
73
74 @BEGIN: SHAREDLIB
75 ODEFS   =       formatdef.o m_msgdef.o
76 @END: SHAREDLIB
77
78 @BEGIN: OPTIM
79 ##############################################################################
80 #       Generation Rules
81 ##############################################################################
82
83 .c.o:
84 @BEGIN: SHAREDLIB
85                 -rm -f $@ shared/$@
86                 $(CC) $(CFLAGS) -c $(SLFLAGS) $*.c
87                 mv $@ shared/$@
88                 -rm -f $@
89 @END: SHAREDLIB
90                 $(CC) $(CFLAGS) -c $*.c
91 @BEGIN: NEWLOAD
92                 -ld -x -r $@
93                 mv a.out $@
94 @END: NEWLOAD
95 @BEGIN: OLDLOAD
96                 cc -s -o $@
97 @END: OLDLOAD
98
99 @END: OPTIM
100 ##############################################################################
101 #       Generate MH subroutine library
102 ##############################################################################
103
104 all:            $(LIBS)
105
106 libmh.a:        $(OFILES)
107                 -mv $@ z$@
108 @BEGIN: RANLIB
109                 ar r $@ $(OFILES); ranlib $@
110 @END: RANLIB
111 @BEGIN: LORDER
112                 ar r $@ `lorder $(OFILES) | tsort`
113 @END: LORDER
114                 -@ls -l $@
115                 -@echo "MH library built normally"
116
117 @BEGIN: SHAREDLIB
118 libmh.so:       $(OFILES)
119                 -mv -f $@ z$@
120 @BEGIN: SUN4SHLIB
121                 (cd shared; ld -o ../$@ -assert pure-text $(OFILES))
122 @END: SUN4SHLIB
123 @BEGIN: SYS5SHLIB
124                 (cd shared; ld -G -o ../$@ -h $@.$(SLIBVER) $(OFILES))
125 @END: SYS5SHLIB
126                 -@rm -f $@.$(SLIBVER)
127                 ln $@ $@.$(SLIBVER)
128                 -@ls -l $@*
129                 -@echo "MH shared library built normally"
130
131 @BEGIN: SUN4SHLIB
132 libmh.sa:       $(ODEFS)
133                 -mv $@ z$@
134 @BEGIN: RANLIB
135                 ar r $@ $(ODEFS); ranlib $@
136 @END: RANLIB
137 @BEGIN: LORDER
138                 ar r $@ `lorder $(ODEFS) | tsort`
139 @END: LORDER
140                 -@rm -f $@.$(SLIBVER)
141                 ln $@ $@.$(SLIBVER)
142                 -@ls -l $@*
143                 -@echo "MH data interface description built normally"
144 @END: SUN4SHLIB
145
146 shared:;        @if [ -d shared ]; then exit 0; else set -x; mkdir shared; fi
147 @END: SHAREDLIB
148
149 ##############################################################################
150 #       Miscellaneous tasks
151 ##############################################################################
152
153 @BEGIN: SHAREDLIB
154 inst-lib:       libmh.so $(LIBSA)
155                 -rm -f $(SLIBDIR)/libmh.so.$(SLIBVER)
156                 cp libmh.so.$(SLIBVER) $(SLIBDIR)/libmh.so.$(SLIBVER)
157                 -@chmod $(PGMPROT) $(SLIBDIR)/libmh.so.$(SLIBVER)
158                 -@ls -l $(SLIBDIR)/libmh.so.*
159                 -@echo "Shared library installed normally"
160                 -@echo ""
161 @BEGIN: SUN4SHLIB
162                 -rm -f $(SLIBDIR)/libmh.sa.$(SLIBVER)
163                 cp libmh.sa.$(SLIBVER) $(SLIBDIR)/libmh.sa.$(SLIBVER)
164                 -@chmod $(PGMPROT) $(SLIBDIR)/libmh.sa.$(SLIBVER)
165 @BEGIN: RANLIB
166                 cd $(SLIBDIR); ranlib libmh.sa.$(SLIBVER)
167 @END: RANLIB
168                 -@ls -l $(SLIBDIR)/libmh.sa.*
169                 -@echo "Data interface description installed normally"
170                 -@echo ""
171 @END: SUN4SHLIB
172 @END: SHAREDLIB
173 @BEGIN: STDLIB
174 inst-lib:;
175 @END: STDLIB
176
177 lint:;          $(LINT) $(LFLAGS) $(CFILES) $(LLIBS)
178
179 unconfig:       distribution
180                 -rm -f Makefile
181                 -rm -rf shared
182
183 distribution:   clean
184                 -rm -f version
185
186 clean:          unclean
187                 -rm -f *.o libmh.*
188 @BEGIN: SHAREDLIB
189                 -rm -f shared/*.o
190 @END: SHAREDLIB
191
192 unclean:;       -rm -f zlibmh.* _* :* core eddep makedep
193
194
195 ##############################################################################
196 #  MODIFICATIONS -- Adding a new routine (e.g., pickle)
197 ##############################################################################
198
199 #
200 #    Add any new .c files to CFILES
201 #    Add any new .o files to OFILES
202 #
203 #
204 #    Under the "Dependencies" section, add a line for pickle.o
205 #       pickle.o:       ../h/mh.h
206 #
207 #    If other includes are read, modify this rule to reflect this
208 #    Of course, if pickle.c doesn't include ../h/mh.h (or any
209 #    other includes), you can leave this line out altogether
210
211
212 ##############################################################################
213 #       Dependencies
214 ##############################################################################
215
216 MODULES =       $(CFILES)
217
218 depend:;        for m in $(MODULES); do ( \
219                     i=`basename $$m .c`; \
220                     echo $$i.o: $$i.c >> makedep; \
221                     grep '^#[   ]*include' $$i.c | \
222                         sed -e 's,[^"]*"/\([^"]*\)".*,'$$i'.o: /\1,' \
223                             -e 's,[^"]*"\([^"]*\)".*,'$$i'.o: \1,' \
224                             -e 's,[^<]*<\(.*\)>.*,#'$$i'.o: /usr/include/\1,' \
225                         >> makedep \
226                 ); done
227                 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' > eddep
228                 echo '$$r makedep' >> eddep
229                 echo 'w' >> eddep
230                 cp Makefile _Makefile
231                 ed - Makefile < eddep
232                 rm eddep makedep
233                 echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
234                 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
235
236 # DO NOT DELETE THIS LINE
237 # DEPENDENCIES START HERE
238 add.o: add.c
239 add.o: ../h/mh.h
240 #add.o: /usr/include/stdio.h
241 adios.o: adios.c
242 adios.o: ../h/mh.h
243 admonish.o: admonish.c
244 admonish.o: ../h/mh.h
245 addrsbr.o: addrsbr.c
246 addrsbr.o: ../h/mh.h
247 addrsbr.o: ../h/addrsbr.h
248 addrsbr.o: ../zotnet/mf.h
249 #addrsbr.o: /usr/include/stdio.h
250 #addrsbr.o: /usr/include/ctype.h
251 advertise.o: advertise.c
252 advertise.o: ../h/mh.h
253 #advertise.o: /usr/include/stdio.h
254 #advertise.o: /usr/include/sys/types.h
255 #advertise.o: /usr/include/sys/uio.h
256 advise.o: advise.c
257 advise.o: ../h/mh.h
258 ambigsw.o: ambigsw.c
259 ambigsw.o: ../h/mh.h
260 #ambigsw.o: /usr/include/stdio.h
261 atooi.o: atooi.c
262 brkstring.o: brkstring.c
263 brkstring.o: ../h/mh.h
264 closefds.o: closefds.c
265 closefds.o: ../h/mh.h
266 #closefds.o: /usr/include/stdio.h
267 concat.o: concat.c
268 concat.o: ../h/mh.h
269 #concat.o: /usr/include/stdio.h
270 #concat.o: /usr/include/varargs.h
271 copy.o: copy.c
272 copyip.o: copyip.c
273 cpydata.o: cpydata.c
274 cpydata.o: ../h/mh.h
275 #cpydata.o: /usr/include/stdio.h
276 cpydgst.o: cpydgst.c
277 cpydgst.o: ../h/mh.h
278 #cpydgst.o: /usr/include/stdio.h
279 discard.o: discard.c
280 discard.o: ../h/mh.h
281 #discard.o: /usr/include/stdio.h
282 #discard.o: /usr/include/sgtty.h
283 #discard.o: /usr/include/sys/types.h
284 #discard.o: /usr/include/termio.h
285 #discard.o: /usr/include/sys/ioctl.h
286 done.o: done.c
287 done.o: ../h/mh.h
288 fdcompare.o: fdcompare.c
289 fdcompare.o: ../h/mh.h
290 #fdcompare.o: /usr/include/stdio.h
291 gans.o: gans.c
292 gans.o: ../h/mh.h
293 #gans.o: /usr/include/stdio.h
294 getans.o: getans.c
295 getans.o: ../h/mh.h
296 #getans.o: /usr/include/setjmp.h
297 #getans.o: /usr/include/signal.h
298 #getans.o: /usr/include/stdio.h
299 getanswer.o: getanswer.c
300 getanswer.o: ../h/mh.h
301 #getanswer.o: /usr/include/stdio.h
302 getcpy.o: getcpy.c
303 getcpy.o: ../h/mh.h
304 #getcpy.o: /usr/include/stdio.h
305 help.o: help.c
306 help.o: ../h/mh.h
307 #help.o: /usr/include/stdio.h
308 formatsbr.o: formatsbr.c
309 formatsbr.o: ../h/mh.h
310 formatsbr.o: ../h/addrsbr.h
311 formatsbr.o: ../h/formatsbr.h
312 formatsbr.o: ../zotnet/tws.h
313 formatsbr.o: ../h/fmtcompile.h
314 #formatsbr.o: /usr/include/ctype.h
315 #formatsbr.o: /usr/include/stdio.h
316 #formatsbr.o: /usr/include/sys/types.h
317 #formatsbr.o: /usr/include/sys/stat.h
318 fmtcompile.o: fmtcompile.c
319 fmtcompile.o: ../h/mh.h
320 fmtcompile.o: ../h/addrsbr.h
321 fmtcompile.o: ../h/formatsbr.h
322 fmtcompile.o: ../zotnet/tws.h
323 fmtcompile.o: ../h/fmtcompile.h
324 #fmtcompile.o: /usr/include/ctype.h
325 #fmtcompile.o: /usr/include/stdio.h
326 #fmtcompile.o: /usr/include/sys/types.h
327 #fmtcompile.o: /usr/include/sys/stat.h
328 formataddr.o: formataddr.c
329 formataddr.o: ../h/mh.h
330 formataddr.o: ../h/addrsbr.h
331 formataddr.o: ../h/formatsbr.h
332 #formataddr.o: /usr/include/ctype.h
333 #formataddr.o: /usr/include/stdio.h
334 m_atoi.o: m_atoi.c
335 m_atoi.o: ../h/mh.h
336 m_backup.o: m_backup.c
337 m_backup.o: ../h/mh.h
338 #m_backup.o: /usr/include/stdio.h
339 m_convert.o: m_convert.c
340 m_convert.o: ../h/mh.h
341 #m_convert.o: /usr/include/stdio.h
342 #m_convert.o: /usr/include/ctype.h
343 m_delete.o: m_delete.c
344 m_delete.o: ../h/mh.h
345 #m_delete.o: /usr/include/stdio.h
346 m_draft.o: m_draft.c
347 m_draft.o: ../h/mh.h
348 #m_draft.o: /usr/include/errno.h
349 #m_draft.o: /usr/include/stdio.h
350 #m_draft.o: /usr/include/sys/types.h
351 #m_draft.o: /usr/include/sys/stat.h
352 m_find.o: m_find.c
353 m_find.o: ../h/mh.h
354 #m_find.o: /usr/include/stdio.h
355 m_fmsg.o: m_fmsg.c
356 m_fmsg.o: ../h/mh.h
357 #m_fmsg.o: /usr/include/stdio.h
358 m_foil.o: m_foil.c
359 m_foil.o: ../h/mh.h
360 #m_foil.o: /usr/include/stdio.h
361 m_getdefs.o: m_getdefs.c
362 m_getdefs.o: ../h/mh.h
363 #m_getdefs.o: /usr/include/stdio.h
364 #m_getdefs.o: /usr/include/errno.h
365 #m_getdefs.o: /usr/include/sys/types.h
366 #m_getdefs.o: /usr/include/sys/stat.h
367 #m_getdefs.o: /usr/include/pwd.h
368 m_getfld.o: m_getfld.c
369 m_getfld.o: ../h/mh.h
370 #m_getfld.o: /usr/include/stdio.h
371 m_getfld.o: ../zotnet/mts.h
372 #m_getfld.o: /usr/include/ctype.h
373 m_getfolder.o: m_getfolder.c
374 m_getfolder.o: ../h/mh.h
375 #m_getfolder.o: /usr/include/stdio.h
376 m_gmprot.o: m_gmprot.c
377 m_gmprot.o: ../h/mh.h
378 #m_gmprot.o: /usr/include/stdio.h
379 m_gmsg.o: m_gmsg.c
380 m_gmsg.o: ../h/mh.h
381 m_gmsg.o: ../h/local.h
382 #m_gmsg.o: /usr/include/stdio.h
383 #m_gmsg.o: /usr/include/sys/types.h
384 #m_gmsg.o: /usr/include/sys/stat.h
385 #m_gmsg.o: /usr/include/ndir.h
386 #m_gmsg.o: /usr/include/dir.h
387 #m_gmsg.o: /usr/include/sys/dir.h
388 m_maildir.o: m_maildir.c
389 m_maildir.o: ../h/mh.h
390 #m_maildir.o: /usr/include/stdio.h
391 m_name.o: m_name.c
392 m_name.o: ../h/mh.h
393 #m_name.o: /usr/include/stdio.h
394 m_readefs.o: m_readefs.c
395 m_readefs.o: ../h/mh.h
396 #m_readefs.o: /usr/include/stdio.h
397 m_remsg.o: m_remsg.c
398 m_remsg.o: ../h/mh.h
399 #m_remsg.o: /usr/include/stdio.h
400 m_replace.o: m_replace.c
401 m_replace.o: ../h/mh.h
402 #m_replace.o: /usr/include/stdio.h
403 m_scratch.o: m_scratch.c
404 m_scratch.o: ../h/mh.h
405 #m_scratch.o: /usr/include/stdio.h
406 m_seq.o: m_seq.c
407 m_seq.o: ../h/mh.h
408 #m_seq.o: /usr/include/stdio.h
409 m_seqbits.o: m_seqbits.c
410 m_seqbits.o: ../h/mh.h
411 #m_seqbits.o: /usr/include/stdio.h
412 m_seqflag.o: m_seqflag.c
413 m_seqflag.o: ../h/mh.h
414 m_seqnew.o: m_seqnew.c
415 m_seqnew.o: ../h/mh.h
416 #m_seqnew.o: /usr/include/ctype.h
417 #m_seqnew.o: /usr/include/stdio.h
418 m_setcur.o: m_setcur.c
419 m_setcur.o: ../h/mh.h
420 #m_setcur.o: /usr/include/stdio.h
421 m_setseq.o: m_setseq.c
422 m_setseq.o: ../h/mh.h
423 #m_setseq.o: /usr/include/stdio.h
424 m_setvis.o: m_setvis.c
425 m_setvis.o: ../h/mh.h
426 #m_setvis.o: /usr/include/stdio.h
427 m_sync.o: m_sync.c
428 m_sync.o: ../h/mh.h
429 #m_sync.o: /usr/include/stdio.h
430 m_tmpfil.o: m_tmpfil.c
431 m_tmpfil.o: ../h/mh.h
432 #m_tmpfil.o: /usr/include/stdio.h
433 m_update.o: m_update.c
434 m_update.o: ../h/mh.h
435 #m_update.o: /usr/include/stdio.h
436 #m_update.o: /usr/include/signal.h
437 makedir.o: makedir.c
438 makedir.o: ../h/mh.h
439 #makedir.o: /usr/include/stdio.h
440 path.o: path.c
441 path.o: ../h/mh.h
442 #path.o: /usr/include/stdio.h
443 peekc.o: peekc.c
444 peekc.o: ../h/mh.h
445 #peekc.o: /usr/include/stdio.h
446 pidwait.o: pidwait.c
447 pidwait.o: ../h/mh.h
448 #pidwait.o: /usr/include/signal.h
449 #pidwait.o: /usr/include/stdio.h
450 #pidwait.o: /usr/include/sys/wait.h
451 pidstatus.o: pidstatus.c
452 pidstatus.o: ../h/mh.h
453 #pidstatus.o: /usr/include/signal.h
454 #pidstatus.o: /usr/include/stdio.h
455 printsw.o: printsw.c
456 printsw.o: ../h/mh.h
457 push.o: push.c
458 push.o: ../h/mh.h
459 #push.o: /usr/include/stdio.h
460 #push.o: /usr/include/signal.h
461 putenv.o: putenv.c
462 putenv.o: ../h/mh.h
463 #putenv.o: /usr/include/stdio.h
464 pwd.o: pwd.c
465 pwd.o: ../h/mh.h
466 pwd.o: ../h/local.h
467 #pwd.o: /usr/include/stdio.h
468 #pwd.o: /usr/include/sys/types.h
469 #pwd.o: /usr/include/sys/stat.h
470 #pwd.o: /usr/include/ndir.h
471 #pwd.o: /usr/include/dir.h
472 refile.o: refile.c
473 refile.o: ../h/mh.h
474 #refile.o: /usr/include/stdio.h
475 remdir.o: remdir.c
476 remdir.o: ../h/mh.h
477 #remdir.o: /usr/include/stdio.h
478 r1bindex.o: r1bindex.c
479 showfile.o: showfile.c
480 showfile.o: ../h/mh.h
481 #showfile.o: /usr/include/stdio.h
482 smatch.o: smatch.c
483 smatch.o: ../h/mh.h
484 sprintb.o: sprintb.c
485 sprintb.o: ../h/mh.h
486 #sprintb.o: /usr/include/stdio.h
487 ssequal.o: ssequal.c
488 strindex.o: strindex.c
489 trimcpy.o: trimcpy.c
490 trimcpy.o: ../h/mh.h
491 #trimcpy.o: /usr/include/ctype.h
492 #trimcpy.o: /usr/include/stdio.h
493 uleq.o: uleq.c
494 uprf.o: uprf.c
495 vfgets.o: vfgets.c
496 vfgets.o: ../h/mh.h
497 #vfgets.o: /usr/include/stdio.h
498 # DEPENDENCIES MUST END AT END OF FILE
499 # IF YOU PUT STUFF HERE IT WILL GO AWAY