Added getpass to SRCS and OBJS.
[mmh] / uip / Makefile.in
1 #
2 # Makefile for uip subdirectory
3 #
4 # $Id$
5 #
6
7 SHELL = /bin/sh
8
9 top_srcdir = @top_srcdir@
10 srcdir     = @srcdir@
11 VPATH      = @srcdir@
12
13 prefix      = @prefix@
14 exec_prefix = @exec_prefix@
15 bindir      = @bindir@
16 libdir      = @libdir@
17 etcdir      = @sysconfdir@
18
19 CC       = @CC@
20 CFLAGS   = @CFLAGS@
21 DEFS     = @DEFS@
22 HESIOD_INCLUDES = @HESIOD_INCLUDES@
23 INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir) $(HESIOD_INCLUDES)
24 LDFLAGS  = @LDFLAGS@
25
26 LIBS     = @LIBS@
27 MTSLIB   = @MTSLIB@
28 KRB4_LIBS = @KRB4_LIBS@
29 HESIOD_LIBS = @HESIOD_LIBS@
30 LOCALLIBS = ../config/version.o ../config/config.o ../sbr/libmh.a ../$(MTSLIB) ../zotnet/libzot.a
31 LINKLIBS = $(LOCALLIBS) $(KRB4_LIBS) $(HESIOD_LIBS) $(LIBS)
32
33 TERMLIB = @TERMLIB@
34 LEXLIB  = @LEXLIB@
35 APOPLIB = @APOPLIB@
36 POPLIB  = @POPLIB@ $(APOPLIB)
37
38 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
39 LINK    = $(CC) $(LDFLAGS) -o $@
40 LN = ln
41
42 INSTALL         = @INSTALL@
43 INSTALL_PROGRAM = @INSTALL_PROGRAM@
44
45 MAIL_SPOOL_GRP = @MAIL_SPOOL_GRP@
46 SETGID_MAIL    = @SETGID_MAIL@
47
48 .SUFFIXES:
49 .SUFFIXES: .c .o
50
51 .c.o:
52         $(COMPILE) $<
53
54 # commands to build
55 CMDS = ali anno burst comp dist flist folder forw mark mhbuild \
56        mhlist mhmail mhn mhparam mhpath mhshow mhstore msgchk \
57        msh packf pick prompter refile repl rmf rmm scan send show \
58        sortm viamail whatnow whom
59
60 ## removed this from CMDS until I can fix it
61 ## OTHERCMDS = vmh
62
63 # commands that are links to other commands
64 LCMDS = flists folders next prev
65
66 # misc support binaries
67 MISC = ap conflict dp fmtdump install-mh mhl post rcvdist rcvpack \
68        rcvstore rcvtty slocal spost mhtest
69
70 # commands with 'S'pecial installation needs
71 SCMDS = inc
72
73 # source files
74 SRCS = ali.c aliasbr.c anno.c annosbr.c ap.c burst.c comp.c \
75        conflict.c dist.c distsbr.c dp.c dropsbr.c flist.c fmtdump.c \
76        folder.c forw.c ftpsbr.c inc.c install-mh.c mark.c md5.c mhbuild.c \
77        mhbuildsbr.c mhcachesbr.c mhfree.c mhl.c mhlist.c mhlistsbr.c mhlsbr.c \
78        mhmail.c mhmisc.c mhn.c mhoutsbr.c mhparam.c mhparse.c mhpath.c mhshow.c \
79        mhshowsbr.c mhstore.c mhstoresbr.c mhtest.c msgchk.c msh.c mshcmds.c packf.c \
80        pick.c picksbr.c popi.c popsbr.c post.c prompter.c rcvdist.c rcvpack.c \
81        rcvstore.c rcvtty.c refile.c repl.c replsbr.c rmf.c rmm.c scan.c \
82        scansbr.c send.c sendsbr.c show.c slocal.c sortm.c spost.c \
83        termsbr.c viamail.c vmh.c vmhsbr.c vmhtest.c whatnow.c whatnowproc.c \
84        whatnowsbr.c whom.c wmh.c
85
86 # auxiliary files
87 AUX = Makefile.in
88
89 # all files in this directory included in the distribution
90 DIST = $(SRCS) $(AUX)
91
92 # ========== DEFAULT TARGET ==========
93
94 all: $(CMDS) $(MISC) $(SCMDS)
95
96 # ========= DEPENDENCIES FOR BUILDING ==========
97
98 ali: ali.o aliasbr.o $(LOCALLIBS)
99         $(LINK) ali.o aliasbr.o $(LINKLIBS)
100
101 ap: ap.o termsbr.o $(LOCALLIBS)
102         $(LINK) ap.o termsbr.o $(LINKLIBS) $(TERMLIB)
103
104 anno: anno.o annosbr.o $(LOCALLIBS)
105         $(LINK) anno.o annosbr.o $(LINKLIBS)
106
107 burst: burst.o $(LOCALLIBS)
108         $(LINK) burst.o $(LINKLIBS)
109
110 comp: comp.o whatnowproc.o whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LOCALLIBS)
111         $(LINK) comp.o whatnowproc.o whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LINKLIBS)
112
113 conflict: conflict.o aliasbr.o $(LOCALLIBS)
114         $(LINK) conflict.o aliasbr.o $(LINKLIBS)
115
116 dist: dist.o whatnowproc.o whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LOCALLIBS)
117         $(LINK) dist.o whatnowproc.o whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LINKLIBS)
118
119 dp: dp.o termsbr.o $(LOCALLIBS)
120         $(LINK) dp.o termsbr.o $(LINKLIBS) $(TERMLIB)
121
122 flist: flist.o $(LOCALLIBS)
123         $(LINK) flist.o $(LINKLIBS)
124
125 fmtdump: fmtdump.o $(LOCALLIBS)
126         $(LINK) fmtdump.o $(LINKLIBS)
127
128 folder: folder.o $(LOCALLIBS)
129         $(LINK) folder.o $(LINKLIBS)
130
131 forw: forw.o whatnowproc.o whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LOCALLIBS)
132         $(LINK) forw.o whatnowproc.o whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LINKLIBS)
133
134 inc: inc.o scansbr.o dropsbr.o termsbr.o $(POPLIB) $(LOCALLIBS)
135         $(LINK) inc.o scansbr.o dropsbr.o termsbr.o $(POPLIB) $(LINKLIBS) $(TERMLIB)
136
137 install-mh: install-mh.o $(LOCALLIBS)
138         $(LINK) install-mh.o $(LINKLIBS)
139
140 mark: mark.o $(LOCALLIBS)
141         $(LINK) mark.o $(LINKLIBS)
142
143 mhbuild: mhbuild.o mhbuildsbr.o mhcachesbr.o mhlistsbr.o mhoutsbr.o mhmisc.o mhfree.o ftpsbr.o termsbr.o md5.o $(LOCALLIBS)
144         $(LINK) mhbuild.o mhbuildsbr.o mhcachesbr.o mhlistsbr.o mhoutsbr.o mhmisc.o mhfree.o ftpsbr.o md5.o $(LINKLIBS) $(TERMLIB)
145
146 mhl: mhl.o mhlsbr.o termsbr.o $(LOCALLIBS)
147         $(LINK) mhl.o mhlsbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
148
149 mhlist: mhlist.o mhparse.o mhcachesbr.o mhlistsbr.o mhmisc.o mhfree.o ftpsbr.o termsbr.o md5.o $(LOCALLIBS)
150         $(LINK) mhlist.o mhparse.o mhcachesbr.o mhlistsbr.o mhmisc.o mhfree.o ftpsbr.o termsbr.o md5.o $(LINKLIBS) $(TERMLIB)
151
152 mhmail: mhmail.o $(LOCALLIBS)
153         $(LINK) mhmail.o $(LINKLIBS)
154
155 mhn: mhn.o mhparse.o mhcachesbr.o mhshowsbr.o mhlistsbr.o mhstoresbr.o mhmisc.o mhfree.o ftpsbr.o termsbr.o md5.o $(LOCALLIBS)
156         $(LINK) mhn.o mhparse.o mhcachesbr.o mhshowsbr.o mhlistsbr.o mhstoresbr.o mhmisc.o mhfree.o ftpsbr.o termsbr.o md5.o $(LINKLIBS) $(TERMLIB)
157
158 mhparam: mhparam.o $(LOCALLIBS)
159         $(LINK) mhparam.o $(LINKLIBS)
160
161 mhpath: mhpath.o $(LOCALLIBS)
162         $(LINK) mhpath.o $(LINKLIBS)
163
164 mhshow: mhshow.o mhparse.o mhcachesbr.o mhshowsbr.o mhlistsbr.o mhmisc.o mhfree.o ftpsbr.o termsbr.o md5.o $(LOCALLIBS)
165         $(LINK) mhshow.o mhparse.o mhcachesbr.o mhshowsbr.o mhlistsbr.o mhmisc.o mhfree.o ftpsbr.o termsbr.o md5.o $(LINKLIBS) $(TERMLIB)
166
167 mhstore: mhstore.o mhparse.o mhcachesbr.o mhshowsbr.o mhlistsbr.o mhstoresbr.o mhmisc.o mhfree.o ftpsbr.o termsbr.o md5.o $(LOCALLIBS)
168         $(LINK) mhstore.o mhparse.o mhcachesbr.o mhshowsbr.o mhlistsbr.o mhstoresbr.o mhmisc.o mhfree.o ftpsbr.o termsbr.o md5.o $(LINKLIBS) $(TERMLIB)
169
170 mhtest: mhtest.o mhparse.o mhcachesbr.o mhoutsbr.o mhmisc.o mhfree.o ftpsbr.o termsbr.o md5.o $(LOCALLIBS)
171         $(LINK) mhtest.o mhparse.o mhcachesbr.o mhoutsbr.o mhmisc.o mhfree.o ftpsbr.o termsbr.o md5.o $(LINKLIBS) $(TERMLIB)
172
173 msgchk: msgchk.o $(POPLIB) $(LOCALLIBS)
174         $(LINK) msgchk.o $(POPLIB) $(LINKLIBS)
175
176 msh: msh.o mshcmds.o vmhsbr.o picksbr.o scansbr.o dropsbr.o mhlsbr.o termsbr.o $(LOCALLIBS)
177         $(LINK) msh.o mshcmds.o vmhsbr.o picksbr.o scansbr.o dropsbr.o mhlsbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
178
179 packf: packf.o dropsbr.o $(LOCALLIBS)
180         $(LINK) packf.o dropsbr.o $(LINKLIBS)
181
182 pick: pick.o picksbr.o $(LOCALLIBS)
183         $(LINK) pick.o picksbr.o $(LINKLIBS)
184
185 post: post.o aliasbr.o $(LOCALLIBS)
186         $(LINK) post.o aliasbr.o $(LINKLIBS)
187
188 prompter: prompter.o $(LOCALLIBS)
189         $(LINK) prompter.o $(LINKLIBS)
190
191 rcvdist: rcvdist.o distsbr.o $(LOCALLIBS)
192         $(LINK) rcvdist.o distsbr.o $(LINKLIBS)
193
194 rcvpack: rcvpack.o dropsbr.o $(LOCALLIBS)
195         $(LINK) rcvpack.o dropsbr.o $(LINKLIBS)
196
197 rcvstore: rcvstore.o $(LOCALLIBS)
198         $(LINK) rcvstore.o $(LINKLIBS)
199
200 rcvtty: rcvtty.o scansbr.o termsbr.o $(LOCALLIBS)
201         $(LINK) rcvtty.o scansbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
202
203 refile: refile.o $(LOCALLIBS)
204         $(LINK) refile.o $(LINKLIBS)
205
206 repl: repl.o replsbr.o whatnowproc.o whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LOCALLIBS)
207         $(LINK) repl.o replsbr.o whatnowproc.o whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LINKLIBS)
208
209 rmf: rmf.o $(LOCALLIBS)
210         $(LINK) rmf.o $(LINKLIBS)
211
212 rmm: rmm.o $(LOCALLIBS)
213         $(LINK) rmm.o $(LINKLIBS)
214
215 scan: scan.o scansbr.o termsbr.o $(LOCALLIBS)
216         $(LINK) scan.o scansbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
217
218 send: send.o sendsbr.o annosbr.o distsbr.o $(LOCALLIBS)
219         $(LINK) send.o sendsbr.o annosbr.o distsbr.o $(LINKLIBS)
220
221 show: show.o mhlsbr.o termsbr.o $(LOCALLIBS)
222         $(LINK) show.o mhlsbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
223
224 slocal: slocal.o aliasbr.o dropsbr.o $(LOCALLIBS)
225         $(LINK) slocal.o aliasbr.o dropsbr.o $(LINKLIBS)
226
227 sortm: sortm.o $(LOCALLIBS)
228         $(LINK) sortm.o $(LINKLIBS)
229
230 spost: spost.o aliasbr.o $(LOCALLIBS)
231         $(LINK) spost.o aliasbr.o $(LINKLIBS)
232
233 viamail: viamail.o mhmisc.o mhoutsbr.o sendsbr.o annosbr.o distsbr.o $(LOCALLIBS)
234         $(LINK) viamail.o mhmisc.o mhoutsbr.o sendsbr.o annosbr.o distsbr.o $(LINKLIBS) $(TERMLIB)
235
236 vmh: vmh.o vmhsbr.o $(LOCALLIBS)
237         $(LINK) vmh.o vmhsbr.o $(LINKLIBS) $(TERMLIB)
238
239 whatnow: whatnow.o whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LOCALLIBS)
240         $(LINK) whatnow.o whatnowsbr.o sendsbr.o annosbr.o distsbr.o $(LINKLIBS)
241
242 whom: whom.o distsbr.o $(LOCALLIBS)
243         $(LINK) whom.o distsbr.o $(LINKLIBS)
244
245 # ========== DEPENDENCIES FOR INSTALLING ==========
246
247 # install everything
248 install: install-cmds install-lcmds install-misc install-scmds
249
250 # install commands
251 install-cmds:
252         $(top_srcdir)/mkinstalldirs $(bindir)
253         for cmd in $(CMDS); do \
254           $(INSTALL_PROGRAM) $$cmd $(bindir)/$$cmd; \
255         done
256
257 # install links
258 install-lcmds:
259         rm -f $(bindir)/flists
260         rm -f $(bindir)/folders
261         rm -f $(bindir)/prev
262         rm -f $(bindir)/next
263         $(LN) $(bindir)/flist  $(bindir)/flists
264         $(LN) $(bindir)/folder $(bindir)/folders
265         $(LN) $(bindir)/show   $(bindir)/prev
266         $(LN) $(bindir)/show   $(bindir)/next
267
268 # install misc support binaries
269 install-misc:
270         $(top_srcdir)/mkinstalldirs $(libdir)
271         for misc in $(MISC); do \
272           $(INSTALL_PROGRAM) $$misc $(libdir)/$$misc; \
273         done
274
275 # install commands with special installation needs (thus no $(SCMDS) use here)
276 install-scmds:
277         if test x$(SETGID_MAIL) != x; then \
278           $(INSTALL_PROGRAM) -g $(MAIL_SPOOL_GRP) -m 2755 inc $(bindir)/$$cmd; \
279         else \
280           $(INSTALL_PROGRAM)                 inc $(bindir)/$$cmd; \
281         fi
282
283 uninstall:
284         for cmd in $(CMDS); do \
285           rm -f $(bindir)/$$cmd; \
286         done
287         for lcmd in $(LCMDS); do \
288           rm -f $(bindir)/$$lcmd; \
289         done
290         for misc in $(MISC); do \
291           rm -f $(libdir)/$$misc; \
292         done
293         for cmd in $(SCMDS); do \
294           rm -f $(bindir)/$$cmd; \
295         done
296
297 # ========== DEPENDENCIES FOR CLEANUP ==========
298
299 mostlyclean:
300         rm -f *.o *~
301
302 clean: mostlyclean
303         rm -f $(CMDS) $(MISC) $(SCMDS)
304
305 distclean: clean
306         rm -f Makefile
307
308 realclean: distclean
309
310 superclean: realclean
311
312 # ========== DEPENDENCIES FOR MAINTENANCE ==========
313
314 subdir = uip
315
316 Makefile: Makefile.in ../config.status
317         cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
318
319 distdir = ../`cat ../distname`/$(subdir)
320 nmhdist: $(DIST)
321         @echo "Copying distribution files in $(subdir)"
322         @for file in $(DIST); do \
323           cp -p $(srcdir)/$$file $(distdir); \
324         done
325