summaryrefslogtreecommitdiffstats
path: root/atc/Makefile
blob: 22216a34e93303d9a1122eef6398d852f82f7cf7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#	$NetBSD: Makefile,v 1.30 2011/08/16 10:14:40 christos Exp $
#	@(#)Makefile	8.1 (Berkeley) 5/31/93

PROG=	atc
SRCS=	extern.c graphics.c input.c list.c log.c \
	main.c tunable.c update.c
MAN=	atc.6
FILES=${GAMES:S@^@${.CURDIR}/games/@g}
FILESDIR=/usr/share/games/atc
FILESMODE=644

all: $(PROG)

$(PROG): $(SRCS) grammar.y lex.l
	yacc -d grammar.y -o grammar.c
	lex lex.l
	$(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) grammar.c lex.yy.c -lncursesw $(LIBFLA)
	$(STRIP) $(PROG)

install: $(PROG) $(MAN)
	$(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/usr/games/$(PROG)
	$(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN)
	mkdir -p $(DESTDIR)/usr/share/games
	cp -r games $(DESTDIR)/usr/share/games/atc
	chmod -R 644 $(DESTDIR)/usr/share/games/atc/*
	mkdir -p $(DESTDIR)/var/games/


clean:
	rm -f $(CLEANFILES) $(PROG) grammar.c grammar.h lex.yy.c

.PHONY: all clean install