-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (25 loc) · 878 Bytes
/
Makefile
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
# *********************************************************
# Change this section as needed
# The -g flag is to include debugging information. It gets
# stripped back out in the install command anyway.
CC = gcc
CFLAGS = -g -Wall -D_GNU_SOURCE
PREFIX = $(DESTDIR)/usr
MANDIR = $(PREFIX)/share/man
BINDIR = $(PREFIX)/sbin
ETCDIR = $(DESTDIR)/etc
# *********************************************************
autolog: autolog.c
$(CC) $(CFLAGS) -o autolog autolog.c
isdir:
test -d $(BINDIR) || mkdir -p $(BINDIR)
test -d $(ETCDIR) || mkdir -p $(ETCDIR)
test -d $(MANDIR)/man5 || mkdir -p $(MANDIR)/man5
test -d $(MANDIR)/man8 || mkdir -p $(MANDIR)/man8
install: autolog isdir
install -c -s autolog $(BINDIR)
install -c -m 644 autolog.conf $(ETCDIR)
install -c -m 644 autolog.conf.5 $(MANDIR)/man5
install -c -m 644 autolog.8 $(MANDIR)/man8
clean:
-rm -f autolog