| •1 |
PREFIX=/usr/local |
| 2 |
BINDIR=$(PREFIX)/bin |
| 3 |
DATAROOTDIR=$(PREFIX)/share |
| 4 |
|
| •5 |
all:pacman pacmanedit |
| •6 |
pacman:pacman.c |
| 7 |
$(CC) $< -o $@ -DDATAROOTDIR=\"$(DATAROOTDIR)\" $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses |
| 8 |
pacmanedit:pacmanedit.c |
| 9 |
$(CC) $< -o $@ -DDATAROOTDIR=\"$(DATAROOTDIR)\" $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses |
| •10 |
|
| 11 |
install: all |
| 12 |
install -D pacman $(DESTDIR)/usr/games/pacman4console |
| 13 |
install -D pacmanedit $(DESTDIR)/usr/bin/pacman4consoleedit |
| 14 |
install -d $(DESTDIR)/usr/share/pacman4console/Levels |
| 15 |
install -m 644 Levels/*dat $(DESTDIR)/usr/share/pacman4console/Levels/ |
| 16 |
|
| 17 |
|
| 18 |
uninstall: |
| •19 |
rm -f $(DESTDIR)$(BINDIR)/pacman |
| 20 |
rm -f $(DESTDIR)$(BINDIR)/pacmanedit |
| 21 |
rm -f $(DESTDIR)$(DATAROOTDIR)/pacman/Levels/level0[1-9].dat |
| 22 |
rm -f $(DESTDIR)$(DATAROOTDIR)/pacman/Levels/README |
| 23 |
rm -f $(DESTDIR)$(DATAROOTDIR)/pacman/Levels/template.dat |
| 24 |
if [ -e $(DESTDIR)$(DATAROOTDIR)/pacman/Levels/ ] ; then rmdir $(DESTDIR)$(DATAROOTDIR)/pacman/Levels/ ; fi |
| 25 |
if [ -e $(DESTDIR)$(DATAROOTDIR)/pacman/ ] ; then rmdir $(DESTDIR)$(DATAROOTDIR)/pacman/ ; fi |
| 26 |
|
| •27 |
clean: |
| 28 |
rm -f pacman |
| 29 |
rm -f pacmanedit |