1 ##############################################################################
2 # Instructions to Make, for compilation of ZOT UIP/utility processes
5 # @(#)$Id: mts,v 1.9 1993/08/20 15:56:12 jromine Exp $
6 ##############################################################################
8 # The following entries were inserted during MH configuration
9 BINDIR = $(DESTDIR)@(MHBINPATH)
10 ETCDIR = $(DESTDIR)@(MHETCPATH)
11 OPTIONS = @(MHOPTIONS) -I..
12 LDOPTIONS= @(LDOPTIONS)
14 CHOWN = @(MHCHOWNPATH)
25 LFLAGS = -bhu $(OPTIONS)
26 LDFLAGS = $(LDOPTIONS)
29 LDLIBS = $(LIBES) $(LDOPTLIB)
33 OFILES = mts.o lock.o client.o
34 LFILES = l-mts l-lock l-client
35 IFILES = inst-mtstailor
39 ######################################################################
41 ######################################################################
47 install: inst-all clean
51 tar:; @touch mtstailor
52 @make -n inst-all > MAKEMTS
54 tar $(TFLAGS) MAKEMTS mtstailor
58 -cd $(ETCDIR); rm -f mtstailor
61 ##############################################################################
63 ##############################################################################
67 l-mts:; $(LINT) $(LFLAGS) mts.c $(LLIBS)
70 ##############################################################################
72 ##############################################################################
76 l-lock:; $(LINT) $(LFLAGS) lock.c $(LLIBS)
79 ##############################################################################
81 ##############################################################################
85 l-client:; $(LINT) $(LFLAGS) client.c $(LLIBS)
88 ##############################################################################
90 ##############################################################################
92 inst-mtstailor: $(ETCDIR)/mtstailor
94 $(ETCDIR)/mtstailor: mtstailor
95 -@if [ ! -f $@ ]; then \
96 $(REMOVE) $@ zmtstailor; \
99 echo "Will not overwrite existing $@"; \
101 -@chmod $(FILPROT) $@
106 ##############################################################################
107 # Miscellaneous tasks
108 ##############################################################################
110 unconfig: distribution
114 -rm -f mts.c mtstailor
119 unclean:; -rm -f z* _* :* core eddep makedep MAKEMTS
122 ##############################################################################
124 ##############################################################################
126 MODULES = mts lock client
128 depend:; for m in $(MODULES); do ( \
129 i=`basename $$m .c`; \
130 echo $$i.o: $$i.c >> makedep; \
131 grep '^#[ ]*include' $$i.c | \
132 sed -e 's,[^"]*"/\([^"]*\)".*,'$$i'.o: /\1,' \
133 -e 's,[^"]*"\([^"]*\)".*,'$$i'.o: \1,' \
134 -e 's,[^<]*<\(.*\)>.*,#'$$i'.o: /usr/include/\1,' \
137 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' > eddep
138 echo '$$r makedep' >> eddep
140 cp Makefile _Makefile
141 ed - Makefile < eddep
143 echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
144 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
146 # DO NOT DELETE THIS LINE
147 # DEPENDENCIES START HERE
149 mts.o: ../../h/strings.h
150 #mts.o: /usr/include/ctype.h
151 #mts.o: /usr/include/stdio.h
153 #mts.o: /usr/include/netdb.h
154 #mts.o: /usr/include/whoami.h
155 #mts.o: /usr/include/sys/utsname.h
156 #mts.o: /usr/include/pwd.h
157 #mts.o: /usr/include/fcntl.h
159 lock.o: ../../h/strings.h
160 #lock.o: /usr/include/stdio.h
162 #lock.o: /usr/include/sys/types.h
163 #lock.o: /usr/include/sys/stat.h
164 #lock.o: /usr/include/sys/file.h
165 #lock.o: /usr/include/signal.h
167 client.o: ../../h/strings.h
168 #client.o: /usr/include/stdio.h
170 #client.o: /usr/include/errno.h
171 #client.o: /usr/include/sys/types.h
172 #client.o: /usr/include/sys/socket.h
173 #client.o: /usr/include/netinet/in.h
174 #client.o: /usr/include/netdb.h
175 #client.o: /usr/include/arpa/inet.h
176 # DEPENDENCIES MUST END AT END OF FILE
177 # IF YOU PUT STUFF HERE IT WILL GO AWAY