1include ../Makefile.global 2 3top = .. 4CFLAGS = $(GCFLAGS) 5 6ALL = bunbatch c7unbatch cnfsheadconf cnfsstat ctlinnd decode encode \ 7 getlist gunbatch inews innconfval mailpost pullnews \ 8 ovdb_init ovdb_monitor ovdb_server ovdb_stat rnews \ 9 scanspool sm 10 11OPTIONAL = feedone sys2nf 12 13MAN = ../doc/man/mailpost.8 14 15SOURCES = ctlinnd.c decode.c encode.c getlist.c inews.c innconfval.c \ 16 ovdb_init.c ovdb_monitor.c ovdb_server.c ovdb_stat.c rnews.c \ 17 sm.c 18 19EXTRA_SOURCES = feedone.c sys2nf.c 20 21PATHRNEWS = $(PATHBIN)/rnews.libexec 22 23all: $(ALL) $(MAN) 24 25warnings: 26 $(MAKE) COPT='$(WARNINGS)' all 27 28install: all 29 $(LI_INEWS) inews $D$(PATHBIN)/inews 30 $(LI_RNEWS) rnews $D$(PATHBIN)/rnews 31 $(CP_XPRI) cnfsheadconf $D$(PATHBIN)/cnfsheadconf 32 for F in cnfsstat mailpost pullnews scanspool ; do \ 33 $(CP_XPUB) $$F $D$(PATHBIN)/$$F ; \ 34 done 35 for F in ctlinnd ovdb_init ovdb_monitor ovdb_server ovdb_stat ; do \ 36 $(LI_XPRI) $$F $D$(PATHBIN)/$$F ; \ 37 done 38 for F in getlist innconfval sm ; do \ 39 $(LI_XPUB) $$F $D$(PATHBIN)/$$F ; \ 40 done 41 $(CP_XPUB) bunbatch $D$(PATHBIN)/rnews.libexec/bunbatch 42 $(CP_XPUB) c7unbatch $D$(PATHBIN)/rnews.libexec/c7unbatch 43 $(LI_XPUB) decode $D$(PATHBIN)/rnews.libexec/decode 44 $(LI_XPUB) encode $D$(PATHBIN)/rnews.libexec/encode 45 $(CP_XPUB) gunbatch $D$(PATHBIN)/rnews.libexec/gunbatch 46 47bootstrap: $(MAN) 48 49clean clobber distclean: 50 rm -f *.o $(ALL) $(OPTIONAL) 51 rm -rf .libs 52 53maintclean: distclean 54 rm -f $(MAN) 55 56profiled: 57 $(MAKEPROFILING) all 58 59$(FIXSCRIPT): 60 @echo Run configure before running make. See INSTALL for details. 61 @exit 1 62 63 64## Compilation rules. 65 66# $(LIBSTORAGE) must be listed twice to resolve circular dependencies 67# when doing static linking. 68BOTH = $(LIBSTORAGE) $(LIBHIST) $(LIBSTORAGE) $(LIBINN) 69 70LINK = $(LIBLD) $(LDFLAGS) -o $@ 71LINKDEPS = $(LIBLDDEPS) $(LDFLAGS) -o $@ 72INNLIBS = $(LIBINN) $(LIBS) 73STORELIBS = $(BOTH) $(STORAGE_LIBS) $(LIBS) 74 75FIX = $(FIXSCRIPT) 76 77ctlinnd: ctlinnd.o $(LIBINN) ; $(LINK) ctlinnd.o $(INNLIBS) 78decode: decode.o $(LIBINN) ; $(LINK) decode.o $(INNLIBS) 79encode: encode.o ; $(LINK) encode.o 80getlist: getlist.o $(LIBINN) ; $(LINK) getlist.o $(INNLIBS) 81inews: inews.o $(LIBINN) ; $(LINK) inews.o $(INNLIBS) 82innconfval: innconfval.o $(LIBINN) ; $(LINK) innconfval.o $(INNLIBS) 83ovdb_init: ovdb_init.o $(BOTH) 84 $(LINKDEPS) ovdb_init.o $(STORELIBS) 85ovdb_monitor: ovdb_monitor.o $(BOTH) 86 $(LINKDEPS) ovdb_monitor.o $(STORELIBS) 87ovdb_server: ovdb_server.o $(BOTH) 88 $(LINKDEPS) ovdb_server.o $(STORELIBS) 89ovdb_stat: ovdb_stat.o $(BOTH) 90 $(LINKDEPS) ovdb_stat.o $(STORELIBS) 91rnews: rnews.o $(BOTH) ; $(LINK) rnews.o $(STORELIBS) 92sm: sm.o $(BOTH) 93 $(LINKDEPS) sm.o $(STORELIBS) 94 95ovdb_init.o: ovdb_init.c 96 $(CC) $(CFLAGS) $(BDB_CPPFLAGS) -c $< 97 98ovdb_monitor.o: ovdb_monitor.c 99 $(CC) $(CFLAGS) $(BDB_CPPFLAGS) -c $< 100 101ovdb_server.o: ovdb_server.c 102 $(CC) $(CFLAGS) $(BDB_CPPFLAGS) -c $< 103 104ovdb_stat.o: ovdb_stat.c 105 $(CC) $(CFLAGS) $(BDB_CPPFLAGS) -c $< 106 107cnfsheadconf: cnfsheadconf.in $(FIX) ; $(FIX) cnfsheadconf.in 108cnfsstat: cnfsstat.in $(FIX) ; $(FIX) cnfsstat.in 109mailpost: mailpost.in $(FIX) ; $(FIX) mailpost.in 110pullnews: pullnews.in $(FIX) ; $(FIX) pullnews.in 111scanspool: scanspool.in $(FIX) ; $(FIX) scanspool.in 112 113bunbatch: Makefile ../Makefile.global 114 ( echo '#! $(SHELL)' ; echo 'exec $(BZIP2) -d -c' ) > $@ 115 chmod 755 bunbatch 116 117c7unbatch: Makefile ../Makefile.global 118 ( echo '#! $(SHELL)' ; echo 'decode | $(UNCOMPRESS)' ) > $@ 119 chmod 755 c7unbatch 120 121gunbatch: Makefile ../Makefile.global 122 ( echo '#! $(SHELL)' ; echo 'exec $(GZIP) -d -c' ) > $@ 123 chmod 755 gunbatch 124 125## Not normally built. 126feedone: feedone.o $(LIBINN) ; $(LINK) feedone.o $(INNLIBS) 127sys2nf: sys2nf.o $(LIBINN) ; $(LINK) sys2nf.o $(INNLIBS) 128 129$(LIBINN): ; (cd ../lib ; $(MAKE)) 130$(LIBSTORAGE): ; (cd ../storage ; $(MAKE) library) 131$(LIBHIST): ; (cd ../history ; $(MAKE)) 132 133 134../doc/man/mailpost.8: mailpost.in 135 $(POD2MAN) -s 8 -n "MAILPOST" $? > $@ 136 137 138## Dependencies. Default list, below, is probably good enough. 139 140depend: Makefile $(SOURCES) $(EXTRA_SOURCES) 141 $(MAKEDEPEND) '$(CFLAGS)' $(SOURCES) $(EXTRA_SOURCES) 142 143# DO NOT DELETE THIS LINE -- make depend depends on it. 144ctlinnd.o: ctlinnd.c ../include/portable/system.h ../include/config.h \ 145 ../include/inn/macros.h ../include/inn/portable-macros.h \ 146 ../include/inn/options.h ../include/inn/system.h \ 147 ../include/portable/stdbool.h ../include/portable/macros.h \ 148 ../include/portable/stdbool.h ../include/inn/innconf.h \ 149 ../include/inn/macros.h ../include/inn/portable-stdbool.h \ 150 ../include/inn/system.h ../include/inn/messages.h \ 151 ../include/inn/inndcomm.h ../include/inn/libinn.h \ 152 ../include/inn/concat.h ../include/inn/xmalloc.h ../include/inn/xwrite.h \ 153 ../include/inn/paths.h 154decode.o: decode.c ../include/portable/system.h ../include/config.h \ 155 ../include/inn/macros.h ../include/inn/portable-macros.h \ 156 ../include/inn/options.h ../include/inn/system.h \ 157 ../include/portable/stdbool.h ../include/portable/macros.h \ 158 ../include/portable/stdbool.h ../include/inn/messages.h \ 159 ../include/inn/system.h 160encode.o: encode.c ../include/portable/system.h ../include/config.h \ 161 ../include/inn/macros.h ../include/inn/portable-macros.h \ 162 ../include/inn/options.h ../include/inn/system.h \ 163 ../include/portable/stdbool.h ../include/portable/macros.h \ 164 ../include/portable/stdbool.h 165getlist.o: getlist.c ../include/portable/system.h ../include/config.h \ 166 ../include/inn/macros.h ../include/inn/portable-macros.h \ 167 ../include/inn/options.h ../include/inn/system.h \ 168 ../include/portable/stdbool.h ../include/portable/macros.h \ 169 ../include/portable/stdbool.h ../include/inn/innconf.h \ 170 ../include/inn/macros.h ../include/inn/portable-stdbool.h \ 171 ../include/inn/system.h ../include/inn/messages.h ../include/inn/nntp.h \ 172 ../include/inn/qio.h ../include/inn/vector.h ../include/inn/libinn.h \ 173 ../include/inn/concat.h ../include/inn/xmalloc.h ../include/inn/xwrite.h \ 174 ../include/inn/paths.h 175inews.o: inews.c ../include/portable/system.h ../include/config.h \ 176 ../include/inn/macros.h ../include/inn/portable-macros.h \ 177 ../include/inn/options.h ../include/inn/system.h \ 178 ../include/portable/stdbool.h ../include/portable/macros.h \ 179 ../include/portable/stdbool.h ../include/inn/innconf.h \ 180 ../include/inn/macros.h ../include/inn/portable-stdbool.h \ 181 ../include/inn/system.h ../include/inn/libinn.h ../include/inn/concat.h \ 182 ../include/inn/xmalloc.h ../include/inn/xwrite.h \ 183 ../include/inn/messages.h ../include/inn/newsuser.h \ 184 ../include/inn/nntp.h ../include/inn/paths.h 185innconfval.o: innconfval.c ../include/portable/system.h \ 186 ../include/config.h ../include/inn/macros.h \ 187 ../include/inn/portable-macros.h ../include/inn/options.h \ 188 ../include/inn/system.h ../include/portable/stdbool.h \ 189 ../include/portable/macros.h ../include/portable/stdbool.h \ 190 ../include/inn/innconf.h ../include/inn/macros.h \ 191 ../include/inn/portable-stdbool.h ../include/inn/system.h \ 192 ../include/inn/messages.h ../include/inn/version.h \ 193 ../include/inn/libinn.h ../include/inn/concat.h ../include/inn/xmalloc.h \ 194 ../include/inn/xwrite.h 195ovdb_init.o: ovdb_init.c ../include/portable/system.h ../include/config.h \ 196 ../include/inn/macros.h ../include/inn/portable-macros.h \ 197 ../include/inn/options.h ../include/inn/system.h \ 198 ../include/portable/stdbool.h ../include/portable/macros.h \ 199 ../include/portable/stdbool.h ../include/inn/libinn.h \ 200 ../include/inn/macros.h ../include/inn/portable-stdbool.h \ 201 ../include/inn/system.h ../include/inn/concat.h ../include/inn/xmalloc.h \ 202 ../include/inn/xwrite.h ../include/inn/innconf.h \ 203 ../include/inn/messages.h ../include/inn/ov.h ../include/inn/history.h \ 204 ../include/inn/storage.h ../include/inn/options.h ../storage/ovdb/ovdb.h \ 205 ../storage/ovdb/ovdb-private.h 206ovdb_monitor.o: ovdb_monitor.c ../include/portable/system.h \ 207 ../include/config.h ../include/inn/macros.h \ 208 ../include/inn/portable-macros.h ../include/inn/options.h \ 209 ../include/inn/system.h ../include/portable/stdbool.h \ 210 ../include/portable/macros.h ../include/portable/stdbool.h \ 211 ../include/portable/setproctitle.h ../include/inn/innconf.h \ 212 ../include/inn/macros.h ../include/inn/portable-stdbool.h \ 213 ../include/inn/system.h ../include/inn/messages.h \ 214 ../include/inn/libinn.h ../include/inn/concat.h ../include/inn/xmalloc.h \ 215 ../include/inn/xwrite.h ../include/inn/ov.h ../include/inn/history.h \ 216 ../include/inn/storage.h ../include/inn/options.h ../storage/ovdb/ovdb.h \ 217 ../storage/ovdb/ovdb-private.h 218ovdb_server.o: ovdb_server.c ../include/portable/system.h \ 219 ../include/config.h ../include/inn/macros.h \ 220 ../include/inn/portable-macros.h ../include/inn/options.h \ 221 ../include/inn/system.h ../include/portable/stdbool.h \ 222 ../include/portable/macros.h ../include/portable/stdbool.h \ 223 ../include/portable/mmap.h ../include/portable/setproctitle.h \ 224 ../include/portable/socket.h ../include/portable/getaddrinfo.h \ 225 ../include/portable/getnameinfo.h ../include/portable/socket-unix.h \ 226 ../include/inn/fdflag.h ../include/inn/portable-socket.h \ 227 ../include/inn/portable-stdbool.h ../include/inn/system.h \ 228 ../include/inn/innconf.h ../include/inn/macros.h \ 229 ../include/inn/messages.h ../include/inn/libinn.h \ 230 ../include/inn/concat.h ../include/inn/xmalloc.h ../include/inn/xwrite.h \ 231 ../include/inn/paths.h ../include/inn/storage.h ../include/inn/options.h \ 232 ../include/inn/ov.h ../include/inn/history.h ../storage/ovdb/ovdb.h \ 233 ../storage/ovdb/ovdb-private.h 234ovdb_stat.o: ovdb_stat.c ../include/portable/system.h ../include/config.h \ 235 ../include/inn/macros.h ../include/inn/portable-macros.h \ 236 ../include/inn/options.h ../include/inn/system.h \ 237 ../include/portable/stdbool.h ../include/portable/macros.h \ 238 ../include/portable/stdbool.h ../include/inn/innconf.h \ 239 ../include/inn/macros.h ../include/inn/portable-stdbool.h \ 240 ../include/inn/system.h ../include/inn/messages.h \ 241 ../include/inn/libinn.h ../include/inn/concat.h ../include/inn/xmalloc.h \ 242 ../include/inn/xwrite.h ../include/inn/ov.h ../include/inn/history.h \ 243 ../include/inn/storage.h ../include/inn/options.h ../include/inn/paths.h \ 244 ../storage/ovdb/ovdb.h ../storage/ovdb/ovdb-private.h 245rnews.o: rnews.c ../include/portable/system.h ../include/config.h \ 246 ../include/inn/macros.h ../include/inn/portable-macros.h \ 247 ../include/inn/options.h ../include/inn/system.h \ 248 ../include/portable/stdbool.h ../include/portable/macros.h \ 249 ../include/portable/stdbool.h ../include/inn/fdflag.h \ 250 ../include/inn/portable-socket.h ../include/inn/portable-getaddrinfo.h \ 251 ../include/inn/portable-getnameinfo.h ../include/inn/portable-stdbool.h \ 252 ../include/inn/system.h ../include/inn/innconf.h ../include/inn/macros.h \ 253 ../include/inn/libinn.h ../include/inn/concat.h ../include/inn/xmalloc.h \ 254 ../include/inn/xwrite.h ../include/inn/messages.h \ 255 ../include/inn/newsuser.h ../include/inn/nntp.h ../include/inn/paths.h \ 256 ../include/inn/storage.h ../include/inn/options.h ../include/inn/wire.h 257sm.o: sm.c ../include/portable/system.h ../include/config.h \ 258 ../include/inn/macros.h ../include/inn/portable-macros.h \ 259 ../include/inn/options.h ../include/inn/system.h \ 260 ../include/portable/stdbool.h ../include/portable/macros.h \ 261 ../include/portable/stdbool.h ../include/inn/buffer.h \ 262 ../include/inn/portable-stdbool.h ../include/inn/system.h \ 263 ../include/inn/innconf.h ../include/inn/macros.h \ 264 ../include/inn/messages.h ../include/inn/qio.h ../include/inn/wire.h \ 265 ../include/inn/libinn.h ../include/inn/concat.h ../include/inn/xmalloc.h \ 266 ../include/inn/xwrite.h ../include/inn/storage.h \ 267 ../include/inn/options.h 268feedone.o: feedone.c ../include/portable/system.h ../include/config.h \ 269 ../include/inn/macros.h ../include/inn/portable-macros.h \ 270 ../include/inn/options.h ../include/inn/system.h \ 271 ../include/portable/stdbool.h ../include/portable/macros.h \ 272 ../include/portable/stdbool.h ../include/inn/libinn.h \ 273 ../include/inn/macros.h ../include/inn/portable-stdbool.h \ 274 ../include/inn/system.h ../include/inn/concat.h ../include/inn/xmalloc.h \ 275 ../include/inn/xwrite.h ../include/inn/messages.h ../include/inn/nntp.h 276sys2nf.o: sys2nf.c ../include/portable/system.h ../include/config.h \ 277 ../include/inn/macros.h ../include/inn/portable-macros.h \ 278 ../include/inn/options.h ../include/inn/system.h \ 279 ../include/portable/stdbool.h ../include/portable/macros.h \ 280 ../include/portable/stdbool.h ../include/inn/innconf.h \ 281 ../include/inn/macros.h ../include/inn/portable-stdbool.h \ 282 ../include/inn/system.h ../include/inn/libinn.h ../include/inn/concat.h \ 283 ../include/inn/xmalloc.h ../include/inn/xwrite.h ../include/inn/nntp.h \ 284 ../include/inn/paths.h 285