xref: /original-bsd/games/mille/Makefile (revision 5f6c6eb9)
1#
2# Copyright (c) 1987 Regents of the University of California.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms are permitted
6# provided that the above copyright notice and this paragraph are
7# duplicated in all such forms and that any documentation,
8# advertising materials, and other materials related to such
9# distribution and use acknowledge that the software was developed
10# by the University of California, Berkeley.  The name of the
11# University may not be used to endorse or promote products derived
12# from this software without specific prior written permission.
13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16#
17#	@(#)Makefile	5.8 (Berkeley) 10/19/88
18#
19CFLAGS=	-O
20LIBC=	/lib/libc.a
21LIBS=	-lcurses -ltermlib
22SRCS=	comp.c end.c extern.c init.c mille.c misc.c move.c print.c \
23	roll.c save.c table.c types.c varpush.c
24MSRCS=	comp.c end.c extern.c init.c mille.c misc.c move.c print.c \
25	roll.c save.c types.c varpush.c
26MOBJS=	comp.o end.o extern.o init.o mille.o misc.o move.o print.o \
27	roll.o save.o types.o varpush.o
28TSRCS=	table.c extern.c
29TOBJS=	table.o extern.o
30MAN=	mille.0
31
32all: mille
33
34mille: ${MOBJS} ${LIBC}
35	${CC} ${CFLAGS} -o $@ ${MOBJS} ${LIBS}
36
37table: ${TOBJS} ${LIBC}
38	${CC} ${CFLAGS} -o $@ ${TOBJS}
39
40clean:
41	rm -f ${OBJS} ${TOBJS} ${MOBJS} core mille table
42
43cleandir: clean
44	rm -f ${MAN} tags .depend
45
46depend: ${SRCS}
47	mkdep ${CFLAGS} ${SRCS}
48
49install: ${MAN}
50	install -s -o games -g bin -m 700 mille ${DESTDIR}/usr/games/hide
51	(cd ${DESTDIR}/usr/games; rm -f mille; ln -s dm mille; chown games.bin mille)
52	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat6
53
54lint: ${SRCS}
55	lint ${CFLAGS} ${MSRCS}
56	lint ${CFLAGS} ${TSRCS}
57
58tags: ${SRCS}
59	ctags ${MSRCS}
60	ctags -a ${TSRCS}
61	sort -o tags tags
62