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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
DESTDIR =
DATADIR = $(DESTDIR)/usr/share/games/pathological
all: write-highscores docs
write-highscores: write-highscores.c
gcc -s -o write-highscores write-highscores.c
docs: html/wheel.png
html/wheel.png:
./makehtml
install: install-dep install-indep install-scores
# Install architecture-independent data
install-indep:
install -d $(DATADIR)
install -D -m 755 pathological.py $(DATADIR)/pathological.py
cp -r circuits graphics sounds $(DATADIR)/
rm -f $(DATADIR)/graphics/*.xcf
rm -f $(DATADIR)/sounds/*.orig
install -D -m 755 pathological $(DESTDIR)/usr/games/pathological
zcat pathological.6.gz > pathological.6
install -D -m 644 pathological.6 $(DESTDIR)/usr/share/man/man6/pathological.6
install -d $(DESTDIR)/usr/share/doc/pathological
cp -r html $(DESTDIR)/usr/share/doc/pathological
install -D -m 644 pathological.xpm $(DESTDIR)/usr/share/pixmaps/pathological.xpm
# Install architecture-dependent data
install-dep:
install -d $(DESTDIR)/var/games
install -D -m 2755 --owner=root --group=games write-highscores $(DESTDIR)/usr/lib/games/pathological/bin/write-highscores
# Install the scores file, if it doesn't already exist.
install-scores:
if [ ! -e $(DESTDIR)/var/games/pathological_scores ]; then \
install -D -m 644 pathological_scores $(DESTDIR)/var/games/pathological_scores; \
fi
uninstall:
rm -rf $(DATADIR)
rm -rf $(DESTDIR)/usr/lib/games/pathological
rm -f $(DESTDIR)/usr/games/pathological
rm -f $(DESTDIR)/usr/share/pixmaps/pathological.xpm
rm -f $(DESTDIR)/usr/share/man/man6/pathological.6.gz
purge: uninstall
rm -f $(DESTDIR)/var/games/pathological_scores
empty: distclean
distclean: clean
clean:
rm -f write-highscores
rm -f html/*.png
rm -f pathological.6
|