BSD 4_4 release
[unix-history] / usr / src / contrib / mh-6.8 / conf / makefiles / zotnetM
CommitLineData
ad787160
C
1##############################################################################
2# Instructions to Make, for compilation of ZOT UIP/utility processes
3#
4# @(MHWARNING)
5# @(#)$Id: zotnetM,v 2.7 1992/10/29 16:25:20 jromine Exp $
6##############################################################################
7
8# The following entries were inserted during MH configuration
9OPTIONS = @(MHOPTIONS)
10
11CC = @(MHCOMPILER)
12@BEGIN: OPTIM
13CFLAGS = $(OPTIONS) -I.
14@END: OPTIM
15@BEGIN: DEBUG
16CFLAGS = $(OPTIONS) -I.
17@END: DEBUG
18LFLAGS = -bhu $(OPTIONS) -I.
19
20LIB = libzot.a
21LLIB = llib-lzotnet
22
23OFILES = mts/mts.o mts/lock.o mts/client.o mf/mf.o \
24@BEGIN: MHMTS
25 mf/mmuu.o mf/uumm.o \
26@END: MHMTS
27 bboards/getbbent.o \
28 tws/dtime.o tws/dtimep.o tws/lexstring.o
29
30MAKE = make DESTDIR=$(DESTDIR) $(MFLAGS)
31SHELL = /bin/sh
32
33DIRS = mts bboards tws mf
34
35
36@BEGIN: OPTIM
37##############################################################################
38# Generation Rules
39##############################################################################
40
41.c.o:; $(CC) $(CFLAGS) -c $*.c
42@BEGIN: NEWLOAD
43 -ld -x -r $@
44 mv a.out $@
45@END: NEWLOAD
46@BEGIN: OLDLOAD
47 cc -s -o $@
48@END: OLDLOAD
49
50
51@END: OPTIM
52
53.c:; echo $@
54
55##############################################################################
56# Generate ZOTnet subroutine library
57##############################################################################
58
59all: allaux $(LIB)
60
61$(LIB): $(OFILES)
62 -mv $@ z$@
63@BEGIN: RANLIB
64 ar r $@ $(OFILES); ranlib $@
65@END: RANLIB
66@BEGIN: LORDER
67 ar r $@ `lorder $(OFILES) | tsort`
68@END: LORDER
69 -@ls -l $@
70 -@echo "ZOTnet library built normally"
71
72allaux:; for d in $(DIRS); do (cd $$d; $(MAKE) all); done
73
74depend:; for d in $(DIRS); do (cd $$d; $(MAKE) depend); done
75
76lint:; for d in $(DIRS); do (cd $$d; $(MAKE) lint); done
77
78
79##############################################################################
80# Installation
81##############################################################################
82
83install: inst-all clean
84
85inst-all:; for d in $(DIRS); do (cd $$d; $(MAKE) inst-all); done
86
87tar:; @for d in $(DIRS); \
88 do (cd $$d; $(MAKE) TFLAGS="$(TFLAGS)" tar); done
89
90uninstall:; for d in $(DIRS); do (cd $$d; $(MAKE) uninstall); done
91
92
93##############################################################################
94# Miscellaneous tasks
95##############################################################################
96
97unconfig:; -rm -f $(LIB) z$(LIB) _* :* *.o core
98 for d in $(DIRS); do (cd $$d; $(MAKE) unconfig); done
99 -rm -f Makefile
100
101distribution:; -rm -f $(LIB) z$(LIB) _* :*
102 for d in $(DIRS); do (cd $$d; $(MAKE) distribution); done
103
104clean:; -rm -f $(LIB) z$(LIB) _* :* *.o core
105 for d in $(DIRS); do (cd $$d; $(MAKE) clean); done
106
107unclean:; -rm -f z$(LIB) _* :* core
108 for d in $(DIRS); do (cd $$d; $(MAKE) unclean); done