| 1 |
* |
| 2 |
* DO NOT CHANGE THIS MAKEFILE DIRECTLY |
| 3 |
* |
| 4 |
* THERE ARE NO CONFIGURATION PARAMETERS IN THIS FILE |
| 5 |
* |
| 6 |
|
| 7 |
#include "config.h" |
| 8 |
#undef global |
| 9 |
#undef SHELL |
| 10 |
|
| 11 |
#ifndef COMPILER_FLAGS |
| 12 |
#define COMPILER_FLAGS |
| 13 |
#endif |
| 14 |
|
| 15 |
#ifndef EXTRA_LIB |
| 16 |
#define EXTRA_LIB |
| 17 |
#endif |
| 18 |
|
| 19 |
#ifndef LOADER_FLAGS |
| 20 |
#define LOADER_FLAGS |
| 21 |
#endif |
| 22 |
|
| 23 |
#ifndef NNTP |
| 24 |
#undef NNTP_EXTRA_LIB |
| 25 |
#endif |
| 26 |
|
| 27 |
#ifndef NNTP_EXTRA_LIB |
| 28 |
#define NNTP_EXTRA_LIB |
| 29 |
#endif |
| 30 |
|
| 31 |
* Symmetry style parallel make |
| 32 |
|
| 33 |
#undef PARALLEL |
| 34 |
#ifdef PARALLEL_MAKE |
| 35 |
#define PARALLEL & |
| 36 |
#else |
| 37 |
#define PARALLEL |
| 38 |
#endif |
| 39 |
|
| 40 |
#ifdef ACCOUNTING |
| 41 |
#define ACCOUNT nnacct |
| 42 |
#else |
| 43 |
#ifdef AUTHORIZE |
| 44 |
#define ACCOUNT nnacct |
| 45 |
#else |
| 46 |
#define ACCOUNT |
| 47 |
#endif |
| 48 |
#endif |
| 49 |
------------------ MAKE WILL CUT HERE ------------- |
| 50 |
* |
| 51 |
* Notice: ymakefile is made from xmakefile by the Makefile. |
| 52 |
* |
| 53 |
|
| 54 |
CC = COMPILER |
| 55 |
CPP = PREPROC |
| 56 |
LDFLAGS = LDEBUG LOADER_FLAGS EXTRA_LIB |
| 57 |
CFLAGS = -Iconf COMPILER_FLAGS CDEBUG |
| 58 |
|
| 59 |
* |
| 60 |
* Resulting programs |
| 61 |
* |
| 62 |
|
| 63 |
BIN_PROG = nn nnusage nngrab nnstats ACCOUNT |
| 64 |
BIN_LINK = nncheck nnadmin nntidy nngoback nngrep nnpost nnbatch nnview |
| 65 |
LIB_PROG = aux upgrade_rc |
| 66 |
#ifdef NOV |
| 67 |
MASTER_PROG = back_act nnspew |
| 68 |
NN.1 = nn.1.nov |
| 69 |
#else |
| 70 |
MASTER_PROG = nnmaster back_act nnspew |
| 71 |
NN.1 = nn.1.nnmaster |
| 72 |
#endif |
| 73 |
|
| 74 |
* |
| 75 |
* Compilation |
| 76 |
* |
| 77 |
|
| 78 |
SHELL = /bin/sh |
| 79 |
|
| •80 |
MASTER = master.o collect.o expire.o proto.o hostname.o \\ |
| 81 |
global.o options.o active.o db.o nntp.o \\ |
| 82 |
pack_date.o pack_name.o pack_subject.o news.o digest.o |
| 83 |
|
| •84 |
NN = nn.o admin.o proto.o global.o options.o db.o nntp.o \\ |
| 85 |
init.o variable.o term.o keymap.o macro.o regexp.o \\ |
| 86 |
menu.o more.o newsrc.o group.o folder.o dir.o aux.o \\ |
| 87 |
sort.o articles.o sequence.o kill.o active.o fullname.o \\ |
| 88 |
answer.o reroute.o hostname.o save.o unshar.o decode.o execute.o \\ |
| 89 |
pack_date.o pack_name.o pack_subject.o news.o digest.o match.o \\ |
| 90 |
chset.o printconf.o |
| 91 |
#ifdef NOV |
| 92 |
NOVOBJ = awksplit.o hash.o hdbm.o libnov.o split.o |
| 93 |
#else |
| 94 |
NOVOBJ = |
| 95 |
#endif |
| 96 |
|
| 97 |
ACCT = account.o global.o options.o proto.o hostname.o |
| 98 |
|
| 99 |
|
| 100 |
all: $(BIN_PROG) $(LIB_PROG) $(MASTER_PROG) inst |
| 101 |
|
| 102 |
client: $(BIN_PROG) $(LIB_PROG) inst |
| 103 |
|
| 104 |
master: $(MASTER_PROG) inst |
| 105 |
|
| 106 |
nn: PARALLEL $(NN) $(NOVOBJ) |
| 107 |
@echo linking nn |
| 108 |
@$(CC) -o nn $(CFLAGS) $(NN) $(NOVOBJ) $(LDFLAGS) TERMLIB NNTP_EXTRA_LIB |
| 109 |
|
| 110 |
nnmaster: PARALLEL $(MASTER) |
| 111 |
@echo linking nnmaster |
| 112 |
@$(CC) -o nnmaster $(CFLAGS) $(MASTER) $(LDFLAGS) NNTP_EXTRA_LIB |
| 113 |
|
| 114 |
nnstats: nnstats.sh prefix |
| 115 |
cat prefix nnstats.sh > nnstats ; chmod +x nnstats |
| 116 |
|
| 117 |
nnusage: nnusage.sh prefix |
| 118 |
cat prefix nnusage.sh > nnusage ; chmod +x nnusage |
| 119 |
|
| 120 |
nngrab: nngrab.sh prefix |
| 121 |
cat prefix nngrab.sh > nngrab ; chmod +x nngrab |
| 122 |
|
| 123 |
aux: aux.sh prefix |
| 124 |
cat prefix aux.sh > aux ; chmod +x aux |
| 125 |
|
| 126 |
upgrade_rc: upgrade_rc.sh prefix |
| 127 |
cat prefix upgrade_rc.sh > upgrade_rc ; chmod +x upgrade_rc |
| 128 |
|
| 129 |
nnacct: PARALLEL $(ACCT) |
| 130 |
@echo linking nnacct |
| 131 |
@$(CC) -o nnacct $(CFLAGS) $(ACCT) $(LDFLAGS) |
| 132 |
|
| 133 |
back_act: back_act.sh prefix |
| 134 |
cat prefix back_act.sh > back_act ; chmod +x back_act |
| 135 |
|
| 136 |
nnspew: nnspew.sh prefix |
| 137 |
cat prefix nnspew.sh > nnspew ; chmod +x nnspew |
| 138 |
|
| 139 |
prefix: config.h mkprefix |
| 140 |
./mkprefix prefix < /dev/null > prefix |
| 141 |
|
| 142 |
mkprefix: PARALLEL prefix.o global.o |
| 143 |
$(CC) -o mkprefix $(CFLAGS) prefix.o global.o $(LDFLAGS) |
| 144 |
|
| 145 |
* |
| 146 |
* Configuration counter updating |
| 147 |
* |
| 148 |
|
| 149 |
update.h: config.h patchlevel.h Makefile |
| 150 |
@sh -c "[ -f update.h ] || (echo 0 > update.h)" |
| 151 |
@sh -c "expr `cat update.h` + 1 > update1.h && mv update1.h update.h" |
| 152 |
@echo configuration number updated to `cat update.h` |
| 153 |
|
| 154 |
* |
| 155 |
* Installation |
| 156 |
* |
| 157 |
|
| 158 |
cvt-help: PARALLEL config.h cvt-help.c |
| 159 |
$(CC) -o cvt-help cvt-help.c $(LDFLAGS) |
| 160 |
|
| 161 |
usercheck: PARALLEL config.h usercheck.c |
| 162 |
$(CC) -o usercheck usercheck.c $(LDFLAGS) |
| 163 |
|
| 164 |
inst: config.h xmakefile inst.sh cvt-help usercheck mkprefix man/nn.1 |
| 165 |
@echo building install script: ./inst |
| 166 |
@./mkprefix full < /dev/null > inst |
| 167 |
@echo BIN_PROG='"'$(BIN_PROG)'"' >> inst |
| 168 |
@echo BIN_LINK='"'$(BIN_LINK)'"' >> inst |
| 169 |
@echo LIB_PROG='"'$(LIB_PROG)'"' >> inst |
| 170 |
@echo MASTER_PROG='"'$(MASTER_PROG)'"' >> inst |
| 171 |
@cat inst.sh >> inst |
| 172 |
@chmod 755 inst |
| 173 |
|
| 174 |
* create the proper man page |
| 175 |
|
| 176 |
man/nn.1: man/nn.1.nov man/nn.1.nnmaster |
| 177 |
cp -p man/$(NN.1) man/nn.1 |
| 178 |
|
| 179 |
* |
| 180 |
* Clean -- remove compiled programs |
| 181 |
* |
| 182 |
|
| 183 |
clean: |
| 184 |
rm -f $(BIN_PROG) $(LIB_PROG) $(MASTER_PROG) cvt-help usercheck |
| 185 |
rm -f prefix mkprefix inst |
| 186 |
rm -f man/nn.1 |
| 187 |
|
| 188 |
* |
| 189 |
* dependencies |
| 190 |
* |
| 191 |
|
| •192 |
account.o: account.c account.h config.h global.h execute.h options.h \\ |
| 193 |
proto.h |
| •194 |
active.o: active.c active.h config.h data.h global.h db.h master.h \\ |
| 195 |
newsrc.h |
| •196 |
admin.o: admin.c admin.h config.h data.h global.h db.h execute.h \\ |
| 197 |
group.h keymap.h nn.h proto.h nn_term.h |
| •198 |
answer.o: answer.c answer.h config.h data.h global.h aux.h db.h \\ |
| 199 |
fullname.h group.h hostname.h init.h keymap.h kill.h \\ |
| 200 |
match.h news.h nn.h nntp.h options.h printconf.h regexp.h \\ |
| 201 |
reroute.h nn_term.h variable.h |
| •202 |
articles.o: articles.c articles.h config.h data.h global.h db.h keymap.h \\ |
| 203 |
kill.h match.h news.h newsrc.h regexp.h sort.h nn_term.h |
| •204 |
aux.o: aux.c aux.h config.h data.h global.h chset.h execute.h \\ |
| 205 |
keymap.h news.h nn.h nntp.h reroute.h nn_term.h |
| 206 |
chset.o: chset.c chset.h config.h |
| •207 |
collect.o: collect.c collect.h config.h global.h db.h news.h digest.h \\ |
| 208 |
master.h news.h nntp.h pack_date.h pack_name.h pack_subject.h |
| •209 |
db.o: db.c db.h config.h data.h global.h answer.h articles.h \\ |
| 210 |
keymap.h libnov.h nntp.h nn_term.h pack_date.h pack_name.h \\ |
| 211 |
pack_subject.h hash.h newsoverview.h |
| •212 |
decode.o: decode.c decode.h config.h data.h global.h keymap.h save.h \\ |
| 213 |
nn_term.h |
| •214 |
digest.o: digest.c digest.h config.h data.h global.h debug.h keymap.h \\ |
| 215 |
news.h pack_name.h nn_term.h |
| •216 |
dir.o: dir.c dir.h config.h data.h global.h articles.h keymap.h \\ |
| 217 |
nn_term.h |
| •218 |
execute.o: execute.c execute.h config.h data.h global.h folder.h \\ |
| 219 |
keymap.h nn_term.h |
| •220 |
expire.o: expire.c expire.h config.h global.h db.h keymap.h master.h \\ |
| 221 |
nntp.h nn_term.h |
| •222 |
folder.o: folder.c folder.h config.h data.h global.h articles.h \\ |
| 223 |
db.h digest.h dir.h keymap.h match.h menu.h news.h \\ |
| 224 |
pack_date.h pack_name.h pack_subject.h regexp.h save.h \\ |
| 225 |
sort.h nn_term.h |
| 226 |
fullname.o: fullname.c fullname.h config.h data.h global.h |
| •227 |
global.o: global.c data.h global.h config.h execute.h keymap.h nn.h \\ |
| 228 |
patchlevel.h nn_term.h update.h |
| •229 |
group.o: group.c group.h config.h data.h global.h articles.h db.h \\ |
| 230 |
folder.h keymap.h macro.h match.h menu.h newsrc.h nn.h \\ |
| 231 |
nntp.h regexp.h sort.h nn_term.h variable.h |
| 232 |
hostname.o: hostname.c hostname.h config.h |
| •233 |
init.o: init.c init.h config.h data.h global.h articles.h admin.h \\ |
| 234 |
answer.h db.h execute.h folder.h group.h hostname.h \\ |
| 235 |
keymap.h kill.h macro.h menu.h newsrc.h nn.h printconf.h \\ |
| 236 |
save.h sequence.h sort.h nn_term.h variable.h |
| 237 |
keymap.o: keymap.c keymap.h config.h data.h global.h init.h nn_term.h |
| •238 |
kill.o: kill.c kill.h config.h data.h global.h db.h keymap.h \\ |
| 239 |
match.h menu.h regexp.h nn_term.h |
| •240 |
macro.o: macro.c macro.h config.h data.h global.h db.h init.h \\ |
| 241 |
keymap.h menu.h nn_term.h variable.h |
| •242 |
master.o: master.c master.h config.h global.h active.h collect.h db.h \\ |
| 243 |
digest.h execute.h expire.h news.h nntp.h options.h proto.h |
| 244 |
match.o: match.c match.h config.h data.h global.h regexp.h |
| •245 |
menu.o: menu.c menu.h config.h data.h global.h articles.h \\ |
| 246 |
answer.h db.h execute.h folder.h group.h init.h keymap.h \\ |
| 247 |
kill.h macro.h match.h more.h newsrc.h regexp.h save.h \\ |
| 248 |
sort.h nn_term.h |
| •249 |
more.o: more.c more.h config.h data.h global.h articles.h answer.h \\ |
| 250 |
db.h execute.h folder.h group.h init.h keymap.h kill.h \\ |
| 251 |
macro.h match.h menu.h news.h regexp.h save.h nn_term.h |
| 252 |
news.o: news.c news.h config.h data.h global.h digest.h more.h nntp.h |
| •253 |
newsrc.o: newsrc.c newsrc.h config.h data.h global.h articles.h \\ |
| 254 |
active.h db.h keymap.h nn.h options.h regexp.h nn_term.h |
| •255 |
nn.o: nn.c nn.h config.h data.h global.h admin.h answer.h \\ |
| 256 |
articles.h db.h execute.h folder.h group.h init.h keymap.h \\ |
| 257 |
kill.h libnov.h macro.h match.h menu.h newsrc.h nntp.h \\ |
| 258 |
options.h proto.h regexp.h sequence.h nn_term.h |
| •259 |
nntp.o: nntp.c nntp.h config.h data.h global.h fullname.h hash.h \\ |
| 260 |
hostname.h keymap.h libnov.h nn_term.h patchlevel.h \\ |
| 261 |
newsoverview.h |
| 262 |
options.o: options.c options.h config.h data.h global.h nn.h variable.h |
| 263 |
pack_date.o: pack_date.c pack_date.h config.h data.h global.h |
| 264 |
pack_name.o: pack_name.c pack_name.h config.h data.h global.h |
| 265 |
pack_subject.o: pack_subject.c pack_subject.h config.h data.h global.h |
| 266 |
prefix.o: prefix.c config.h data.h global.h execute.h |
| 267 |
printconf.o: printconf.c printconf.h config.h data.h global.h |
| 268 |
proto.o: proto.c proto.h config.h data.h global.h hostname.h |
| 269 |
regexp.o: regexp.c regexp.h config.h data.h global.h keymap.h nn_term.h |
| 270 |
reroute.o: reroute.c reroute.h config.h data.h global.h |
| •271 |
save.o: save.c save.h config.h data.h global.h db.h decode.h \\ |
| 272 |
digest.h folder.h keymap.h more.h news.h nn_term.h unshar.h |
| •273 |
sequence.o: sequence.c sequence.h config.h data.h global.h db.h \\ |
| 274 |
debug.h keymap.h macro.h nn.h nn_term.h variable.h |
| 275 |
sort.o: sort.c sort.h config.h data.h global.h articles.h |
| •276 |
term.o: term.c nn_term.h config.h data.h global.h execute.h \\ |
| 277 |
folder.h keymap.h macro.h nn.h regexp.h |
| 278 |
unshar.o: unshar.c unshar.h config.h data.h global.h keymap.h nn_term.h |
| •279 |
variable.o: variable.c variable.h config.h data.h global.h chset.h \\ |
| 280 |
folder.h init.h keymap.h regexp.h sort.h nn_term.h |
| 281 |
|
| 282 |
awksplit.o: awksplit.c awksplit.h config.h split.h |
| 283 |
hash.o: hash.c hash.h config.h hdbm.h |
| 284 |
hdbm.o: hdbm.c hdbm.h config.h hdbmint.h |
| •285 |
libnov.o: libnov.c libnov.h config.h data.h global.h awksplit.h \\ |
| 286 |
digest.h hash.h newsoverview.h news.h nntp.h split.h |
| 287 |
split.o: split.c split.h config.h |
| 288 |
|
| 289 |
* link debugging version |
| 290 |
|
| 291 |
nn1: $(NN) |
| 292 |
$(CC) -o nn1 -Mnn1 $(CFLAGS) $(NN) $(LDFLAGS) TERMLIB NNTP_EXTRA_LIB |
| 293 |
|
| 294 |
nnmaster1: $(MASTER) |
| 295 |
$(CC) -o nnmaster1 -Mnnmaster1 $(CFLAGS) $(MASTER) $(LDFLAGS) NNTP_EXTRA_LIB |
| 296 |
|
| 297 |
lint: |
| 298 |
echo LINTING NN |
| 299 |
lint -Iconf -u $(NN:.o=.c) |
| 300 |
* echo LINTING MASTER |
| 301 |
* lint -Iconf -u $(MASTER:.o=.c) |
| 302 |
echo LINTING NOVOBJ |
| 303 |
lint -Iconf -u $(NOVOBJ:.o=.c) |