
# Written by Peter Ekberg, peda@lysator.liu.se

SHELL        = /bin/sh

BINDIR       = /usr/local/games
STATEDIR     = /var/games

PRG          = thrust
VERSION      = 0.53

DISTFILES    = COPYING README INSTALL TODO CHANGES \
               Makefile $(PRG)-$(VERSION).lsm
BINTARFILE   = $(PRG)-bin-$(VERSION).tar.gz


#######################
#
# Targets.
#
#######################

all: install

install:
	cp $(PRG) $(BINDIR)/$(PRG)
	chown root.root $(BINDIR)/$(PRG)
	chmod a+rs $(BINDIR)/$(PRG)

uninstall:
	rm $(BINDIR)/$(PRG)
	rm $(STATEDIR)/$(PRG).highscore

bindist: $(PRG)
	mv $(PRG) $(PRG).binary
	mkdir $(PRG)
	cp -dpf $(DISTFILES) $(PRG)
	mv $(PRG).binary $(PRG)/$(PRG)
	tar -czf $(BINTARFILE) $(PRG)/*
	mv $(PRG)/$(PRG) $(PRG).binary
	rm -rf $(PRG)
	mv $(PRG).binary $(PRG)
