-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (30 loc) · 759 Bytes
/
Makefile
File metadata and controls
39 lines (30 loc) · 759 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
37
38
39
#
# Makefile for building nonroot
#
CC = gcc
CFLAGS = -std=c99 -Wall -Wextra -pedantic -O2 -g
INSTALL = install -D
INSTALL_PROGRAM = $(INSTALL)
INSTALL_DATA = $(INSTALL) -m 644
prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
datarootdir = $(prefix)/share
mandir = $(datarootdir)/man
man8dir = $(mandir)/man8
DESTDIR =
SHELL = /bin/sh
MAKE = make
all: nonroot
nonroot: nonroot.c
$(CC) $(CFLAGS) -o nonroot nonroot.c
install: nonroot
$(INSTALL_PROGRAM) nonroot $(DESTDIR)$(bindir)/nonroot
$(INSTALL_DATA) nonroot.8 $(DESTDIR)$(man8dir)/nonroot.8
install-strip:
$(MAKE) INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s" install
uninstall:
rm $(DESTDIR)$(bindir)/nonroot
rm $(DESTDIR)$(man8dir)/nonroot.8
clean distclean:
rm nonroot