forked from YoctoForBeaglebone/pacman4console
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (28 loc) · 1.21 KB
/
Makefile
File metadata and controls
32 lines (28 loc) · 1.21 KB
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
prefix=/usr/local
bindir=$(prefix)/bin
datarootdir=$(prefix)/share
all:
gcc pacman.c -o pacman -DDATAROOTDIR=\"$(datarootdir)\" $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses -ltinfo
gcc pacmanedit.c -o pacmanedit -DDATAROOTDIR=\"$(datarootdir)\" $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -lncurses -ltinfo
install: all
mkdir -p $(DESTDIR)$(bindir)
cp pacman $(DESTDIR)$(bindir)
cp pacmanedit $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)$(datarootdir)/pacman
cp -fR Levels/ $(DESTDIR)$(datarootdir)/pacman/
-chown root:games $(DESTDIR)$(bindir)/pacman
-chown root:games $(DESTDIR)$(datarootdir)/pacman -R
chmod 750 $(DESTDIR)$(bindir)/pacman
chmod 750 $(DESTDIR)$(bindir)/pacmanedit
chmod 750 $(DESTDIR)$(datarootdir)/pacman/ -R
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