hack(6): Separate hostprog.
authorzrj <rimvydas.jasinskas@gmail.com>
Wed, 25 Apr 2018 16:18:29 +0000 (19:18 +0300)
committerzrj <zrj@dragonflybsd.org>
Wed, 25 Apr 2018 18:19:06 +0000 (21:19 +0300)
games/hack/Makefile
games/hack/Makefile.inc [new file with mode: 0644]
games/hack/hack/Makefile [copied from games/hack/Makefile with 87% similarity]
games/hack/makedefs/Makefile [new file with mode: 0644]

index 93576a8..475612b 100644 (file)
@@ -1,45 +1,3 @@
-#      @(#)Makefile    8.1 (Berkeley) 5/31/93
-# $FreeBSD: src/games/hack/Makefile,v 1.20.2.4 2002/08/07 16:31:41 ru Exp $
-
-PROG=  hack
-SRCS=  alloc.c hack.Decl.c hack.apply.c hack.bones.c hack.c hack.cmd.c \
-       hack.do.c hack.do_name.c hack.do_wear.c hack.dog.c hack.eat.c \
-       hack.end.c hack.engrave.c hack.fight.c hack.invent.c hack.ioctl.c \
-       hack.lev.c hack.main.c hack.makemon.c hack.mhitu.c hack.mklev.c \
-       hack.mkmaze.c hack.mkobj.c hack.mkshop.c hack.mon.c hack.monst.c \
-       hack.o_init.c hack.objnam.c hack.options.c hack.pager.c hack.potion.c \
-       hack.pri.c hack.read.c hack.rip.c hack.rumors.c hack.save.c \
-       hack.search.c hack.shk.c hack.shknam.c hack.steal.c hack.termcap.c \
-       hack.timeout.c hack.topl.c hack.track.c hack.trap.c hack.tty.c \
-       hack.u_init.c hack.unix.c hack.vault.c hack.version.c hack.wield.c \
-       hack.wizard.c hack.worm.c hack.worn.c hack.zap.c rnd.c \
-       hack.onames.h
-MAN=   hack.6
-VARGAMES=
-GAMESCURSES=
-
-NO_STRICT_ALIASING=
-CFLAGS+=       -I${.CURDIR} -I.
-
-FILES=         rumors help hh data
-FILESMODE_rumors=      440
-FILESGRP=      ${BINGRP}
-FILESDIR=      /var/games/hackdir
-CLEANFILES=    hack.onames.h makedefs.nx makedefs.no
-
-build-tools: makedefs.nx
-
-hack.onames.h: makedefs.nx def.objects.h
-       ./makedefs.nx ${.CURDIR}/def.objects.h > hack.onames.h
-
-beforeinstall:
-       ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} /dev/null \
-           ${DESTDIR}/var/games/hackdir/perm
-.if !exists(${DESTDIR}/var/games/hackdir/record)
-       ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 460 /dev/null \
-           ${DESTDIR}/var/games/hackdir/record
-.endif
-#      rm -f ${DESTDIR}/var/games/hackdir/bones* \
-#          ${DESTDIR}/var/games/hackdir/save/*
-
-.include <bsd.prog.mk>
+SUBDIR=                makedefs
+SUBDIR+=       hack
+.include <bsd.subdir.mk>
diff --git a/games/hack/Makefile.inc b/games/hack/Makefile.inc
new file mode 100644 (file)
index 0000000..01b5f23
--- /dev/null
@@ -0,0 +1 @@
+.include "../Makefile.inc"
similarity index 87%
copy from games/hack/Makefile
copy to games/hack/hack/Makefile
index 93576a8..e5b19cb 100644 (file)
@@ -1,6 +1,8 @@
 #      @(#)Makefile    8.1 (Berkeley) 5/31/93
 # $FreeBSD: src/games/hack/Makefile,v 1.20.2.4 2002/08/07 16:31:41 ru Exp $
 
+.PATH: ${.CURDIR}/..
+
 PROG=  hack
 SRCS=  alloc.c hack.Decl.c hack.apply.c hack.bones.c hack.c hack.cmd.c \
        hack.do.c hack.do_name.c hack.do_wear.c hack.dog.c hack.eat.c \
@@ -19,18 +21,16 @@ VARGAMES=
 GAMESCURSES=
 
 NO_STRICT_ALIASING=
-CFLAGS+=       -I${.CURDIR} -I.
+CFLAGS+=       -I${.CURDIR}/.. -I.
 
 FILES=         rumors help hh data
 FILESMODE_rumors=      440
 FILESGRP=      ${BINGRP}
 FILESDIR=      /var/games/hackdir
-CLEANFILES=    hack.onames.h makedefs.nx makedefs.no
-
-build-tools: makedefs.nx
+CLEANFILES=    hack.onames.h
 
-hack.onames.h: makedefs.nx def.objects.h
-       ./makedefs.nx ${.CURDIR}/def.objects.h > hack.onames.h
+hack.onames.h: def.objects.h makedefs.c
+       ${.OBJDIR}/../makedefs/makedefs.nx ${.CURDIR}/../def.objects.h > hack.onames.h
 
 beforeinstall:
        ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} /dev/null \
diff --git a/games/hack/makedefs/Makefile b/games/hack/makedefs/Makefile
new file mode 100644 (file)
index 0000000..b81ec75
--- /dev/null
@@ -0,0 +1,8 @@
+.PATH: ${.CURDIR}/..
+
+PROG=  makedefs
+
+# this makedefs is used in place, it is not installed anywhere
+install:
+
+.include <bsd.hostprog.mk>