]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - hack/Makefile
PR/55695: Andreas Gustafsson: factor(6) -h option doesn't always work
[bsdgames-darwin.git] / hack / Makefile
1 # $NetBSD: Makefile,v 1.47 2020/02/08 00:59:55 fox Exp $
2 # @(#)Makefile 8.2 (Berkeley) 4/27/95
3
4 .include <bsd.own.mk>
5
6 PROG= hack
7 CPPFLAGS+=-I.
8 DPSRCS+=hack.onames.h hack.h
9 SRCS+= alloc.c hack.Decl.c hack.apply.c hack.bones.c hack.c hack.cmd.c \
10 hack.do.c hack.do_name.c hack.do_wear.c hack.dog.c hack.eat.c \
11 hack.end.c hack.engrave.c hack.fight.c hack.invent.c hack.ioctl.c \
12 hack.lev.c hack.main.c hack.makemon.c hack.mhitu.c hack.mklev.c \
13 hack.mkmaze.c hack.mkobj.c hack.mkshop.c hack.mon.c hack.monst.c \
14 hack.o_init.c hack.objnam.c hack.options.c hack.pager.c hack.potion.c \
15 hack.pri.c hack.read.c hack.rip.c hack.rumors.c hack.save.c \
16 hack.search.c hack.shk.c hack.shknam.c hack.steal.c hack.terminfo.c \
17 hack.timeout.c hack.topl.c hack.track.c hack.trap.c hack.tty.c \
18 hack.u_init.c hack.unix.c hack.vault.c hack.version.c hack.wield.c \
19 hack.wizard.c hack.worm.c hack.worn.c hack.zap.c rnd.c
20 MAN= hack.6
21 DPADD+= ${LIBTERMINFO}
22 LDADD+= -lterminfo
23 HIDEGAME=hidegame
24 SETGIDGAME=yes
25 CLEANFILES+=makedefs makedefs.lo
26 FILES=help hh data
27 FILESDIR=/var/games/hackdir
28
29 CLEANFILES+=hack.onames.h
30 hack.onames.h: makedefs def.objects.h
31 ${_MKTARGET_CREATE}
32 ./makedefs ${.CURDIR}/def.objects.h > hack.onames.h
33
34 makedefs: makedefs.lo
35 ${_MKTARGET_LINK}
36 ${HOST_LINK.c} -o ${.TARGET} ${.ALLSRC}
37
38 hack.h: hack.onames.h
39
40 COPTS.hack.mon.c+= -Wno-format-nonliteral
41 COPTS.hack.rip.c+= -Wno-format-nonliteral
42 COPTS.hack.end.c+= ${GCC_NO_STRINGOP_TRUNCATION}
43
44 .if !exists(${DESTDIR}${FILESDIR}/perm)
45 afterinstall: clobber
46 .endif
47
48 clobber:
49 ${_MKMSG_INSTALL} ${DESTDIR}/var/games/hackdir/perm
50 ${INSTALL_FILE} -o games -g games -m 660 /dev/null \
51 ${DESTDIR}/var/games/hackdir/perm
52 ${_MKMSG_INSTALL} ${DESTDIR}/var/games/hackdir/record
53 ${INSTALL_FILE} -o games -g games -m 660 /dev/null \
54 ${DESTDIR}/var/games/hackdir/record
55 ${_MKMSG_REMOVE} "${DESTDIR}/var/games/hackdir/bones*"
56 rm -f ${DESTDIR}/var/games/hackdir/bones*
57
58 COPTS.hack.objnam.c+= ${GCC_NO_STRINGOP_TRUNCATION} ${GCC_NO_STRINGOP_OVERFLOW}
59 COPTS.hack.pager.c+= ${GCC_NO_STRINGOP_TRUNCATION}
60
61 .include <bsd.prog.mk>