Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / conf / makefiles / zotnetM
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
9 OPTIONS =       @(MHOPTIONS)
10
11 CC      =       @(MHCOMPILER)
12 @BEGIN: OPTIM
13 CFLAGS  =       $(OPTIONS) -I.
14 @END: OPTIM
15 @BEGIN: DEBUG
16 CFLAGS  =            $(OPTIONS) -I.
17 @END: DEBUG
18 LFLAGS  =       -bhu $(OPTIONS) -I.
19
20 LIB     =       libzot.a
21 LLIB    =       llib-lzotnet
22
23 OFILES  =       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
30 MAKE    =       make DESTDIR=$(DESTDIR) $(MFLAGS)
31 SHELL   =       /bin/sh
32
33 DIRS    =       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
59 all:            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
72 allaux:;        for d in $(DIRS); do (cd $$d; $(MAKE) all); done
73
74 depend:;        for d in $(DIRS); do (cd $$d; $(MAKE) depend); done
75
76 lint:;          for d in $(DIRS); do (cd $$d; $(MAKE) lint); done
77
78
79 ##############################################################################
80 #       Installation
81 ##############################################################################
82
83 install:        inst-all clean
84
85 inst-all:;      for d in $(DIRS); do (cd $$d; $(MAKE) inst-all); done
86
87 tar:;           @for d in $(DIRS); \
88                     do (cd $$d; $(MAKE) TFLAGS="$(TFLAGS)" tar); done
89
90 uninstall:;     for d in $(DIRS); do (cd $$d; $(MAKE) uninstall); done
91
92
93 ##############################################################################
94 #       Miscellaneous tasks
95 ##############################################################################
96
97 unconfig:;      -rm -f $(LIB) z$(LIB) _* :* *.o core
98                 for d in $(DIRS); do (cd $$d; $(MAKE) unconfig); done
99                 -rm -f Makefile
100
101 distribution:;  -rm -f $(LIB) z$(LIB) _* :*
102                 for d in $(DIRS); do (cd $$d; $(MAKE) distribution); done
103
104 clean:;         -rm -f $(LIB) z$(LIB) _* :* *.o core
105                 for d in $(DIRS); do (cd $$d; $(MAKE) clean); done
106
107 unclean:;       -rm -f z$(LIB) _* :* core
108                 for d in $(DIRS); do (cd $$d; $(MAKE) unclean); done