BSD 4_4_Lite1 release
[unix-history] / usr / src / contrib / mh-6.8.3a / conf / makefiles / zotnet / mts
CommitLineData
ad787160
C
1##############################################################################
2# Instructions to Make, for compilation of ZOT UIP/utility processes
3#
4# @(MHWARNING)
ed554bc5 5# @(#)$Id: mts,v 1.9 1993/08/20 15:56:12 jromine Exp $
ad787160
C
6##############################################################################
7
8# The following entries were inserted during MH configuration
9BINDIR = $(DESTDIR)@(MHBINPATH)
10ETCDIR = $(DESTDIR)@(MHETCPATH)
11OPTIONS = @(MHOPTIONS) -I..
12LDOPTIONS= @(LDOPTIONS)
13LDOPTLIB= @(LDOPTLIB)
14CHOWN = @(MHCHOWNPATH)
15REMOVE = @(MHREMOVE)
16
17CC = @(MHCOMPILER)
18@BEGIN: OPTIM
19CFLAGS = $(OPTIONS)
20@END: OPTIM
21@BEGIN: DEBUG
22CFLAGS = $(OPTIONS)
23@END: DEBUG
24LINT = lint
25LFLAGS = -bhu $(OPTIONS)
26LDFLAGS = $(LDOPTIONS)
27LLIBS =
28LIBES =
29LDLIBS = $(LIBES) $(LDOPTLIB)
30FILPROT = 0644
31PGMPROT = 0755
32
33OFILES = mts.o lock.o client.o
34LFILES = l-mts l-lock l-client
35IFILES = inst-mtstailor
36
37.c:; echo $@
38
39######################################################################
40# Here it is...
41######################################################################
42
43all: $(OFILES)
44
45lint: $(LFILES)
46
47install: inst-all clean
48
49inst-all: $(IFILES)
50
51tar:; @touch mtstailor
52 @make -n inst-all > MAKEMTS
53 @chmod +x MAKEMTS
54 tar $(TFLAGS) MAKEMTS mtstailor
55 @rm -f MAKEMTS
56
57uninstall:;
58 -cd $(ETCDIR); rm -f mtstailor
59
60
61##############################################################################
62# mts
63##############################################################################
64
65mts: mts.o
66
67l-mts:; $(LINT) $(LFLAGS) mts.c $(LLIBS)
68
69
70##############################################################################
71# lock
72##############################################################################
73
74lock: lock.o
75
76l-lock:; $(LINT) $(LFLAGS) lock.c $(LLIBS)
77
78
79##############################################################################
80# client
81##############################################################################
82
83client: client.o
84
85l-client:; $(LINT) $(LFLAGS) client.c $(LLIBS)
86
87
88##############################################################################
89# mtstailor
90##############################################################################
91
92inst-mtstailor: $(ETCDIR)/mtstailor
93
94$(ETCDIR)/mtstailor: mtstailor
ed554bc5 95 -@if [ ! -f $@ ]; then \
ad787160
C
96 $(REMOVE) $@ zmtstailor; \
97 cp mtstailor $@; \
98 else \
99 echo "Will not overwrite existing $@"; \
100 fi
101 -@chmod $(FILPROT) $@
102 -@ls -l $@
103 -@echo ""
104
105
106##############################################################################
107# Miscellaneous tasks
108##############################################################################
109
110unconfig: distribution
111 -rm -f Makefile
112
113distribution: clean
114 -rm -f mts.c mtstailor
115
116clean: unclean
117 -rm -f x* *.o
118
119unclean:; -rm -f z* _* :* core eddep makedep MAKEMTS
120
121
122##############################################################################
123# Dependencies
124##############################################################################
125
126MODULES = mts lock client
127
128depend:; 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,' \
135 >> makedep \
136 ); done
137 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' > eddep
138 echo '$$r makedep' >> eddep
139 echo 'w' >> eddep
140 cp Makefile _Makefile
141 ed - Makefile < eddep
142 rm eddep makedep
143 echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
144 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
145
146# DO NOT DELETE THIS LINE
147# DEPENDENCIES START HERE
148mts.o: mts.c
149mts.o: ../../h/strings.h
150#mts.o: /usr/include/ctype.h
151#mts.o: /usr/include/stdio.h
152mts.o: mts.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
158lock.o: lock.c
159lock.o: ../../h/strings.h
160#lock.o: /usr/include/stdio.h
161lock.o: mts.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
166client.o: client.c
167client.o: ../../h/strings.h
168#client.o: /usr/include/stdio.h
169client.o: mts.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