xref: /original-bsd/games/fortune/Makefile (revision 7211505a)
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#
6#	@(#)Makefile	1.4	(Berkeley)	09/20/87
7#
8CFLAGS=	-O
9LIBC=	/lib/libc.a
10SFLAGS=	-r
11TDEV=	-Pver
12TROFF=	ditroff ${TDEV}
13SRCS=	fortune.c rnd.c strfile.c unstr.c
14
15all: fortune strfile unstr fortunes.dat
16
17fortune: fortune.o rnd.o ${LIBC}
18	${CC} ${CFLAGS} -o $@ fortune.o rnd.o
19
20strfile: strfile.o rnd.o ${LIBC}
21	${CC} ${CFLAGS} -o $@ strfile.o rnd.o
22
23unstr: unstr.o ${LIBC}
24	${CC} ${CFLAGS} -o $@ unstr.o
25
26fortunes.dat: fortunes strfile
27	./strfile ${SFLAGS} fortunes
28
29fortunes: scene obscene
30	(cat scene; echo "%-"; cat obscene) > fortunes
31
32clean: FRC
33	rm -f fortune fortunes fortunes.dat strfile unstr core *.o
34	rm -f Oscene Oobscene
35
36depend: FRC
37	mkdep ${CFLAGS} ${SRCS}
38
39install: FRC
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
42
43lint: FRC
44	lint ${CFLAGS} fortune.c rnd.c
45	lint ${CFLAGS} strfile.c rnd.c
46	lint ${CFLAGS} unstr.c
47
48tags: FRC
49	ctags ${SRCS}
50
51troff: FRC
52	./Do_troff scene ${TROFF}
53	./Do_troff obscene ${TROFF}
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
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
77
78# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
79