1 # $NetBSD: Makefile,v 1.47 2020/02/08 00:59:55 fox Exp $
2 # @(#)Makefile 8.2 (Berkeley) 4/27/95
5 SRCS+= alloc.c hack.Decl.c hack.apply.c hack.bones.c hack.c hack.cmd.c \
6 hack.do.c hack.do_name.c hack.do_wear.c hack.dog.c hack.eat.c \
7 hack.end.c hack.engrave.c hack.fight.c hack.invent.c hack.ioctl.c \
8 hack.lev.c hack.main.c hack.makemon.c hack.mhitu.c hack.mklev.c \
9 hack.mkmaze.c hack.mkobj.c hack.mkshop.c hack.mon.c hack.monst.c \
10 hack.o_init.c hack.objnam.c hack.options.c hack.pager.c hack.potion.c \
11 hack.pri.c hack.read.c hack.rip.c hack.rumors.c hack.save.c \
12 hack.search.c hack.shk.c hack.shknam.c hack.steal.c hack.terminfo.c \
13 hack.timeout.c hack.topl.c hack.track.c hack.trap.c hack.tty.c \
14 hack.u_init.c hack.unix.c hack.vault.c hack.version.c hack.wield.c \
15 hack.wizard.c hack.worm.c hack.worn.c hack.zap.c rnd.c
19 FILESDIR=$(LOCALSTATEDIR)/games/hackdir
20 CLEANFILES+=hack.onames.h
24 hack.onames.h: makedefs def.objects.h
25 ./makedefs def.objects.h > hack.onames.h
28 clang -o makedefs makedefs.c
32 $(PROG): $(SRCS) hack.h
33 $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw -I$(ROOT)
36 install: $(PROG) $(MAN)
37 $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
38 $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
39 mkdir -p $(DESTDIR)$(FILESDIR)
40 $(GINSTALL) -Dm660 $(FILES) $(DESTDIR)$(FILESDIR)
43 rm -f $(CLEANFILES) $(PROG)
45 .PHONY: all clean install