]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - phantasia/Makefile
games: remove trailing whitespace in *.c and *.h
[bsdgames-darwin.git] / phantasia / Makefile
1 # $NetBSD: Makefile,v 1.37 2014/06/14 20:49:37 mrg Exp $
2 # @(#)Makefile 8.1 (Berkeley) 5/31/93
3
4 PROG= phantasia
5 SRCS= fight.c gamesupport.c interplayer.c io.c main.c misc.c phantglobs.c
6 MAN= phantasia.6
7
8 FILESDIR=$(LOCALSTATEDIR)/games/phantasia
9 FILESMODE=0660
10 ALLFILES=gold lastdead mess monsters void motd characs scoreboard
11 FILES=gold lastdead mess monsters void motd
12
13 CLEANFILES+=map mkdata $(ALLFILES) files.stamp
14
15 all: $(PROG) $(FILES)
16
17 $(FILES): files.stamp
18 files.stamp: mkdata monsters.asc
19 rm -f files.stamp
20 ./mkdata -m monsters.asc
21 touch files.stamp
22
23 mkdata: phantglobs.c setup.c
24 clang -o mkdata phantglobs.c setup.c -I$(ROOT)
25
26 # Make Phantasia map. Change the map commands reflect your installation.
27 # PLOTDEVICE is used for plotting the map. Change as appropriate.
28
29 map: map.c
30 clang -o map map.c -lplot
31 ./map | plot > /dev/tty
32
33 $(PROG): $(SRCS)
34 $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw -I$(ROOT)
35 $(STRIP) $(PROG)
36
37 $(ALLFILES): files.stamp
38
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)
44
45 clean:
46 rm -f $(CLEANFILES) $(PROG)
47
48 .PHONY: all clean install