File: Makefile

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

all:pacman pacmanedit
pacman:pacman.c
	$(CC) $< -o $@ -DDATAROOTDIR=\"$(DATAROOTDIR)\" $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses
pacmanedit:pacmanedit.c
	$(CC) $< -o $@ -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