1 ##############################################################################
2 # Instructions to Make, for compilation of MH modules
5 # @(#)$Id: sbr,v 2.21 1993/02/26 19:01:31 jromine Exp $
6 ##############################################################################
18 LFLAGS = -bhu $(OPTIONS)
29 LIBS = shared libmh.a libmh.so $(LIBSA)
31 SLIBDIR = $(DESTDIR)@(SLIBDIR)
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 \
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
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 \
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
75 ODEFS = formatdef.o m_msgdef.o
79 ##############################################################################
81 ##############################################################################
86 $(CC) $(CFLAGS) -c $(SLFLAGS) $*.c
90 $(CC) $(CFLAGS) -c $*.c
100 ##############################################################################
101 # Generate MH subroutine library
102 ##############################################################################
109 ar r $@ $(OFILES); ranlib $@
112 ar r $@ `lorder $(OFILES) | tsort`
115 -@echo "MH library built normally"
121 (cd shared; ld -o ../$@ -assert pure-text $(OFILES))
124 (cd shared; ld -G -o ../$@ -h $@.$(SLIBVER) $(OFILES))
126 -@rm -f $@.$(SLIBVER)
129 -@echo "MH shared library built normally"
135 ar r $@ $(ODEFS); ranlib $@
138 ar r $@ `lorder $(ODEFS) | tsort`
140 -@rm -f $@.$(SLIBVER)
143 -@echo "MH data interface description built normally"
146 shared:; @if [ -d shared ]; then exit 0; else set -x; mkdir shared; fi
149 ##############################################################################
150 # Miscellaneous tasks
151 ##############################################################################
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"
162 -rm -f $(SLIBDIR)/libmh.sa.$(SLIBVER)
163 cp libmh.sa.$(SLIBVER) $(SLIBDIR)/libmh.sa.$(SLIBVER)
164 -@chmod $(PGMPROT) $(SLIBDIR)/libmh.sa.$(SLIBVER)
166 cd $(SLIBDIR); ranlib libmh.sa.$(SLIBVER)
168 -@ls -l $(SLIBDIR)/libmh.sa.*
169 -@echo "Data interface description installed normally"
177 lint:; $(LINT) $(LFLAGS) $(CFILES) $(LLIBS)
179 unconfig: distribution
192 unclean:; -rm -f zlibmh.* _* :* core eddep makedep
195 ##############################################################################
196 # MODIFICATIONS -- Adding a new routine (e.g., pickle)
197 ##############################################################################
200 # Add any new .c files to CFILES
201 # Add any new .o files to OFILES
204 # Under the "Dependencies" section, add a line for pickle.o
205 # pickle.o: ../h/mh.h
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
212 ##############################################################################
214 ##############################################################################
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,' \
227 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' > eddep
228 echo '$$r makedep' >> eddep
230 cp Makefile _Makefile
231 ed - Makefile < eddep
233 echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
234 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
236 # DO NOT DELETE THIS LINE
237 # DEPENDENCIES START HERE
240 #add.o: /usr/include/stdio.h
243 admonish.o: admonish.c
244 admonish.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
260 #ambigsw.o: /usr/include/stdio.h
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
269 #concat.o: /usr/include/stdio.h
270 #concat.o: /usr/include/varargs.h
275 #cpydata.o: /usr/include/stdio.h
278 #cpydgst.o: /usr/include/stdio.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
288 fdcompare.o: fdcompare.c
289 fdcompare.o: ../h/mh.h
290 #fdcompare.o: /usr/include/stdio.h
293 #gans.o: /usr/include/stdio.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
304 #getcpy.o: /usr/include/stdio.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
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
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
354 #m_find.o: /usr/include/stdio.h
357 #m_fmsg.o: /usr/include/stdio.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
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
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
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
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
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
439 #makedir.o: /usr/include/stdio.h
442 #path.o: /usr/include/stdio.h
445 #peekc.o: /usr/include/stdio.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
459 #push.o: /usr/include/stdio.h
460 #push.o: /usr/include/signal.h
463 #putenv.o: /usr/include/stdio.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
474 #refile.o: /usr/include/stdio.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
486 #sprintb.o: /usr/include/stdio.h
488 strindex.o: strindex.c
491 #trimcpy.o: /usr/include/ctype.h
492 #trimcpy.o: /usr/include/stdio.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