Commit | Line | Data |
---|---|---|
38ae4d69 BJ |
1 | SOURCE= fortune.c strfile.h strfile.c unstr.c fortunes |
2 | LIBDIR= /usr/games/lib | |
3 | BINDIR= /usr/games | |
4 | OWN= arnold | |
5 | GRP= arpa | |
6 | CFLAGS= -O -n | |
7 | TARF= fortunes.tar | |
8 | ||
9 | all: fortune strfile unstr fortunes.dat | |
10 | ||
11 | fortune: strfile.h fortune.c | |
12 | ${CC} ${CFLAGS} -DFORTFILE='"${LIBDIR}/fortunes.dat"' -o fortune fortune.c | |
13 | ||
14 | strfile: strfile.h strfile.c | |
15 | ${CC} ${CFLAGS} -o strfile strfile.c | |
16 | ||
17 | unstr: strfile.h unstr.c | |
18 | ${CC} ${CFLAGS} -o unstr unstr.c | |
19 | ||
20 | fortunes.dat: fortunes strfile | |
21 | strfile -s fortunes | |
22 | ||
23 | install: all | |
24 | mv fortunes.dat ${LIBDIR}/fortunes.dat | |
25 | chown ${OWN} ${LIBDIR}/fortunes.dat | |
26 | chgrp ${GRP} ${LIBDIR}/fortunes.dat | |
27 | chmod 600 ${LIBDIR}/fortunes.dat | |
28 | mv fortune ${BINDIR} | |
29 | chown ${OWN} ${BINDIR}/fortune | |
30 | chgrp ${GRP} ${BINDIR}/fortune | |
31 | chmod 4711 ${BINDIR}/fortune | |
32 | ||
33 | tar: | |
34 | tar crvf ${TARF} Makefile ${SOURCE} fortune.6 | |
35 | ||
36 | clean: | |
37 | rm -f fortunes.dat fortune strfile unstr |