Commit | Line | Data |
---|---|---|
1a85e9d2 | 1 | # Makefile 5.8 85/04/10 |
11ece1e5 SL |
2 | # |
3 | # This version expects the 4.2BSD directory reading routines to | |
4 | # located in libc.a. If they aren't, augment LIBS. Also, LIBS | |
5 | # can be set to reference other object modules and libraries needed | |
6 | # by uucico, such as -lunet (needed when UNET is defined). | |
7 | # | |
8 | # Common object files are assembled into a library {uulib.a} | |
9 | # | |
1a85e9d2 RC |
10 | ALL= uucico uucp uux uuxqt uulog uuclean uuname uupoll uusnap \ |
11 | uuencode uudecode uusend uucpd uuq acucntrl | |
11ece1e5 SL |
12 | # Common object files placed in uulib.a |
13 | COMMON= anlwrk.o anyread.o assert.o cfgets.o chkpth.o \ | |
88db71e9 RC |
14 | cpmv.o expfile.o gename.o getargs.o getprm.o \ |
15 | getpwinfo.o gio.o gnamef.o gnxseq.o gwd.o imsg.o \ | |
16 | lastpart.o logent.o mailst.o pk0.o chksum.o pk1.o prefix.o \ | |
1a85e9d2 | 17 | setline.o subdir.o sysacct.o systat.o \ |
88db71e9 RC |
18 | ulockf.o \ |
19 | uucpname.o versys.o xqt.o uucpdefs.o tio.o fio.o | |
20 | ||
21 | SRCS= anlwrk.c anyread.c assert.c cfgets.c chkpth.c chksum.c \ | |
22 | cico.c cntrl.c condevs.c conn.c cpmv.c expfile.c \ | |
23 | gename.c getargs.c getprm.c getpwinfo.c \ | |
24 | gio.c gnamef.c gnsys.c gnxseq.c gwd.c imsg.c \ | |
25 | ioctl.c lastpart.c logent.c mailst.c ndir.h \ | |
26 | pk.h pk0.c pk1.c pkon.c prefix.c \ | |
1a85e9d2 | 27 | setline.c subdir.c sysacct.c systat.c tio.c fio.c\ |
88db71e9 RC |
28 | ulockf.c \ |
29 | uuclean.c uucp.c uucp.h uucpdefs.c uucpname.c uudecode.c \ | |
30 | uuencode.c uulog.c uuname.c uupoll.c uusend.c uusnap.c \ | |
31 | uux.c uuxqt.c \ | |
1a85e9d2 | 32 | versys.c xqt.c uuq.c acucntrl.c |
88db71e9 | 33 | #These might be useful on non 4.2bsd systems. |
1a85e9d2 | 34 | MISC= htonl.c ioctl.c index.c mkdir.c |
88db71e9 | 35 | |
11ece1e5 SL |
36 | DESTDIR= |
37 | OWNER= uucp | |
38 | GROUP= daemon | |
39 | CFLAGS= -O | |
40 | LDFLAGS= | |
88db71e9 RC |
41 | LIBS= |
42 | LIBDIR= ${DESTDIR}/usr/lib/uucp | |
43 | BIN= ${DESTDIR}/usr/bin | |
44 | PUBDIR= ${DESTDIR}/usr/spool/uucppublic | |
45 | SPOOL= ${DESTDIR}/usr/spool/uucp | |
46 | XQTDIR= ${SPOOL}/XTMP | |
47 | CORRUPT= ${SPOOL}/CORRUPT | |
48 | AUDIT= ${SPOOL}/AUDIT | |
1a85e9d2 RC |
49 | LCK= ${SPOOL}/LCK |
50 | LOG= ${SPOOL}/LOG | |
88db71e9 | 51 | STST= ${SPOOL}/STST |
1a85e9d2 | 52 | # The six subdirs {not counting XTMP}. |
11ece1e5 | 53 | SUBDIRS=C. D.`uuname -l`X D.`uuname -l` D. X. TM. |
11cfcb47 | 54 | # for make depend |
88db71e9 | 55 | UNDEF= -UNDIR -UUNET -USYSIII -UUNAME -UCCWHOAMI -UGETMYHNAME -UDATAKIT \ |
1a85e9d2 | 56 | -UBSD4_2 -UUSG -UVMS |
11ece1e5 SL |
57 | |
58 | all: ${ALL} | |
59 | ||
88db71e9 RC |
60 | print: $(SRCS) |
61 | vgrind $? | |
62 | vgrind -x index | |
63 | touch print | |
64 | ||
11ece1e5 SL |
65 | uucp: uucp.o uulib.a |
66 | ${CC} -o uucp ${LDFLAGS} uucp.o uulib.a | |
67 | ||
68 | uux: uux.o uulib.a | |
69 | ${CC} -o uux ${LDFLAGS} uux.o uulib.a | |
70 | ||
71 | uuxqt: uuxqt.o uulib.a | |
72 | ${CC} -o uuxqt ${LDFLAGS} uuxqt.o uulib.a ${LIBS} | |
73 | ||
88db71e9 | 74 | uucico: cico.o cntrl.o conn.o condevs.o gnsys.o uulib.a aculib/aculib.a |
11ece1e5 | 75 | ${CC} -o uucico ${LDFLAGS} cico.o cntrl.o conn.o condevs.o \ |
88db71e9 | 76 | gnsys.o uulib.a aculib/aculib.a ${LIBS} |
11ece1e5 SL |
77 | |
78 | uulog: uulog.o uulib.a | |
79 | ${CC} -o uulog ${LDFLAGS} uulog.o uulib.a | |
80 | ||
81 | uuclean: uuclean.o uulib.a | |
88db71e9 | 82 | ${CC} -o uuclean ${LDFLAGS} uuclean.o uulib.a ${LIBS} |
11ece1e5 SL |
83 | |
84 | uuname: uuname.o uulib.a | |
85 | ${CC} -o uuname ${LDFLAGS} uuname.o uulib.a | |
88db71e9 | 86 | |
11ece1e5 SL |
87 | uupoll: uupoll.o uulib.a |
88 | ${CC} -o uupoll ${LDFLAGS} uupoll.o uulib.a | |
89 | ||
88db71e9 RC |
90 | uusnap: uusnap.o |
91 | ${CC} -o uusnap ${LDFLAGS} uusnap.o ${LIBS} | |
11ece1e5 | 92 | |
88db71e9 RC |
93 | uuencode: uuencode.o |
94 | ${CC} -o uuencode ${LDFLAGS} uuencode.o | |
11ece1e5 | 95 | |
88db71e9 RC |
96 | uudecode: uudecode.o |
97 | ${CC} -o uudecode ${LDFLAGS} uudecode.o | |
11ece1e5 | 98 | |
88db71e9 RC |
99 | uusend: uusend.o |
100 | ${CC} -o uusend ${LDFLAGS} uusend.o | |
11ece1e5 | 101 | |
88db71e9 | 102 | uucpd: uucpd.o uucp.h |
480fe9de RC |
103 | ${CC} -o uucpd ${LDFLAGS} uucpd.o |
104 | ||
88db71e9 RC |
105 | uuq: uuq.o uulib.a |
106 | ${CC} -o uuq ${LDFLAGS} uuq.o uulib.a | |
107 | ||
1a85e9d2 RC |
108 | acucntrl: acucntrl.o |
109 | ${CC} -o acucntrl ${LDFLAGS} acucntrl.o | |
110 | ||
11ece1e5 SL |
111 | # Note: mode 700 on ${LIBDIR} would be safer. |
112 | # Also, L.sys etc should be 600. | |
88db71e9 | 113 | |
11ece1e5 | 114 | mkdirs: |
88db71e9 | 115 | -for i in ${LIBDIR} ${SPOOL} ${PUBDIR} ${XQTDIR} ${CORRUPT} \ |
1a85e9d2 | 116 | ${AUDIT} ${LCK} ${LOG} ${STST} ; do \ |
88db71e9 RC |
117 | rm -f $$i ; mkdir $$i ; \ |
118 | chmod 755 $$i; chown ${OWNER} $$i; chgrp ${GROUP} $$i ; \ | |
119 | done | |
120 | chmod 777 ${PUBDIR} ${LCK} | |
1a85e9d2 RC |
121 | -cd ${LOG}; for i in uucico uux uuxqt uucp xferstats; do\ |
122 | rm -f $$i ; mkdir $$i ; \ | |
123 | chmod 755 $$i; chown ${OWNER} $$i; chgrp ${GROUP} $$i ; \ | |
124 | done | |
88db71e9 | 125 | -cd ${SPOOL}; for i in ${SUBDIRS} ; do \ |
11ece1e5 | 126 | mkdir $$i; \ |
11cfcb47 | 127 | chown ${OWNER} $$i; chgrp ${GROUP} $$i; chmod 755 $$i; \ |
11ece1e5 SL |
128 | done |
129 | ||
130 | # The lorder...tsort below is for systems w/o ranlib | |
131 | # But it doesnt hurt to use it. Ignore the spurious "cycle" messages | |
132 | uulib.a: ${COMMON} | |
133 | rm -f $@ | |
134 | ar cr $@ `lorder ${COMMON} | tsort` | |
135 | ranlib $@ | |
136 | ||
88db71e9 | 137 | aculib/aculib.a: |
1a85e9d2 | 138 | cd aculib; make ${MFLAGS} "CFLAGS=${CFLAGS}" |
88db71e9 | 139 | |
1a85e9d2 | 140 | install: ${ALL} |
88db71e9 RC |
141 | chown ${OWNER} ${LIBDIR} |
142 | chgrp ${GROUP} ${LIBDIR} | |
143 | chmod 755 ${LIBDIR} | |
144 | for i in uucico uuclean; do \ | |
145 | install -s -m 6111 -o ${OWNER} -g ${GROUP} $$i ${LIBDIR} ;\ | |
146 | done | |
147 | for i in uucp uux uulog uuname uusnap uupoll uuq uusend; do \ | |
148 | install -s -m 6111 -o ${OWNER} -g ${GROUP} $$i ${BIN} ;\ | |
149 | done | |
150 | rm -f ${BIN}/ruusend | |
151 | ln ${BIN}/uusend ${BIN}/ruusend | |
152 | install -s -m 6110 -o ${OWNER} -g ${GROUP} uuxqt ${LIBDIR} | |
1a85e9d2 | 153 | install -s -m 6110 -o root -g ${GROUP} acucntrl ${LIBDIR} |
88db71e9 | 154 | install -s -m 700 -o root uucpd /etc/uucpd |
88db71e9 RC |
155 | install -s uuencode ${BIN} |
156 | install -s uudecode ${BIN} | |
11ece1e5 SL |
157 | |
158 | clean: | |
159 | rm -f *.o ${ALL} uulib.a | |
1a85e9d2 | 160 | cd aculib; make ${MFLAGS} clean |
11ece1e5 SL |
161 | |
162 | depend: | |
163 | for i in *.c; do \ | |
164 | (echo `basename $$i .c`.o: $$i >>makedep; \ | |
11cfcb47 | 165 | unifdef ${UNDEF} $$i | \ |
11ece1e5 SL |
166 | /bin/grep '^#[ ]*include' | sed \ |
167 | -e '/\.\.\/h/d' \ | |
168 | -e 's,<\(.*\)>,"/usr/include/\1",' \ | |
169 | -e 's/^[^"]*"\([^"]*\)".*/'"$$i"': \1/' \ | |
170 | -e 's/\.c/.o/' >>makedep); done | |
171 | echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep | |
172 | echo '$$r makedep' >>eddep | |
173 | echo 'w' >>eddep | |
174 | cp Makefile Makefile.bak | |
175 | ed - Makefile < eddep | |
176 | rm eddep makedep | |
177 | echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile | |
178 | echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile | |
179 | echo '# see make depend above' >> Makefile | |
180 | ||
181 | # DO NOT DELETE THIS LINE -- make depend uses it | |
182 | # DEPENDENCIES MUST END AT END OF FILE | |
1a85e9d2 RC |
183 | acucntrl.o: acucntrl.c |
184 | acucntrl.o: uucp.h | |
11ece1e5 SL |
185 | anlwrk.o: anlwrk.c |
186 | anlwrk.o: uucp.h | |
88db71e9 | 187 | anlwrk.o: uust.h |
11ece1e5 SL |
188 | anyread.o: anyread.c |
189 | anyread.o: uucp.h | |
11ece1e5 SL |
190 | assert.o: assert.c |
191 | assert.o: uucp.h | |
11ece1e5 | 192 | cfgets.o: cfgets.c |
11ece1e5 SL |
193 | chkpth.o: chkpth.c |
194 | chkpth.o: uucp.h | |
88db71e9 | 195 | chksum.o: chksum.c |
11ece1e5 SL |
196 | cico.o: cico.c |
197 | cico.o: uucp.h | |
88db71e9 RC |
198 | cico.o: uust.h |
199 | cico.o: uusub.h | |
11ece1e5 SL |
200 | cntrl.o: cntrl.c |
201 | cntrl.o: uucp.h | |
88db71e9 | 202 | cntrl.o: uust.h |
11ece1e5 | 203 | condevs.o: condevs.c |
1a85e9d2 | 204 | condevs.o: condevs.h |
11ece1e5 SL |
205 | conn.o: conn.c |
206 | conn.o: uucp.h | |
11ece1e5 SL |
207 | cpmv.o: cpmv.c |
208 | cpmv.o: uucp.h | |
11ece1e5 SL |
209 | expfile.o: expfile.c |
210 | expfile.o: uucp.h | |
88db71e9 RC |
211 | fio.o: fio.c |
212 | fio.o: uucp.h | |
11ece1e5 SL |
213 | gename.o: gename.c |
214 | gename.o: uucp.h | |
215 | getargs.o: getargs.c | |
1a85e9d2 | 216 | getargs.o: uucp.h |
11ece1e5 | 217 | getprm.o: getprm.c |
11ece1e5 SL |
218 | getpwinfo.o: getpwinfo.c |
219 | getpwinfo.o: uucp.h | |
11ece1e5 | 220 | gio.o: gio.c |
11ece1e5 | 221 | gio.o: uucp.h |
1a85e9d2 | 222 | gio.o: pk.h |
11ece1e5 SL |
223 | gnamef.o: gnamef.c |
224 | gnamef.o: uucp.h | |
11ece1e5 SL |
225 | gnsys.o: gnsys.c |
226 | gnsys.o: uucp.h | |
11ece1e5 SL |
227 | gnxseq.o: gnxseq.c |
228 | gnxseq.o: uucp.h | |
11ece1e5 SL |
229 | gwd.o: gwd.c |
230 | gwd.o: uucp.h | |
11ece1e5 SL |
231 | imsg.o: imsg.c |
232 | imsg.o: uucp.h | |
1a85e9d2 | 233 | index.o: index.c |
11ece1e5 SL |
234 | ioctl.o: ioctl.c |
235 | ioctl.o: uucp.h | |
11ece1e5 SL |
236 | lastpart.o: lastpart.c |
237 | logent.o: logent.c | |
238 | logent.o: uucp.h | |
11ece1e5 SL |
239 | mailst.o: mailst.c |
240 | mailst.o: uucp.h | |
1a85e9d2 | 241 | mkdir.o: mkdir.c |
11ece1e5 | 242 | pk0.o: pk0.c |
1a85e9d2 | 243 | pk0.o: uucp.h |
11ece1e5 | 244 | pk0.o: pk.h |
11ece1e5 | 245 | pk1.o: pk1.c |
88db71e9 | 246 | pk1.o: uucp.h |
1a85e9d2 | 247 | pk1.o: pk.h |
11ece1e5 | 248 | prefix.o: prefix.c |
11ece1e5 SL |
249 | setline.o: setline.c |
250 | setline.o: uucp.h | |
11ece1e5 SL |
251 | subdir.o: subdir.c |
252 | subdir.o: uucp.h | |
253 | sysacct.o: sysacct.c | |
11ece1e5 SL |
254 | systat.o: systat.c |
255 | systat.o: uucp.h | |
88db71e9 RC |
256 | tio.o: tio.c |
257 | tio.o: uucp.h | |
11ece1e5 SL |
258 | ulockf.o: ulockf.c |
259 | ulockf.o: uucp.h | |
11ece1e5 SL |
260 | uuclean.o: uuclean.c |
261 | uuclean.o: uucp.h | |
11ece1e5 SL |
262 | uucp.o: uucp.c |
263 | uucp.o: uucp.h | |
88db71e9 RC |
264 | uucp.o: uust.h |
265 | uucpd.o: uucpd.c | |
266 | uucpd.o: uucp.h | |
11ece1e5 SL |
267 | uucpdefs.o: uucpdefs.c |
268 | uucpdefs.o: uucp.h | |
269 | uucpname.o: uucpname.c | |
270 | uucpname.o: uucp.h | |
11ece1e5 | 271 | uudecode.o: uudecode.c |
11ece1e5 | 272 | uuencode.o: uuencode.c |
11ece1e5 SL |
273 | uulog.o: uulog.c |
274 | uulog.o: uucp.h | |
275 | uuname.o: uuname.c | |
276 | uuname.o: uucp.h | |
11ece1e5 SL |
277 | uupoll.o: uupoll.c |
278 | uupoll.o: uucp.h | |
88db71e9 RC |
279 | uuq.o: uuq.c |
280 | uuq.o: uucp.h | |
11ece1e5 | 281 | uusend.o: uusend.c |
11ece1e5 SL |
282 | uusnap.o: uusnap.c |
283 | uusnap.o: uucp.h | |
11ece1e5 SL |
284 | uux.o: uux.c |
285 | uux.o: uucp.h | |
286 | uuxqt.o: uuxqt.c | |
287 | uuxqt.o: uucp.h | |
11ece1e5 SL |
288 | versys.o: versys.c |
289 | versys.o: uucp.h | |
290 | xqt.o: xqt.c | |
291 | xqt.o: uucp.h | |
11ece1e5 SL |
292 | # DEPENDENCIES MUST END AT END OF FILE |
293 | # IF YOU PUT STUFF HERE IT WILL GO AWAY | |
294 | # see make depend above |