File: Makefile

package info (click to toggle)
pacman4console 1.3-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 400 kB
  • sloc: ansic: 914; makefile: 75
file content (27 lines) | stat: -rwxr-xr-x 1,052 bytes parent folder | download | duplicates (2)
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
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
DATAROOTDIR=$(PREFIX)/share

all:
	gcc pacman.c     -o pacman     -DDATAROOTDIR=\"$(DATAROOTDIR)\" $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses
	gcc pacmanedit.c -o pacmanedit -DDATAROOTDIR=\"$(DATAROOTDIR)\" $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses

install:    all
	install -D pacman $(DESTDIR)/usr/games/pacman4console
	install -D pacmanedit $(DESTDIR)/usr/bin/pacman4consoleedit
	install -d $(DESTDIR)/usr/share/pacman4console/Levels
	install -m 644 Levels/*dat $(DESTDIR)/usr/share/pacman4console/Levels/


uninstall:
	rm -f $(DESTDIR)$(BINDIR)/pacman
	rm -f $(DESTDIR)$(BINDIR)/pacmanedit
	rm -f $(DESTDIR)$(DATAROOTDIR)/pacman/Levels/level0[1-9].dat
	rm -f $(DESTDIR)$(DATAROOTDIR)/pacman/Levels/README
	rm -f $(DESTDIR)$(DATAROOTDIR)/pacman/Levels/template.dat
	if [ -e $(DESTDIR)$(DATAROOTDIR)/pacman/Levels/ ] ; then rmdir $(DESTDIR)$(DATAROOTDIR)/pacman/Levels/ ; fi
	if [ -e $(DESTDIR)$(DATAROOTDIR)/pacman/ ] ; then rmdir $(DESTDIR)$(DATAROOTDIR)/pacman/ ; fi

clean:
	rm -f pacman
	rm -f pacmanedit