2 # Makefile for uip subdirectory
9 top_srcdir = @top_srcdir@
14 exec_prefix = @exec_prefix@
22 HESIOD_INCLUDES = @HESIOD_INCLUDES@
23 INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir) $(HESIOD_INCLUDES)
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)
36 POPLIB = @POPLIB@ $(APOPLIB)
38 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CFLAGS)
39 LINK = $(CC) $(LDFLAGS) -o $@
43 INSTALL_PROGRAM = @INSTALL_PROGRAM@
45 MAIL_SPOOL_GRP = @MAIL_SPOOL_GRP@
46 SETGID_MAIL = @SETGID_MAIL@
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
60 ## removed this from CMDS until I can fix it
63 # commands that are links to other commands
64 LCMDS = flists folders next prev
66 # misc support binaries
67 MISC = ap conflict dp fmtdump install-mh mhl post rcvdist rcvpack \
68 rcvstore rcvtty slocal spost mhtest
70 # commands with 'S'pecial installation needs
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
89 # all files in this directory included in the distribution
92 # ========== DEFAULT TARGET ==========
94 all: $(CMDS) $(MISC) $(SCMDS)
96 # ========= DEPENDENCIES FOR BUILDING ==========
98 ali: ali.o aliasbr.o $(LOCALLIBS)
99 $(LINK) ali.o aliasbr.o $(LINKLIBS)
101 ap: ap.o termsbr.o $(LOCALLIBS)
102 $(LINK) ap.o termsbr.o $(LINKLIBS) $(TERMLIB)
104 anno: anno.o annosbr.o $(LOCALLIBS)
105 $(LINK) anno.o annosbr.o $(LINKLIBS)
107 burst: burst.o $(LOCALLIBS)
108 $(LINK) burst.o $(LINKLIBS)
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)
113 conflict: conflict.o aliasbr.o $(LOCALLIBS)
114 $(LINK) conflict.o aliasbr.o $(LINKLIBS)
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)
119 dp: dp.o termsbr.o $(LOCALLIBS)
120 $(LINK) dp.o termsbr.o $(LINKLIBS) $(TERMLIB)
122 flist: flist.o $(LOCALLIBS)
123 $(LINK) flist.o $(LINKLIBS)
125 fmtdump: fmtdump.o $(LOCALLIBS)
126 $(LINK) fmtdump.o $(LINKLIBS)
128 folder: folder.o $(LOCALLIBS)
129 $(LINK) folder.o $(LINKLIBS)
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)
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)
137 install-mh: install-mh.o $(LOCALLIBS)
138 $(LINK) install-mh.o $(LINKLIBS)
140 mark: mark.o $(LOCALLIBS)
141 $(LINK) mark.o $(LINKLIBS)
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)
146 mhl: mhl.o mhlsbr.o termsbr.o $(LOCALLIBS)
147 $(LINK) mhl.o mhlsbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
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)
152 mhmail: mhmail.o $(LOCALLIBS)
153 $(LINK) mhmail.o $(LINKLIBS)
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)
158 mhparam: mhparam.o $(LOCALLIBS)
159 $(LINK) mhparam.o $(LINKLIBS)
161 mhpath: mhpath.o $(LOCALLIBS)
162 $(LINK) mhpath.o $(LINKLIBS)
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)
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)
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)
173 msgchk: msgchk.o $(POPLIB) $(LOCALLIBS)
174 $(LINK) msgchk.o $(POPLIB) $(LINKLIBS)
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)
179 packf: packf.o dropsbr.o $(LOCALLIBS)
180 $(LINK) packf.o dropsbr.o $(LINKLIBS)
182 pick: pick.o picksbr.o $(LOCALLIBS)
183 $(LINK) pick.o picksbr.o $(LINKLIBS)
185 post: post.o aliasbr.o $(LOCALLIBS)
186 $(LINK) post.o aliasbr.o $(LINKLIBS)
188 prompter: prompter.o $(LOCALLIBS)
189 $(LINK) prompter.o $(LINKLIBS)
191 rcvdist: rcvdist.o distsbr.o $(LOCALLIBS)
192 $(LINK) rcvdist.o distsbr.o $(LINKLIBS)
194 rcvpack: rcvpack.o dropsbr.o $(LOCALLIBS)
195 $(LINK) rcvpack.o dropsbr.o $(LINKLIBS)
197 rcvstore: rcvstore.o $(LOCALLIBS)
198 $(LINK) rcvstore.o $(LINKLIBS)
200 rcvtty: rcvtty.o scansbr.o termsbr.o $(LOCALLIBS)
201 $(LINK) rcvtty.o scansbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
203 refile: refile.o $(LOCALLIBS)
204 $(LINK) refile.o $(LINKLIBS)
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)
209 rmf: rmf.o $(LOCALLIBS)
210 $(LINK) rmf.o $(LINKLIBS)
212 rmm: rmm.o $(LOCALLIBS)
213 $(LINK) rmm.o $(LINKLIBS)
215 scan: scan.o scansbr.o termsbr.o $(LOCALLIBS)
216 $(LINK) scan.o scansbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
218 send: send.o sendsbr.o annosbr.o distsbr.o $(LOCALLIBS)
219 $(LINK) send.o sendsbr.o annosbr.o distsbr.o $(LINKLIBS)
221 show: show.o mhlsbr.o termsbr.o $(LOCALLIBS)
222 $(LINK) show.o mhlsbr.o termsbr.o $(LINKLIBS) $(TERMLIB)
224 slocal: slocal.o aliasbr.o dropsbr.o $(LOCALLIBS)
225 $(LINK) slocal.o aliasbr.o dropsbr.o $(LINKLIBS)
227 sortm: sortm.o $(LOCALLIBS)
228 $(LINK) sortm.o $(LINKLIBS)
230 spost: spost.o aliasbr.o $(LOCALLIBS)
231 $(LINK) spost.o aliasbr.o $(LINKLIBS)
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)
236 vmh: vmh.o vmhsbr.o $(LOCALLIBS)
237 $(LINK) vmh.o vmhsbr.o $(LINKLIBS) $(TERMLIB)
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)
242 whom: whom.o distsbr.o $(LOCALLIBS)
243 $(LINK) whom.o distsbr.o $(LINKLIBS)
245 # ========== DEPENDENCIES FOR INSTALLING ==========
248 install: install-cmds install-lcmds install-misc install-scmds
252 $(top_srcdir)/mkinstalldirs $(bindir)
253 for cmd in $(CMDS); do \
254 $(INSTALL_PROGRAM) $$cmd $(bindir)/$$cmd; \
259 rm -f $(bindir)/flists
260 rm -f $(bindir)/folders
263 $(LN) $(bindir)/flist $(bindir)/flists
264 $(LN) $(bindir)/folder $(bindir)/folders
265 $(LN) $(bindir)/show $(bindir)/prev
266 $(LN) $(bindir)/show $(bindir)/next
268 # install misc support binaries
270 $(top_srcdir)/mkinstalldirs $(libdir)
271 for misc in $(MISC); do \
272 $(INSTALL_PROGRAM) $$misc $(libdir)/$$misc; \
275 # install commands with special installation needs (thus no $(SCMDS) use here)
277 if test x$(SETGID_MAIL) != x; then \
278 $(INSTALL_PROGRAM) -g $(MAIL_SPOOL_GRP) -m 2755 inc $(bindir)/$$cmd; \
280 $(INSTALL_PROGRAM) inc $(bindir)/$$cmd; \
284 for cmd in $(CMDS); do \
285 rm -f $(bindir)/$$cmd; \
287 for lcmd in $(LCMDS); do \
288 rm -f $(bindir)/$$lcmd; \
290 for misc in $(MISC); do \
291 rm -f $(libdir)/$$misc; \
293 for cmd in $(SCMDS); do \
294 rm -f $(bindir)/$$cmd; \
297 # ========== DEPENDENCIES FOR CLEANUP ==========
303 rm -f $(CMDS) $(MISC) $(SCMDS)
310 superclean: realclean
312 # ========== DEPENDENCIES FOR MAINTENANCE ==========
316 Makefile: Makefile.in ../config.status
317 cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
319 distdir = ../`cat ../distname`/$(subdir)
321 @echo "Copying distribution files in $(subdir)"
322 @for file in $(DIST); do \
323 cp -p $(srcdir)/$$file $(distdir); \