date and time created 88/10/19 15:33:10 by bostic
[unix-history] / usr / src / games / fortune / Makefile
CommitLineData
e2d34627
KB
1#
2# Copyright (c) 1987 Regents of the University of California.
3# All rights reserved. The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
f4ec5503 6# @(#)Makefile 1.4 (Berkeley) %G%
e2d34627
KB
7#
8CFLAGS= -O
9LIBC= /lib/libc.a
10SFLAGS= -r
11TDEV= -Pver
12TROFF= ditroff ${TDEV}
13SRCS= fortune.c rnd.c strfile.c unstr.c
1e650ae6
KB
14
15all: fortune strfile unstr fortunes.dat
16
e2d34627
KB
17fortune: fortune.o rnd.o ${LIBC}
18 ${CC} ${CFLAGS} -o $@ fortune.o rnd.o
1e650ae6 19
e2d34627
KB
20strfile: strfile.o rnd.o ${LIBC}
21 ${CC} ${CFLAGS} -o $@ strfile.o rnd.o
1e650ae6 22
e2d34627
KB
23unstr: unstr.o ${LIBC}
24 ${CC} ${CFLAGS} -o $@ unstr.o
1e650ae6
KB
25
26fortunes.dat: fortunes strfile
e2d34627 27 ./strfile ${SFLAGS} fortunes
1e650ae6 28
e2d34627 29fortunes: scene obscene
e605fded 30 (cat scene; echo "%-"; cat obscene) > fortunes
1e650ae6 31
e2d34627
KB
32clean: FRC
33 rm -f fortune fortunes fortunes.dat strfile unstr core *.o
34 rm -f Oscene Oobscene
1e650ae6 35
e2d34627
KB
36depend: FRC
37 mkdep ${CFLAGS} ${SRCS}
1e650ae6 38
e2d34627 39install: FRC
f4ec5503
KB
40 install -s -o games -g bin -m 4755 fortune ${DESTDIR}/usr/games
41 install -o games -g bin -m 600 fortunes.dat ${DESTDIR}/usr/games/lib
1e650ae6 42
e2d34627
KB
43lint: FRC
44 lint ${CFLAGS} fortune.c rnd.c
45 lint ${CFLAGS} strfile.c rnd.c
46 lint ${CFLAGS} unstr.c
1e650ae6 47
e2d34627
KB
48tags: FRC
49 ctags ${SRCS}
1e650ae6 50
e2d34627
KB
51troff: FRC
52 ./Do_troff scene ${TROFF}
53 ./Do_troff obscene ${TROFF}
1e650ae6
KB
54
55sort: sort.scene sort.obscene
56
57sort.scene: strfile unstr
58 strfile -oi scene
59 mv scene Oscene
60 unstr -o scene
61
62sort.obscene: strfile unstr
63 strfile -oi obscene
64 mv obscene Oobscene
65 unstr -o obscene
66
e2d34627
KB
67FRC:
68
69# DO NOT DELETE THIS LINE -- mkdep uses it.
70# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
71
72fortune.o: fortune.c /usr/include/sys/types.h /usr/include/stdio.h
73fortune.o: /usr/include/sys/file.h strfile.h
74rnd.o: rnd.c
75strfile.o: strfile.c /usr/include/stdio.h /usr/include/ctype.h strfile.h
76unstr.o: unstr.c /usr/include/stdio.h strfile.h
1e650ae6 77
e2d34627 78# IF YOU PUT ANYTHING HERE IT WILL GO AWAY