-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (26 loc) · 796 Bytes
/
Copy pathMakefile
File metadata and controls
36 lines (26 loc) · 796 Bytes
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
prefix=/usr/local
bindir=$(prefix)/bin
mandir=$(prefix)/share/man
CFLAGS=-Wall
INSTALL=install
INSTALL_PROGRAM=$(INSTALL)
INSTALL_DATA=$(INSTALL) -m 0644
all: 9mount 9umount 9bind
9mount: 9mount.c
9umount: 9umount.c
9bind: 9bind.c
%: %.c
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $^ -o $@
clean:
rm -f 9mount 9umount 9bind
install-man:
mkdir -p "$(DESTDIR)$(mandir)/man1"
$(INSTALL_DATA) 9mount.1 "$(DESTDIR)$(mandir)/man1"
install-suid: all install-man
mkdir -p "$(DESTDIR)$(bindir)"
$(INSTALL_PROGRAM) -t "$(DESTDIR)$(bindir)" -o root -m 4755 9mount 9umount 9bind
#non-suid mode -- users will need to use eg. sudo 9mount
install-nosuid: all install-man
mkdir -p "$(DESTDIR)$(bindir)"
$(INSTALL_PROGRAM) -t "$(DESTDIR)$(bindir)" -m 0755 9mount 9umount 9bind
install: install-suid