]> diplodocus.org Git - nmh/blob - docs/historical/mh-6.8.5/conf/makefiles/zotnet/mts
Silenced warnings when built without iconv.
[nmh] / docs / historical / mh-6.8.5 / conf / makefiles / zotnet / mts
1 ##############################################################################
2 # Instructions to Make, for compilation of ZOT UIP/utility processes
3 #
4 # @(MHWARNING)
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)@(MHBINPATH)
10 ETCDIR = $(DESTDIR)@(MHETCPATH)
11 OPTIONS = @(MHOPTIONS) -I..
12 LDOPTIONS= @(LDOPTIONS)
13 LDOPTLIB= @(LDOPTLIB)
14 CHOWN = @(MHCHOWNPATH)
15 REMOVE = @(MHREMOVE)
16
17 CC = @(MHCOMPILER)
18 @BEGIN: OPTIM
19 CFLAGS = $(OPTIONS)
20 @END: OPTIM
21 @BEGIN: DEBUG
22 CFLAGS = $(OPTIONS)
23 @END: DEBUG
24 LINT = lint
25 LFLAGS = -bhu $(OPTIONS)
26 LDFLAGS = $(LDOPTIONS)
27 LLIBS =
28 LIBES =
29 LDLIBS = $(LIBES) $(LDOPTLIB)
30 FILPROT = 0644
31 PGMPROT = 0755
32
33 OFILES = mts.o lock.o client.o
34 LFILES = l-mts l-lock l-client
35 IFILES = inst-mtstailor
36
37 .c:; echo $@
38
39 ######################################################################
40 # Here it is...
41 ######################################################################
42
43 all: $(OFILES)
44
45 lint: $(LFILES)
46
47 install: inst-all clean
48
49 inst-all: $(IFILES)
50
51 tar:; @touch mtstailor
52 @make -n inst-all > MAKEMTS
53 @chmod +x MAKEMTS
54 tar $(TFLAGS) MAKEMTS mtstailor
55 @rm -f MAKEMTS
56
57 uninstall:;
58 -cd $(ETCDIR); rm -f mtstailor
59
60
61 ##############################################################################
62 # mts
63 ##############################################################################
64
65 mts: mts.o
66
67 l-mts:; $(LINT) $(LFLAGS) mts.c $(LLIBS)
68
69
70 ##############################################################################
71 # lock
72 ##############################################################################
73
74 lock: lock.o
75
76 l-lock:; $(LINT) $(LFLAGS) lock.c $(LLIBS)
77
78
79 ##############################################################################
80 # client
81 ##############################################################################
82
83 client: client.o
84
85 l-client:; $(LINT) $(LFLAGS) client.c $(LLIBS)
86
87
88 ##############################################################################
89 # mtstailor
90 ##############################################################################
91
92 inst-mtstailor: $(ETCDIR)/mtstailor
93
94 $(ETCDIR)/mtstailor: mtstailor
95 -@if [ ! -f $@ ]; then \
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
110 unconfig: distribution
111 -rm -f Makefile
112
113 distribution: clean
114 -rm -f mts.c mtstailor
115
116 clean: unclean
117 -rm -f x* *.o
118
119 unclean:; -rm -f z* _* :* core eddep makedep MAKEMTS
120
121
122 ##############################################################################
123 # Dependencies
124 ##############################################################################
125
126 MODULES = mts lock client
127
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,' \
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
148 mts.o: mts.c
149 mts.o: ../../h/strings.h
150 #mts.o: /usr/include/ctype.h
151 #mts.o: /usr/include/stdio.h
152 mts.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
158 lock.o: lock.c
159 lock.o: ../../h/strings.h
160 #lock.o: /usr/include/stdio.h
161 lock.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
166 client.o: client.c
167 client.o: ../../h/strings.h
168 #client.o: /usr/include/stdio.h
169 client.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