1 # $NetBSD: Makefile,v 1.37 2014/06/14 20:49:37 mrg Exp $
2 # @(#)Makefile 8.1 (Berkeley) 5/31/93
5 SRCS= fight.c gamesupport.c interplayer.c io.c main.c misc.c phantglobs.c
8 FILESDIR=$(LOCALSTATEDIR)/games/phantasia
10 ALLFILES=gold lastdead mess monsters void motd characs scoreboard
11 FILES=gold lastdead mess monsters void motd
13 CLEANFILES+=map mkdata $(ALLFILES) files.stamp
18 files.stamp: mkdata monsters.asc
20 ./mkdata -m monsters.asc
23 mkdata: phantglobs.c setup.c
24 clang -o mkdata phantglobs.c setup.c -I$(ROOT)
26 # Make Phantasia map. Change the map commands reflect your installation.
27 # PLOTDEVICE is used for plotting the map. Change as appropriate.
30 clang -o map map.c -lplot
31 ./map | plot > /dev/tty
34 $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw -I$(ROOT)
37 $(ALLFILES): files.stamp
39 install: $(PROG) $(MAN) $(ALLFILES)
40 $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG)
41 $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN)
42 $(GINSTALL) -d $(DESTDIR)$(FILESDIR)
43 $(GINSTALL) -Dm$(FILESMODE) $(ALLFILES) $(DESTDIR)$(FILESDIR)
46 rm -f $(CLEANFILES) $(PROG)
48 .PHONY: all clean install