Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / zotnet / mts / Makefile
1 ##############################################################################
2 #    Instructions to Make, for compilation of ZOT UIP/utility processes
3 #
4 #       This file is automatically generated.  Do not edit!
5 # @(#)$Id: mts,v 1.9 1993/08/20 15:56:12 jromine Exp $
6 ##############################################################################
7
8 # The following entries were inserted during MH configuration
9 BINDIR  =       $(DESTDIR)/opt/mh-6.8.5/bin
10 ETCDIR  =       $(DESTDIR)/opt/mh-6.8.5/lib
11 OPTIONS =       -DSYS5 -DSVR4 -DFCNTL -DRENAME -DVSPRINTF -DATTVIBUG -DDBMPWD -DDUMB -DMORE='"/usr/bin/more"' -DMSGPROT='"0600"' -DMSGID -DRPATHS -DSOCKETS -DFOLDPROT='"0711"' -DSHADOW -DSYS5DIR -DMHRC -DMHE -DMIME -DSENDMTS -DSMTP -DSPRINTFTYPE=int -DTYPESIG=void -O -g -I..
12 LDOPTIONS=      -s
13 LDOPTLIB=       -lnsl -lsocket -R/opt/mh-6.8.5/lib
14 CHOWN   =       /usr/bin/chown
15 REMOVE  =       mv -f
16
17 CC      =       cc
18 CFLAGS  =       $(OPTIONS)
19 LINT    =       lint
20 LFLAGS  =       -bhu $(OPTIONS)
21 LDFLAGS =       $(LDOPTIONS)
22 LLIBS   =
23 LIBES   =
24 LDLIBS  =       $(LIBES) $(LDOPTLIB)
25 FILPROT =       0644
26 PGMPROT =       0755
27
28 OFILES  =       mts.o lock.o client.o
29 LFILES  =       l-mts l-lock l-client
30 IFILES  =       inst-mtstailor
31
32 .c:;            echo $@
33
34 ######################################################################
35 #       Here it is...
36 ######################################################################
37
38 all:            $(OFILES)
39
40 lint:           $(LFILES)
41
42 install:        inst-all clean
43
44 inst-all:       $(IFILES)
45
46 tar:;           @touch mtstailor
47                 @make -n inst-all > MAKEMTS
48                 @chmod +x MAKEMTS
49                 tar $(TFLAGS) MAKEMTS mtstailor
50                 @rm -f MAKEMTS
51
52 uninstall:;
53                 -cd $(ETCDIR); rm -f mtstailor
54
55
56 ##############################################################################
57 # mts
58 ##############################################################################
59
60 mts:            mts.o 
61
62 l-mts:;         $(LINT) $(LFLAGS) mts.c $(LLIBS)
63
64
65 ##############################################################################
66 # lock
67 ##############################################################################
68
69 lock:           lock.o 
70
71 l-lock:;        $(LINT) $(LFLAGS) lock.c $(LLIBS)
72
73
74 ##############################################################################
75 # client
76 ##############################################################################
77
78 client:         client.o 
79
80 l-client:;      $(LINT) $(LFLAGS) client.c $(LLIBS)
81
82
83 ##############################################################################
84 # mtstailor
85 ##############################################################################
86
87 inst-mtstailor: $(ETCDIR)/mtstailor
88
89 $(ETCDIR)/mtstailor:    mtstailor
90                 -@if [ ! -f $@ ]; then \
91                     $(REMOVE) $@ zmtstailor; \
92                     cp mtstailor $@; \
93                 else \
94                     echo "Will not overwrite existing $@"; \
95                 fi
96                 -@chmod $(FILPROT) $@
97                 -@ls -l $@
98                 -@echo ""
99
100
101 ##############################################################################
102 #       Miscellaneous tasks
103 ##############################################################################
104
105 unconfig:       distribution
106                 -rm -f Makefile
107
108 distribution:   clean
109                 -rm -f mts.c mtstailor
110
111 clean:          unclean
112                 -rm -f x* *.o
113
114 unclean:;       -rm -f z* _* :* core eddep makedep MAKEMTS
115
116
117 ##############################################################################
118 #       Dependencies
119 ##############################################################################
120
121 MODULES =       mts lock client
122
123 depend:;        for m in $(MODULES); do ( \
124                     i=`basename $$m .c`; \
125                     echo $$i.o: $$i.c >> makedep; \
126                     grep '^#[   ]*include' $$i.c | \
127                         sed -e 's,[^"]*"/\([^"]*\)".*,'$$i'.o: /\1,' \
128                             -e 's,[^"]*"\([^"]*\)".*,'$$i'.o: \1,' \
129                             -e 's,[^<]*<\(.*\)>.*,#'$$i'.o: /usr/include/\1,' \
130                         >> makedep \
131                 ); done
132                 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' > eddep
133                 echo '$$r makedep' >> eddep
134                 echo 'w' >> eddep
135                 cp Makefile _Makefile
136                 ed - Makefile < eddep
137                 rm eddep makedep
138                 echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
139                 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
140
141 # DO NOT DELETE THIS LINE
142 # DEPENDENCIES START HERE
143 mts.o: mts.c
144 mts.o: ../../h/strings.h
145 #mts.o: /usr/include/ctype.h
146 #mts.o: /usr/include/stdio.h
147 mts.o: mts.h
148 #mts.o: /usr/include/netdb.h
149 #mts.o: /usr/include/whoami.h
150 #mts.o: /usr/include/sys/utsname.h
151 #mts.o: /usr/include/pwd.h
152 #mts.o: /usr/include/fcntl.h
153 lock.o: lock.c
154 lock.o: ../../h/strings.h
155 #lock.o: /usr/include/stdio.h
156 lock.o: mts.h
157 #lock.o: /usr/include/sys/types.h
158 #lock.o: /usr/include/sys/stat.h
159 #lock.o: /usr/include/sys/file.h
160 #lock.o: /usr/include/signal.h
161 client.o: client.c
162 client.o: ../../h/strings.h
163 #client.o: /usr/include/stdio.h
164 client.o: mts.h
165 #client.o: /usr/include/errno.h
166 #client.o: /usr/include/sys/types.h
167 #client.o: /usr/include/sys/socket.h
168 #client.o: /usr/include/netinet/in.h
169 #client.o: /usr/include/netdb.h
170 #client.o: /usr/include/arpa/inet.h
171 # DEPENDENCIES MUST END AT END OF FILE
172 # IF YOU PUT STUFF HERE IT WILL GO AWAY